Files
Timed-Altarica-To-Fiacre-Tr…/doc/Rapport post-doc/algos/function2.alt

12 lines
407 B
Plaintext
Raw Normal View History

2018-12-06 16:01:56 +01:00
domain FState = {NOMINAL, LOST, ERROR} ;
domain FailureType = {Err, Loss, Ok} ;
node Function
flow I : FailureType : in ; O : FailureType : out ;
state S : FState ;
event fail_loss, fail_err ;
init S := NOMINAL ;
trans S != LOST |- fail_loss -> S := LOST ;
S = NOMINAL |- fail_err -> S := ERROR ;
assert O = case { S = NOMINAL : I, S = LOST : Loss, else Err } ;
edon