Modelling with Finite State Machines: Vending machine

Exercise 1: Basic Vending Machine

The following FSM models a basic Vending Machine:

tutorial:model:vending_machine:vm-basic.svg

Re-create it in Workcraft:

Simulate your model (by pressing the [M] Simulate button in the Model tools toolbar). Try to re-create the following scenarios:

Formally verify (using Verification menu) whether the FSM

Exercise 2: Dodgy Vending Machine

Re-create the following FSM in Workcraft and save it in a different file (to draw curved arcs you need to change the connection type from Polyline to Bezier as explained here):

tutorial:model:vending_machine:vm-nondet-unreach.svg

Simulate your model. Try to re-create the following scenarios:

Verify the properties of this FSM as in the previous exercise. Can you explain the verification results?

===== Feedback =====
Comments or suggestions for improving this tutorial
  • As discussed in https://www.dokuwiki.org/plugin:include#controlling_header_size_in_included_pages, by default, the headers in included pages start one level lower than the last header in the current page. This can be tweaked by adding an empty header above the include:\\
    ====== ======
    {{page>:tutorial:feedback&inline}}
  • For offline help generation the content of feedback page should be temporary wrapped in <WRAP hide>. Note that the headers still propagate to the table of contents even if inside the hidden wrap. Therefore the Feedback title needs to be converted to something else, e.g. to code by adding two spaces in front.