vending_stock_formal
idle
stock ; Stock
cash ; Cash
paying
stock ; Stock
cash ; Cash
credit ; Amount
dropping
stock ; Stock
cash ; Cash
dispensing ; Product
change ; Amount
returningChange
stock ; Stock
cash ; Cash
change ; Amount
outOfChange
stock ; Stock
cash ; Cash
channel refillChange : Count
channel insert : Coin
channel cancel : Amount
channel choose : Product
channel drop : Product
channel returnChange : Amount
Change:
stock
after
is full
cash
after
holds the initial change and no sales
Event:
restock
Condition:
stock
before
is not full
Change:
stock
after
is full
cash
after
is
cash
before
Event:
collect
Change:
cash
after
is
cash
before
without its 100-yen coins
stock
after
is
stock
before
Event:
changeOut
Condition:
cash
before
has no 50-yen coin
Change:
stock
after
is
stock
before
cash
after
is
cash
before
Event:
refillChange?
count
Condition:
cash
before
has room for
count
event
more 50-yen coins
Change:
cash
after
is
cash
before
with
count
event
more 50-yen coins
stock
after
is
stock
before
Event:
insert?
coin
Condition:
cash
before
has a 50-yen
coin
event
cash
before
has room for one more
coin
event
Change:
credit
after
is
coin
event
cash
after
is
cash
before
with
coin
event
added
stock
after
is
stock
before
Event:
cancel!
credit
Condition:
cash
before
can pay back
credit
event
Change:
cash
after
is
cash
before
after paying back
credit
event
stock
after
is
stock
before
Event:
insert?
coin
Condition:
credit
before
plus
coin
event
is at most the limit
cash
before
has room for one more
coin
event
Change:
credit
after
is
credit
before
plus
coin
event
cash
after
is
cash
before
with
coin
event
added
stock
after
is
stock
before
Event:
choose?
product
Condition:
stock
before
has a
product
event
credit
before
covers the price of
product
event
cash
before
can pay the
change
Change:
dispensing
after
is
product
event
change
after
is
credit
before
minus the price
stock
after
is
stock
before
with one
product
event
less
cash
after
is
cash
before
Event:
drop!
dispensing
Change:
change
after
is
change
before
stock
after
is
stock
before
cash
after
is
cash
before
Event:
returnChange!
change
Change:
cash
after
is
cash
before
after paying
change
event
stock
after
is
stock
before