heptagon/examples/reachability/reachability.ept
Gwenaël Delaval f284ff2872 Reachability example
Reachability example: use of reax to chech reachability of states.
2017-03-16 11:59:02 +01:00

25 lines
620 B
Text

node reach_verif(day_event,night_event,noon_event:bool) = (day_state,evening_state:bool)
contract
reachable evening_state
let
automaton
state Night do day_state = false; evening_state = false
until day_event then Day
state Day do
day_state = true;
automaton
state Morning do
evening_state = false;
until noon_event then Afternoon
state Afternoon do
evening_state = false;
until night_event then Evening
state Evening do
evening_state = true;
until day_event then Morning
end
until night_event then Night
end
tel