Project

General

Profile

Download (256 Bytes) Statistics
| Branch: | Tag: | Revision:
1

    
2
node test1 (x :int) returns (y:bool) 
3
var l:int;
4
let
5
 automaton parity
6
 state Even :
7
 unless (x mod 2 = 1) restart Odd
8
 let
9
   l = x -> pre (l/2);
10
 tel
11
 state Odd  :
12
 unless (x mod 2 = 0) restart Even
13
 let
14
  l = x -> pre (3*l + 1);
15
 tel
16
 y = (l = 1);
17
tel
(1-1/17)