Skip to content

Instantly share code, notes, and snippets.

@trikitrok
Last active September 13, 2024 13:31
Show Gist options
  • Save trikitrok/2251e87e8c9483efc16982c6a0b9cc73 to your computer and use it in GitHub Desktop.
Save trikitrok/2251e87e8c9483efc16982c6a0b9cc73 to your computer and use it in GitHub Desktop.
Argent Rose Lite identifying behaviors
Contexto:
producto: Q, sellin, description
Invariante: 0 <= Q <= 50
Input (Productos) -> Todos validos
Comportamientos:
* Comportamiento 1: sellin dismunuye en -1 -> aplicable a todos los productos
* Comportamiento 2: Actualizar Q
Actualizar Q depende de:
1. description (tipo de producto)
2. sellin
Diferentes maneras de actualizar Q:
a. {Regular, Q, sell-in >= 0} -> Q: disminuye en 2
{Regular, Q, sell-in < 0} -> Q: disminuye el doble 4
b. {Aged Brie, Q}
sell-in >= 0 -> Q: aumenta en 1
sell-in < 0 -> Q: aumenta en 2 (el doble)
c. {Lanzarote Wine, Q}
sell-in >= 0 -> Q: aumenta en 2
sell-in < 0 -> Q: aumenta en 4 (el doble)
e. {Teather, Q}
sell-in > 5 -> aumenta en 1
5 >= sell-in >= 0 aumenta en 3
sell-in menor que 0 -> Q=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment