vending_machine_formal
vmIdle
availableProducts ; ProductSet
vmCoinsInserted
availableProducts ; ProductSet
coins ; CoinSet
vmWaitingChoosing
availableProducts ; ProductSet
coins ; CoinSet
vmDropping
availableProducts ; ProductSet
dispensing ; Product
channel choose : Product
channel drop : Product
channel insert : Coin
channel showAvailable : ProductSet
channel showPurchasable : ProductSet
Change:
availableProducts
after
are products initially in the vending machine
Event:
showAvailable!
availableProducts
Change:
availableProducts
after
is
availableProducts
event
Event:
insert?
coin
Change:
coins
after
is the set of
coin
event
availableProducts
after
is
availableProducts
before
Event:
showPurchasable?
purchasableProducts
Change:
availableProducts
after
is
availableProducts
before
coins
after
is
coins
before
Event:
insert?
coin
Change:
coins
after
is
coins
before
with
coin
event
added
availableProducts
after
is
availableProducts
before
Event:
choose?
product
Condition:
availableProducts
before
contains
product
event
Change:
dispensing
after
is
product
event
Event:
drop?
product
Condition:
product
event
is
dispensing
before
Change:
availableProducts
after
is
availableProducts
before
minus
product
event