[automaton] support for multiple output conditions

This commit is contained in:
sofamaniac committed 2023-01-05 18:31:12 +01:00
1 parent 094f403f5f
commit b2aa8bc6d5
5 files changed
+34 -14

No files matched your search

+3 -2
View File
@@ -15,7 +15,8 @@ node auto (i: int) returns (o : int);
var x, y:int;
let
automaton
| Incr -> do (o,x) = (0 fby o + 1, 2); done
| Decr -> do (o,x) = diagonal_int(0 fby o); done
| Incr -> do (o,x) = (0 fby o + 1, 2); until x > 0 then Decr else if x = o then Done
| Decr -> do (o,x) = diagonal_int(0 fby o); until x < o then Incr
| Done -> do o = pre o; done
tel