diff --git a/test/good/t10.ept b/test/good/t10.ept index 4d5196e..4fd3e0e 100644 --- a/test/good/t10.ept +++ b/test/good/t10.ept @@ -15,3 +15,8 @@ node h(x1,x2:int) returns (y:int) let y = f(x1) + g(x2) tel + +node main() returns (y:int) +let + y = h(5,7); +tel diff --git a/test/good/t11.ept b/test/good/t11.ept index 3c61f95..718fa29 100644 --- a/test/good/t11.ept +++ b/test/good/t11.ept @@ -10,3 +10,7 @@ let (z,t) = f(a,b); tel +node main() returns (z:int;t:bool) +let + (z,t) = g(false fby true, 0 fby 2 fby -3); +tel diff --git a/test/good/t12.ept b/test/good/t12.ept index e8fd52d..e81c675 100644 --- a/test/good/t12.ept +++ b/test/good/t12.ept @@ -17,3 +17,8 @@ let y = if m > 50 then 1 + m else 42; res = if true then r else y; tel + +node main() returns (out:int) +let + out = bar() +tel diff --git a/test/good/t15.ept b/test/good/t15.ept index 4c38dc2..d1cd55e 100644 --- a/test/good/t15.ept +++ b/test/good/t15.ept @@ -4,3 +4,8 @@ node foo() returns (res:int) let res = if true then 1 else 1; tel + +node main() returns (res:int) +let + res = foo() +tel diff --git a/test/good/t16.ept b/test/good/t16.ept index 41f6a23..6a44c1f 100644 --- a/test/good/t16.ept +++ b/test/good/t16.ept @@ -7,3 +7,8 @@ node foo() returns (tmt1:int) tmt2 = 0 fby v_1; v_1 = tmt1; tel + +node main() returns (t:int) +let + t = foo() +tel diff --git a/test/good/t17.ept b/test/good/t17.ept index c3b6161..624362c 100644 --- a/test/good/t17.ept +++ b/test/good/t17.ept @@ -5,3 +5,8 @@ node h(z: bool; x, y: int) returns (o2: int) o = 0 -> pre o + 2 tel +node main() returns (o:int) +let + o = h(false -> true, 0, 0) +tel + diff --git a/test/good/t18.ept b/test/good/t18.ept index d42196f..cefe561 100644 --- a/test/good/t18.ept +++ b/test/good/t18.ept @@ -9,3 +9,8 @@ node j(x, v_33: bool) returns (o: int) until v_33 then I end tel + +node main() returns (o:int) +let + o = j(true,true) +tel diff --git a/test/good/t19.ept b/test/good/t19.ept index 985afe1..8687427 100644 --- a/test/good/t19.ept +++ b/test/good/t19.ept @@ -8,3 +8,22 @@ fun mean<> (i: int) returns (m: int) let m = substr<> (i^n^n) tel + +fun mean2<> (j: int) returns (m: int) +let + m = substr<> (j^n^n) +tel + +node main() returns (m1,m2:int) +let + m1 = mean<<5>>(3); + m2 = mean2<<5>>(3) +tel + +(* CHECK compare *) +node compare() returns (ok:bool) +var x,y:int; +let + (x,y) = main(); + ok = (x = y); +tel diff --git a/test/good/t2.ept b/test/good/t2.ept index a8f9a44..dc8ed6c 100644 --- a/test/good/t2.ept +++ b/test/good/t2.ept @@ -57,10 +57,20 @@ node hh(x,z,m:int) returns (o:int) do k = 2; until (1 = 0) then S2 - end;(* + end; present - | (x = 0) do o = pre o + 2 - | (x = 2) do o = 4 - default do o = 2 - end *) o = 1 + | (x = 0) do o = k -> pre o + 2 + | (x = 2) do o = z + default do o = 2 + end tel + +node main() returns (o1,o2:int) +let + () = h(0); + () = jj(); + o1 = if (g(false fby true)) then 1 else 2; + () = hhh(); + o2 = hh(0 fby 1 fby 2, 3, o1-2); +tel + diff --git a/test/good/t2open.ept b/test/good/t2open.ept index 5e98bb7..49213a8 100644 --- a/test/good/t2open.ept +++ b/test/good/t2open.ept @@ -33,7 +33,13 @@ node h(x,z,m:int) returns (o:int) present | (x = 0) do o = 2 -> pre o + 2 | (x = 2) do o = 4 - default do o = 2 + default do o = 2 end tel + +node main() returns (o1,o2:int) +let + o1 = if (g(false fby true)) then 1 else 2; + o2 = h(0 fby 1 fby 2, 3, o1-2); +tel diff --git a/test/good/t3.ept b/test/good/t3.ept index b991d3a..b96751f 100644 --- a/test/good/t3.ept +++ b/test/good/t3.ept @@ -21,3 +21,8 @@ node f(x,z:int) returns (o:int) end tel +node main() returns (o:int) +let + o = f(0,0); +tel + diff --git a/test/good/t4.ept b/test/good/t4.ept index a89543c..ff6f819 100644 --- a/test/good/t4.ept +++ b/test/good/t4.ept @@ -22,3 +22,8 @@ node g(x: int) returns (o: int) end tel +node main() returns (o1,o2:int) +let + o1 = f(); + o2 = g(o1 / 10); +tel diff --git a/test/good/t5.ept b/test/good/t5.ept index 460e007..601a571 100644 --- a/test/good/t5.ept +++ b/test/good/t5.ept @@ -11,3 +11,10 @@ node f(x,z:int) returns (o1:int) end; o1 = o; tel + +node main() returns (o:int) +var x:int; +let + o = f(x,x); + x = 2 fby 1 fby 0; +tel diff --git a/test/good/t6.ept b/test/good/t6.ept index a248ac7..31394ce 100644 --- a/test/good/t6.ept +++ b/test/good/t6.ept @@ -14,3 +14,10 @@ node f(x,z:int) returns (o1,o2:int) end; tel +node main() returns (o1,o2:int) +var x,z:int; +let + x = 0 fby 1 fby 2 fby x; + z = 1 fby 2 fby z; + (o1,o2) = f(x,z); +tel diff --git a/test/good/t7.ept b/test/good/t7.ept index 3c99f52..0257860 100644 --- a/test/good/t7.ept +++ b/test/good/t7.ept @@ -12,3 +12,7 @@ node f(x,z1:int) returns (o:int) m = r + 2 tel +node main() returns (o:int) +let + o = f(0,0); +tel diff --git a/test/good/t8.ept b/test/good/t8.ept index 5276e9a..147e1e0 100644 --- a/test/good/t8.ept +++ b/test/good/t8.ept @@ -22,3 +22,8 @@ node f(x: t1; z1:t2) returns (o:t2) r = (m.z).x; tel +node main() returns (o1:t1;o2:t2) +let + o1 = h({ x = 1; y = 2 }); + o2 = f(o1, { z = o1; u = 3 }); +tel diff --git a/test/good/t9.ept b/test/good/t9.ept index b2902f7..5f0edd5 100644 --- a/test/good/t9.ept +++ b/test/good/t9.ept @@ -9,3 +9,11 @@ node f(x,z:int) returns (o1,o2:int) | false do (o2, o1) = (3, 3); end tel + +node main() returns (o1,o2:int) +var x,z:int; +let + x = 0 fby 1 fby 2 fby x; + z = 1 fby 2 fby z; + (o1,o2) = f(x,z); +tel diff --git a/test/good/test.ept b/test/good/test.ept index 5e04bc2..6e3b9b1 100644 --- a/test/good/test.ept +++ b/test/good/test.ept @@ -20,3 +20,9 @@ node main() returns (y:int) let y = updown2(); tel + +(* CHECK lessthan12 *) +node lessthan12() returns (ok:bool) +let + ok = main() < 12 +tel diff --git a/test/good/threestates.ept b/test/good/threestates.ept index 58498e7..bd907de 100644 --- a/test/good/threestates.ept +++ b/test/good/threestates.ept @@ -28,3 +28,10 @@ let until (x = 5) then A end tel + +node main() returns (y:int) +var x:int; +let + x = 0 fby if x = 7 then 0 else x + 1; + y = f(x); +tel diff --git a/test/good/tt.ept b/test/good/tt.ept index aaa3eb6..12b811a 100644 --- a/test/good/tt.ept +++ b/test/good/tt.ept @@ -11,6 +11,11 @@ let end tel +node main() returns (o:bool) +let + o = f(true, true) +tel + (* node clock_on<>(w1, w2 : bool) returns (o : bool) diff --git a/test/good/tttt.ept b/test/good/tttt.ept index 03db7a3..a1e9b7f 100644 --- a/test/good/tttt.ept +++ b/test/good/tttt.ept @@ -4,3 +4,10 @@ let o = merge c (true -> (0 fby x) when c) (false -> 0 fby (o whenot c)); every true tel + +node main() returns (o:int) +var half:bool; +let + half = false fby not half; + o = f(half,5); +tel diff --git a/test/good/tuple_args.ept b/test/good/tuple_args.ept index f3ac9e5..ed71c09 100755 --- a/test/good/tuple_args.ept +++ b/test/good/tuple_args.ept @@ -7,4 +7,9 @@ tel fun h(a,b:int) returns (u,v:int) let (u,v) = f(f(a,b)); -tel \ No newline at end of file +tel + +node main() returns (u,v:int) +let + (u,v) = h((1,2)) +tel diff --git a/test/good/type_alias.ept b/test/good/type_alias.ept index fc0aab2..5ce0e2b 100644 --- a/test/good/type_alias.ept +++ b/test/good/type_alias.ept @@ -19,4 +19,9 @@ var x : matrice; let x = a; o = map<> g (x); -tel \ No newline at end of file +tel + +node main() returns (o:matrice) +let + o = h(3^n^n) +tel diff --git a/test/good/updown.ept b/test/good/updown.ept index 5c5ea4d..5a65d9c 100644 --- a/test/good/updown.ept +++ b/test/good/updown.ept @@ -6,4 +6,11 @@ let state Up do o = true until on_off then Down end; -tel \ No newline at end of file +tel + +node main() returns (o:bool) +var half:bool; +let + o = updown(half); + half = true fby not half +tel diff --git a/test/good/when_merge1.ept b/test/good/when_merge1.ept index c198259..48fbb18 100644 --- a/test/good/when_merge1.ept +++ b/test/good/when_merge1.ept @@ -24,3 +24,12 @@ node fusion(x1:int; x2:int; c:t) returns (y :int) let y = merge c (A -> x1) (B -> x2) tel + +node main() returns (y,c':int) +var c:t;x:int; +let + x = 1 fby if x > 10 then 1 else x + 2; + c = A fby B fby c; + y = fusion(filter(x,c),-4,c); + c' = bool2int(t2bool(c)); +tel