type state : 0..7; var PC : MININT..MAXINT; current_state : state; output : BOOLEAN; input : BOOLEAN; /* Ruleset created to simulate non-deterministic initialization for not-initialized variable output */ Ruleset i : BOOLEAN Do Rule PC=0 ==> begin output:=i; if PC=0 then PC:=1 end; end; end; /* Ruleset created to simulate non-deterministic initialization for not-initialized variable input */ Ruleset i : BOOLEAN Do Rule PC=1 ==> begin input:=i; if PC=1 then PC:=2 end; end; end; Rule "OUTPUT_IS_1" PC=2 & ((input=TRUE) & (current_state=7)) ==> begin current_state:=0; output:=TRUE; end; Rule "GO_TO_NEXT_STATE" PC=2 & ((input=TRUE) & (current_state!=7)) ==> begin current_state:=current_state + 1; output:=FALSE; end; Rule "SELF_LOOP" PC=2 & input=FALSE ==> begin output:=FALSE; end; startstate begin input:=TRUE; output:=TRUE; current_state:=0; PC:=0; end;