diff --git a/asllib/tests/language.t/Dbhpj.asl b/asllib/tests/language.t/Dbhpj.asl new file mode 100644 index 000000000..9e6344ec0 --- /dev/null +++ b/asllib/tests/language.t/Dbhpj.asl @@ -0,0 +1,19 @@ +// RUN: interp %s | FileCheck %s + +var _a: integer; + +getter a[index: integer] => integer +begin + return _a; +end + +setter a[index: integer] = value: integer +begin + _a = value; + return; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dbjny.asl b/asllib/tests/language.t/Dbjny.asl new file mode 100644 index 000000000..6f659e670 --- /dev/null +++ b/asllib/tests/language.t/Dbjny.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer = 10; + a = 4; + return 0; +end diff --git a/asllib/tests/language.t/Dbmgm.asl b/asllib/tests/language.t/Dbmgm.asl new file mode 100644 index 000000000..2c2f5565d --- /dev/null +++ b/asllib/tests/language.t/Dbmgm.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a : integer = 100; + var b : bits(1) = '0'; + var c : integer{2, 16} = 16; + var d : bits({2, 16}) = '00'; + return 0; +end diff --git a/asllib/tests/language.t/Dbtbr.asl b/asllib/tests/language.t/Dbtbr.asl new file mode 100644 index 000000000..77f89c133 --- /dev/null +++ b/asllib/tests/language.t/Dbtbr.asl @@ -0,0 +1,19 @@ +// RUN: not interp %s | FileCheck %s + +type a of integer; +type b of a; + +func testa(aa: a) +begin + pass; +end + +func testa(bb: b) +begin + pass; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dbvgk.asl b/asllib/tests/language.t/Dbvgk.asl new file mode 100644 index 000000000..b0cbece09 --- /dev/null +++ b/asllib/tests/language.t/Dbvgk.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func underconstrained(N: integer{}) => bits(N) +begin + return Zeros(N); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dcbqk.asl b/asllib/tests/language.t/Dcbqk.asl new file mode 100644 index 000000000..33f8c76d6 --- /dev/null +++ b/asllib/tests/language.t/Dcbqk.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func fixedanddetermined() => bits(10) +begin + return Zeros(10); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dccty.asl b/asllib/tests/language.t/Dccty.asl new file mode 100644 index 000000000..4db2b6c41 --- /dev/null +++ b/asllib/tests/language.t/Dccty.asl @@ -0,0 +1,32 @@ +// RUN: interp %s | FileCheck %s + +var counter: integer = 0; +config width = 10; + +func nonexecution(a: integer) => integer +begin + return 10; +end + +func execution(a: integer) => integer +begin + counter = counter + a; + return counter; +end + +func bitsfunc{N: integer}(a: bits(N)) => integer +begin + return 10; +end + +func main() => integer +begin + let a = execution(10); + var t = 10; + let b = nonexecution(t); + let c = nonexecution(execution(10)); + var tt = Zeros(width); + let d = bitsfunc(tt); + + return 0; +end diff --git a/asllib/tests/language.t/Dcfyp.asl b/asllib/tests/language.t/Dcfyp.asl new file mode 100644 index 000000000..2d12b7e83 --- /dev/null +++ b/asllib/tests/language.t/Dcfyp.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +func test(a: integer) => integer +begin + return a; +end + +func main() => integer +begin + var a = test(10); + return 0; +end diff --git a/asllib/tests/language.t/Dcqxl.asl b/asllib/tests/language.t/Dcqxl.asl new file mode 100644 index 000000000..d59e545d5 --- /dev/null +++ b/asllib/tests/language.t/Dcqxl.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 3.141590e+0 + +func main() => integer +begin + var a: real = 3.14159; + print(a); + return 0; +end diff --git a/asllib/tests/language.t/Dcsft.asl b/asllib/tests/language.t/Dcsft.asl new file mode 100644 index 000000000..065d5763a --- /dev/null +++ b/asllib/tests/language.t/Dcsft.asl @@ -0,0 +1,24 @@ +// RUN: interp %s | FileCheck %s + +var counter: integer = 10; + +func storage() => integer +begin + return counter; +end + +func expression_func() +begin + counter = counter + 1; +end + +func function() => integer +begin + expression_func(); + return storage(); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dcwvh.asl b/asllib/tests/language.t/Dcwvh.asl new file mode 100644 index 000000000..99015485d --- /dev/null +++ b/asllib/tests/language.t/Dcwvh.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +constant x: integer = 10; +constant y: integer = x; +constant z: integer = x + y; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ddpxj.asl b/asllib/tests/language.t/Ddpxj.asl new file mode 100644 index 000000000..4b4342e3b --- /dev/null +++ b/asllib/tests/language.t/Ddpxj.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +type a of array[10] of integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dfxqv.asl b/asllib/tests/language.t/Dfxqv.asl new file mode 100644 index 000000000..cc1128189 --- /dev/null +++ b/asllib/tests/language.t/Dfxqv.asl @@ -0,0 +1,18 @@ +// RUN: interp %s | FileCheck %s + +type T1 of integer; // the named type `T1` whose structure is integer +type T2 of (integer, T1); // the named type `T2` whose structure is (integer, integer) +// Note that (integer, T1) is non-primitive since it uses T1 +var x: T1; +// the type of x is the named (hence non-primitive) type `T1` +// whose structure is `integer` +var y: integer; +// the type of y is the anonymous primitive type `integer` +var z: (integer, T1); +// the type of z is the anonymous non-primitive type `(integer, T1)` +// whose structure is `(integer, integer)` + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dfxst.asl b/asllib/tests/language.t/Dfxst.asl new file mode 100644 index 000000000..1a6b6d700 --- /dev/null +++ b/asllib/tests/language.t/Dfxst.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + let a = 10; + var b = 10; + + return 0; +end diff --git a/asllib/tests/language.t/Dggcq.asl b/asllib/tests/language.t/Dggcq.asl new file mode 100644 index 000000000..eeb443020 --- /dev/null +++ b/asllib/tests/language.t/Dggcq.asl @@ -0,0 +1,19 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 10 + +type a of exception{ + aa: integer +}; + +func main() => integer +begin + try + throw a { + aa=10 + }; + catch + when aa : a => print(aa.aa); + end + + return 0; +end diff --git a/asllib/tests/language.t/Dgvbk.asl b/asllib/tests/language.t/Dgvbk.asl new file mode 100644 index 000000000..9bda0dce8 --- /dev/null +++ b/asllib/tests/language.t/Dgvbk.asl @@ -0,0 +1,15 @@ +// RUN: interp %s | FileCheck %s + +var a: integer = 10; + +func test() +begin + a = a + 10; +end + +type ty_test of array[10] of integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dgwwp.asl b/asllib/tests/language.t/Dgwwp.asl new file mode 100644 index 000000000..75a09496c --- /dev/null +++ b/asllib/tests/language.t/Dgwwp.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func a() => integer +begin + return 10; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dgwxk.asl b/asllib/tests/language.t/Dgwxk.asl new file mode 100644 index 000000000..38397a20a --- /dev/null +++ b/asllib/tests/language.t/Dgwxk.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +type nonprimitive of integer; +type nonprimitive_a subtypes nonprimitive; +var primitive: integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dhbcp.asl b/asllib/tests/language.t/Dhbcp.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Dhbcp.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dhlqc.asl b/asllib/tests/language.t/Dhlqc.asl new file mode 100644 index 000000000..d94426444 --- /dev/null +++ b/asllib/tests/language.t/Dhlqc.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +let x: integer = 10; +let y: integer = 10; +let z: integer = x + y + 10; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dhtpl.asl b/asllib/tests/language.t/Dhtpl.asl new file mode 100644 index 000000000..6558378ed --- /dev/null +++ b/asllib/tests/language.t/Dhtpl.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func a() +begin + return; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Djljd.asl b/asllib/tests/language.t/Djljd.asl new file mode 100644 index 000000000..57e9f6e21 --- /dev/null +++ b/asllib/tests/language.t/Djljd.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +func execType(wid: integer{}) +begin + // structure of R's type depends on execution time value `wid` + var R: bits(wid); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Djrxm.asl b/asllib/tests/language.t/Djrxm.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Djrxm.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Djtdg.asl b/asllib/tests/language.t/Djtdg.asl new file mode 100644 index 000000000..eeb443020 --- /dev/null +++ b/asllib/tests/language.t/Djtdg.asl @@ -0,0 +1,19 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 10 + +type a of exception{ + aa: integer +}; + +func main() => integer +begin + try + throw a { + aa=10 + }; + catch + when aa : a => print(aa.aa); + end + + return 0; +end diff --git a/asllib/tests/language.t/Djwkg.asl b/asllib/tests/language.t/Djwkg.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Djwkg.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Djwxx.asl b/asllib/tests/language.t/Djwxx.asl new file mode 100644 index 000000000..d3d633840 --- /dev/null +++ b/asllib/tests/language.t/Djwxx.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dkckx.asl b/asllib/tests/language.t/Dkckx.asl new file mode 100644 index 000000000..f595081ff --- /dev/null +++ b/asllib/tests/language.t/Dkckx.asl @@ -0,0 +1,22 @@ +// RUN: interp %s | FileCheck %s + +func localassigns() +begin + var a = 0; + var b = 0; +end + +func compiletimeexpressions() +begin + var a = 0 + 0 + 0 + 0 + 0; +end + +func compiletimecalls() +begin + localassigns(); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dkcyt.asl b/asllib/tests/language.t/Dkcyt.asl new file mode 100644 index 000000000..08d09a26e --- /dev/null +++ b/asllib/tests/language.t/Dkcyt.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s + +func a() => integer +begin + return 10; +end + +func main() => integer +begin + a(); + return 0; +end diff --git a/asllib/tests/language.t/Dknbd.asl b/asllib/tests/language.t/Dknbd.asl new file mode 100644 index 000000000..bf75ff1ef --- /dev/null +++ b/asllib/tests/language.t/Dknbd.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +type a of (integer, integer); +type b of array[10] of integer; +type c of record {aa: integer, bb: integer}; +type d of exception {aa: integer, bb: integer}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dkxwt.asl b/asllib/tests/language.t/Dkxwt.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Dkxwt.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dljlw.asl b/asllib/tests/language.t/Dljlw.asl new file mode 100644 index 000000000..d22fa4944 --- /dev/null +++ b/asllib/tests/language.t/Dljlw.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +getter test => integer +begin + return 10; +end + +func main() => integer +begin + var a = test; + return 0; +end diff --git a/asllib/tests/language.t/Dmfbc.asl b/asllib/tests/language.t/Dmfbc.asl new file mode 100644 index 000000000..faf877c20 --- /dev/null +++ b/asllib/tests/language.t/Dmfbc.asl @@ -0,0 +1,17 @@ +// RUN: interp %s | FileCheck %s + +getter test => integer +begin + return 10; +end + +setter test = value : integer +begin + pass; +end + +func main() => integer +begin + test = 10; + return 0; +end diff --git a/asllib/tests/language.t/Dmryb.asl b/asllib/tests/language.t/Dmryb.asl new file mode 100644 index 000000000..5c772ad56 --- /dev/null +++ b/asllib/tests/language.t/Dmryb.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s + +getter a[] => integer +begin + return 1; +end + +setter a[] = b: integer +begin + return; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dmtqj.asl b/asllib/tests/language.t/Dmtqj.asl new file mode 100644 index 000000000..de02d17d7 --- /dev/null +++ b/asllib/tests/language.t/Dmtqj.asl @@ -0,0 +1,21 @@ +// RUN: interp %s | FileCheck %s + +// All of the following are compile-time types +constant wid = 32; + +type busTy of bits(wid); +type recTy of record { + bus: busTy, + valid: bit +}; + +func constType() +begin + var I: integer; + var R: bits(wid); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dnmfp.asl b/asllib/tests/language.t/Dnmfp.asl new file mode 100644 index 000000000..7525b7cf4 --- /dev/null +++ b/asllib/tests/language.t/Dnmfp.asl @@ -0,0 +1,29 @@ +// RUN: interp %s | FileCheck %s + +type a of integer; + +var b: integer; +let c = 10; +constant d = 10; +config e : integer = 10; + +func f() +begin + return; +end + +getter g[] => integer +begin + return b; +end + +setter h[] = value: integer +begin + b = value; + return; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dnrwc.asl b/asllib/tests/language.t/Dnrwc.asl new file mode 100644 index 000000000..fcf737489 --- /dev/null +++ b/asllib/tests/language.t/Dnrwc.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s + +func constrained(N: integer{1..10}) => bits(N) +begin + return Zeros(N); +end + +func fixed(N: integer{10}) => bits(N) +begin + return Zeros(N); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dnzwt.asl b/asllib/tests/language.t/Dnzwt.asl new file mode 100644 index 000000000..31fbf32a3 --- /dev/null +++ b/asllib/tests/language.t/Dnzwt.asl @@ -0,0 +1,14 @@ +// RUN: interp %s | FileCheck %s + +type a of integer; +type b of real; +type c of string; +type d of boolean; +type e of bits(10); +type f of bit; +type g of enumeration{A, B}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dpmbl.asl b/asllib/tests/language.t/Dpmbl.asl new file mode 100644 index 000000000..7e08ec851 --- /dev/null +++ b/asllib/tests/language.t/Dpmbl.asl @@ -0,0 +1,13 @@ +// RUN: interp %s | FileCheck %s + +func test(N: integer) => bits(N) +begin + return Zeros(N); +end + +func main() => integer +begin + var a: bits(10) = test(10); + var b: bits(5) = test(5); + return 0; +end diff --git a/asllib/tests/language.t/Dpqck.asl b/asllib/tests/language.t/Dpqck.asl new file mode 100644 index 000000000..be8086b1b --- /dev/null +++ b/asllib/tests/language.t/Dpqck.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to be tested here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dqjyv.asl b/asllib/tests/language.t/Dqjyv.asl new file mode 100644 index 000000000..bd4130704 --- /dev/null +++ b/asllib/tests/language.t/Dqjyv.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +config a: integer = 10; + +func main() => integer +begin + assert(TRUE); + assert(1 == 1); + assert(a == 10); + return 0; +end diff --git a/asllib/tests/language.t/Dqmyp.asl b/asllib/tests/language.t/Dqmyp.asl new file mode 100644 index 000000000..d3d633840 --- /dev/null +++ b/asllib/tests/language.t/Dqmyp.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dqnhm.asl b/asllib/tests/language.t/Dqnhm.asl new file mode 100644 index 000000000..1d5bddd63 --- /dev/null +++ b/asllib/tests/language.t/Dqnhm.asl @@ -0,0 +1,18 @@ +// RUN: interp %s | FileCheck %s + +func compiletime(a: integer, b: integer) +begin + var c = 10; +end + +func test{N:integer}(a: bits(N)) +begin + pass; +end + +func main() => integer +begin + compiletime(10, 10); + test(Zeros(10)); + return 0; +end diff --git a/asllib/tests/language.t/Dqxyc.asl b/asllib/tests/language.t/Dqxyc.asl new file mode 100644 index 000000000..f950122da --- /dev/null +++ b/asllib/tests/language.t/Dqxyc.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +type a of exception{}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dtrfw.asl b/asllib/tests/language.t/Dtrfw.asl new file mode 100644 index 000000000..6fd6aef3b --- /dev/null +++ b/asllib/tests/language.t/Dtrfw.asl @@ -0,0 +1,13 @@ +// RUN: interp %s | FileCheck %s + +func test{N: integer}(a: bits(N)) => bits(N) +begin + return a; +end + +func main() => integer +begin + var a = test('1111 0000'); + + return 0; +end diff --git a/asllib/tests/language.t/Dtrvr.asl b/asllib/tests/language.t/Dtrvr.asl new file mode 100644 index 000000000..7cbfd27c2 --- /dev/null +++ b/asllib/tests/language.t/Dtrvr.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! There are alot of cases to test here and its not interpreter related. + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dvftv.asl b/asllib/tests/language.t/Dvftv.asl new file mode 100644 index 000000000..28e6ce9e1 --- /dev/null +++ b/asllib/tests/language.t/Dvftv.asl @@ -0,0 +1,15 @@ +// RUN: interp %s | FileCheck %s + +func alwaysThrow(a: integer) +begin + if (a == 0) then + throw; + else + throw; + end +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dvmzx.asl b/asllib/tests/language.t/Dvmzx.asl new file mode 100644 index 000000000..1149aca1e --- /dev/null +++ b/asllib/tests/language.t/Dvmzx.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +type named of integer; +var anonymous: integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dvpzz.asl b/asllib/tests/language.t/Dvpzz.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Dvpzz.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dvxkm.asl b/asllib/tests/language.t/Dvxkm.asl new file mode 100644 index 000000000..1b65e9d6b --- /dev/null +++ b/asllib/tests/language.t/Dvxkm.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +func test() +begin + pass; +end + +func main() => integer +begin + test(); + return 0; +end diff --git a/asllib/tests/language.t/Dwgqs.asl b/asllib/tests/language.t/Dwgqs.asl new file mode 100644 index 000000000..7dd2b78b1 --- /dev/null +++ b/asllib/tests/language.t/Dwgqs.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +type a of record { + b: integer +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dwsxy.asl b/asllib/tests/language.t/Dwsxy.asl new file mode 100644 index 000000000..0755c79c5 --- /dev/null +++ b/asllib/tests/language.t/Dwsxy.asl @@ -0,0 +1,13 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 1 +// CHECK-NEXT: 2 + +func main() => integer +begin + var (a, b) = (1, 2); + + print(a); + print(b); + + return 0; +end diff --git a/asllib/tests/language.t/Dwszm.asl b/asllib/tests/language.t/Dwszm.asl new file mode 100644 index 000000000..23013afce --- /dev/null +++ b/asllib/tests/language.t/Dwszm.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s + +func undetermined(N: integer{1..10}) => bits(N) +begin + return Zeros(N); +end + +func determined() => bits(10) +begin + return Zeros(10); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dwxqv.asl b/asllib/tests/language.t/Dwxqv.asl new file mode 100644 index 000000000..05278be1d --- /dev/null +++ b/asllib/tests/language.t/Dwxqv.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +config a: integer{0..10} = 4; + +func main() => integer +begin + var b: bits(10); + var c: bits(a); + return 0; +end diff --git a/asllib/tests/language.t/Dxrbt.asl b/asllib/tests/language.t/Dxrbt.asl new file mode 100644 index 000000000..1735c848c --- /dev/null +++ b/asllib/tests/language.t/Dxrbt.asl @@ -0,0 +1,23 @@ +// RUN: interp %s | FileCheck %s + +constant a : integer = 10; + +getter aa => integer +begin + return a; +end + +func aaa() => integer +begin + return a; +end + +func main() => integer +begin + var b = 10 + 1; + var c = a + 1; + var d = aa + 1; + var e = aaa() + 1; + + return 0; +end diff --git a/asllib/tests/language.t/Dyydw.asl b/asllib/tests/language.t/Dyydw.asl new file mode 100644 index 000000000..a3cda963d --- /dev/null +++ b/asllib/tests/language.t/Dyydw.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +let x: integer = 10; +let y: integer = x; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dyzbq.asl b/asllib/tests/language.t/Dyzbq.asl new file mode 100644 index 000000000..18089dace --- /dev/null +++ b/asllib/tests/language.t/Dyzbq.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +type enum of enumeration{A, B}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dzpmf.asl b/asllib/tests/language.t/Dzpmf.asl new file mode 100644 index 000000000..fea09ba66 --- /dev/null +++ b/asllib/tests/language.t/Dzpmf.asl @@ -0,0 +1,24 @@ +// RUN: interp %s | FileCheck %s + +var a : integer = 10; + +getter aa => integer +begin + a = a + 1; + return a; +end + +func aaa() => integer +begin + a = a + 2; + return a; +end + +func main() => integer +begin + var b = a + 1; + var bb = aa + 1; + var bbb = aaa() + 1; + + return 0; +end diff --git a/asllib/tests/language.t/Dztpp.asl b/asllib/tests/language.t/Dztpp.asl new file mode 100644 index 000000000..44d216ec7 --- /dev/null +++ b/asllib/tests/language.t/Dztpp.asl @@ -0,0 +1,7 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Dzxss.asl b/asllib/tests/language.t/Dzxss.asl new file mode 100644 index 000000000..44d216ec7 --- /dev/null +++ b/asllib/tests/language.t/Dzxss.asl @@ -0,0 +1,7 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Gmtxx.asl b/asllib/tests/language.t/Gmtxx.asl new file mode 100644 index 000000000..cb88370a8 --- /dev/null +++ b/asllib/tests/language.t/Gmtxx.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var t: integer{0..10}; + var s: integer{11} = t; + return 0; +end diff --git a/asllib/tests/language.t/Gpfrq.asl b/asllib/tests/language.t/Gpfrq.asl new file mode 100644 index 000000000..e1878b3a6 --- /dev/null +++ b/asllib/tests/language.t/Gpfrq.asl @@ -0,0 +1,20 @@ +// RUN: interp %s | FileCheck %s + +config cond: boolean = TRUE; + +func f{N}(x: bits(N)) => bits(N + 1) +begin + return [x, '0']; +end + +func main() => integer +begin + var inputA: bits(4); + var outputA = f(inputA); // an invocation of f: bits(4)=>bits(5) + let widthB: integer {8,16} = if (cond) then 8 else 16; + var inputB: bits(widthB); + var outputB = f(inputB); // an invocation of f: bits({8,16})=>bits({9,17}) + // outputB is of type bits({9,17}) + + return 0; +end diff --git a/asllib/tests/language.t/Ibbqr.asl b/asllib/tests/language.t/Ibbqr.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Ibbqr.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ibcww.asl b/asllib/tests/language.t/Ibcww.asl new file mode 100644 index 000000000..c60693235 --- /dev/null +++ b/asllib/tests/language.t/Ibcww.asl @@ -0,0 +1,24 @@ +// RUN: interp %s | FileCheck %s + +var globe: integer = 10; + +func a() => integer +begin + return globe; +end + +func b() => integer +begin + return a(); +end + +func c() +begin + var t : integer = 10; + t = 5; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ibghb.asl b/asllib/tests/language.t/Ibghb.asl new file mode 100644 index 000000000..ff5a70947 --- /dev/null +++ b/asllib/tests/language.t/Ibghb.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +type b of bits(10) { + [0] a +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ibhln.asl b/asllib/tests/language.t/Ibhln.asl new file mode 100644 index 000000000..dad7b1f16 --- /dev/null +++ b/asllib/tests/language.t/Ibhln.asl @@ -0,0 +1,33 @@ +// RUN: interp %s | FileCheck %s + +func f() => integer {8,16,32,64} +begin + return 8; +end + +func g() => bits({8,16,32,64}) +begin + return Zeros(8); +end + +func myFunc {N: integer{8,16,32}} (myInput: bits(N)) => bits(N) +begin + return Zeros(N); +end + +func MyVectorInstruction() +begin + let myWid: integer {8,16,32,64} = f(); + var myVal: bits(myWid) = g(); + if myWid == 64 then + myVal[31:0] = myFunc(myVal[31:0]); + myVal[63:32] = myFunc(myVal[63:32]); + else // author knows myVal is not bits(64) + myVal = myFunc(myVal as bits({8,16,32})); + end +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ibklj.asl b/asllib/tests/language.t/Ibklj.asl new file mode 100644 index 000000000..533e227a2 --- /dev/null +++ b/asllib/tests/language.t/Ibklj.asl @@ -0,0 +1,6 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iblvp.asl b/asllib/tests/language.t/Iblvp.asl new file mode 100644 index 000000000..3b1cbc53e --- /dev/null +++ b/asllib/tests/language.t/Iblvp.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +func test{N:integer}(N:integer) +begin + pass; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ibtcy.asl b/asllib/tests/language.t/Ibtcy.asl new file mode 100644 index 000000000..d314de921 --- /dev/null +++ b/asllib/tests/language.t/Ibtcy.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! I am not sure what this is saying + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ibtmt.asl b/asllib/tests/language.t/Ibtmt.asl new file mode 100644 index 000000000..cc2d706f9 --- /dev/null +++ b/asllib/tests/language.t/Ibtmt.asl @@ -0,0 +1,18 @@ +// RUN: not interp %s | FileCheck %s + +func test(a: integer) => integer +begin + return a; +end + +func test(a: integer) => real +begin + return 0.0; +end + +func main() => integer +begin + var a: integer = test(10); + var b: real = test(10); + return 0; +end diff --git a/asllib/tests/language.t/Ibyvl.asl b/asllib/tests/language.t/Ibyvl.asl new file mode 100644 index 000000000..9ed7f1ab4 --- /dev/null +++ b/asllib/tests/language.t/Ibyvl.asl @@ -0,0 +1,14 @@ +// RUN: interp %s | FileCheck %s + +var x: integer; +constant a: integer = 10; + +func test(t: integer) +begin + pass; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ibzvb.asl b/asllib/tests/language.t/Ibzvb.asl new file mode 100644 index 000000000..d552357fa --- /dev/null +++ b/asllib/tests/language.t/Ibzvb.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func test(a: integer, b: integer) => bits(a + b) +begin + return [Zeros(a), Zeros(b)]; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Icdvy.asl b/asllib/tests/language.t/Icdvy.asl new file mode 100644 index 000000000..0902504df --- /dev/null +++ b/asllib/tests/language.t/Icdvy.asl @@ -0,0 +1,14 @@ +// RUN: interp %s | FileCheck %s + +func test{N}(a: bits(N)) +begin + return; +end + +func main() => integer +begin + constant a: integer{0..10} = 1; + var b: bits(a); + test(b); + return 0; +end diff --git a/asllib/tests/language.t/Icgrh.asl b/asllib/tests/language.t/Icgrh.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Icgrh.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Icgyh.asl b/asllib/tests/language.t/Icgyh.asl new file mode 100644 index 000000000..2eb11e608 --- /dev/null +++ b/asllib/tests/language.t/Icgyh.asl @@ -0,0 +1,40 @@ +// RUN: interp %s | FileCheck %s + +var gWid: integer {8,16,32}; +// Note that a and b are "formal arguments" but are not "parameters"! +func prod(a: integer, b: integer) => integer +begin + return (a*b); +end + +func declarations() +begin + let N = gWid; + // N is an execution-time immutable constrained integer + // The implicit type of N is integer {8,16,32} + var A: bits(N); + // A is a constrained width bitvector of determined width N + // whose width is constrained to be IN {8,16,32} + var B: bits(N * 2); + // B is a constrained width bitvector of determined width N*2 + // whose width is constrained to be IN {16,32,64} + // The following contrived example shows that even if + // prod is a trivial function, the result is unconstrained + let prodWid = prod(N,2); // implicitly an integer + // var C: bits(prodWid); + // Illegal since prod(N,2) is an unconstrained integer + var D: bits(prodWid as {16,32,64}); + // Legal but requires an execution-time check that (prod(N,2) IN {16,32,64}) + // This check may be elided by the compiler + // D is a constrained width bitvector of determined width prodWid + // whose width is constrained to be IN {16,32,64} + var E: bits(N as {64,128}); // Illegal - fails type-check + // Requires (N IN {64,128}) + // This can be determined as false at compile time since + // the type of N is integer {8,16,32}. +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ichmp.asl b/asllib/tests/language.t/Ichmp.asl new file mode 100644 index 000000000..be8fc5f84 --- /dev/null +++ b/asllib/tests/language.t/Ichmp.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! What does this mean and how would I test it? + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Icjvd.asl b/asllib/tests/language.t/Icjvd.asl new file mode 100644 index 000000000..cb90c630d --- /dev/null +++ b/asllib/tests/language.t/Icjvd.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var (a, b) : (boolean, integer) = (TRUE, 1); + + return 0; +end diff --git a/asllib/tests/language.t/Icmlp.asl b/asllib/tests/language.t/Icmlp.asl new file mode 100644 index 000000000..50b2c1ef0 --- /dev/null +++ b/asllib/tests/language.t/Icmlp.asl @@ -0,0 +1,13 @@ +// RUN: not interp %s | FileCheck %s + +func test(N: integer, a: bits(N)) +begin + pass; +end + +func main() => integer +begin + var a: integer = 4; + test(a, '1111'); + return 0; +end diff --git a/asllib/tests/language.t/Icvxb.asl b/asllib/tests/language.t/Icvxb.asl new file mode 100644 index 000000000..6adbe9934 --- /dev/null +++ b/asllib/tests/language.t/Icvxb.asl @@ -0,0 +1,7 @@ +// RUN : interp %s | FileCheck %s + +// ! I am not sure how to test this +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Icxps.asl b/asllib/tests/language.t/Icxps.asl new file mode 100644 index 000000000..d198723bf --- /dev/null +++ b/asllib/tests/language.t/Icxps.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s +// CHECK: Hello world + +func main() => integer +begin + print("Hello world"); + return 0; +end diff --git a/asllib/tests/language.t/Idfml.asl b/asllib/tests/language.t/Idfml.asl new file mode 100644 index 000000000..0a6065e29 --- /dev/null +++ b/asllib/tests/language.t/Idfml.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +type a subtypes a; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Idgwj.asl b/asllib/tests/language.t/Idgwj.asl new file mode 100644 index 000000000..e9f9aa366 --- /dev/null +++ b/asllib/tests/language.t/Idgwj.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +type a of integer; +type b of integer; + +func main() => integer +begin + var aa: a = 10; + var bb: b = aa; + return 0; +end diff --git a/asllib/tests/language.t/Idmnl.asl b/asllib/tests/language.t/Idmnl.asl new file mode 100644 index 000000000..64bd20c89 --- /dev/null +++ b/asllib/tests/language.t/Idmnl.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s +// CHECK: TRUE +// CHECK-NEXT: TRUE + +func main() => integer +begin + var a: string = "Hello"; + print((a == "Hello")); + print((a != "World")); + return 0; +end diff --git a/asllib/tests/language.t/Idvsm.asl b/asllib/tests/language.t/Idvsm.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Idvsm.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ieoax.asl b/asllib/tests/language.t/Ieoax.asl new file mode 100644 index 000000000..6a296606d --- /dev/null +++ b/asllib/tests/language.t/Ieoax.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +config a: integer = 10; + +func main() => integer +begin + var b: bits(a as integer{10}); + return 0; +end diff --git a/asllib/tests/language.t/Ifbvh.asl b/asllib/tests/language.t/Ifbvh.asl new file mode 100644 index 000000000..f8d506369 --- /dev/null +++ b/asllib/tests/language.t/Ifbvh.asl @@ -0,0 +1,33 @@ +// RUN: interp %s | FileCheck %s + +var b: integer; + +getter a[] =>integer +begin + return b; +end + +getter c[value1 : integer] =>integer +begin + return b; +end + +setter a[] = value: integer +begin + b = value; + return; +end + +setter c[value1 : integer] = value: integer +begin + b = value * value1; + return; +end + +func main() => integer +begin + a[] = 10; + c[10] = 10; + + return 0; +end diff --git a/asllib/tests/language.t/Ifcgk.asl b/asllib/tests/language.t/Ifcgk.asl new file mode 100644 index 000000000..db61a1057 --- /dev/null +++ b/asllib/tests/language.t/Ifcgk.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! Not sure what this is saying + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ifkjc.asl b/asllib/tests/language.t/Ifkjc.asl new file mode 100644 index 000000000..db7a2c3ea --- /dev/null +++ b/asllib/tests/language.t/Ifkjc.asl @@ -0,0 +1,11 @@ +// RUN : interp %s | FileCheck %s + +// ! How would I detect a warning here? + +func main() => integer +begin + var a = 10; + var b = a + 5; + + return 0; +end diff --git a/asllib/tests/language.t/Iflkf.asl b/asllib/tests/language.t/Iflkf.asl new file mode 100644 index 000000000..1662130df --- /dev/null +++ b/asllib/tests/language.t/Iflkf.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s + +func test{N:integer}(a: bits(N), b: bits(N)) +begin + pass; +end + +func main() => integer +begin + test('1', '11'); + return 0; +end diff --git a/asllib/tests/language.t/Ifpvz.asl b/asllib/tests/language.t/Ifpvz.asl new file mode 100644 index 000000000..9977b3511 --- /dev/null +++ b/asllib/tests/language.t/Ifpvz.asl @@ -0,0 +1,17 @@ +// RUN: interp %s | FileCheck %s + +var none: bits(-: integer {1}); +// legal since this is a fixed width bitvector whose determined width is 1 +// not a constrained width bitvector of undetermined width +// var many: bits(-: integer {1,2}); +// illegal since this is a constrained width bitvector of undetermined width +// and there is no initialization expression +config configValue: integer {1,2} = 1; +var many: bits(-: integer {1,2}) = Zeros(configValue); +// legal since this is a constrained width bitvector of undetermined width +// and this is a declaration where an initialization expression is given + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ifsfq.asl b/asllib/tests/language.t/Ifsfq.asl new file mode 100644 index 000000000..23b7efbeb --- /dev/null +++ b/asllib/tests/language.t/Ifsfq.asl @@ -0,0 +1,19 @@ +// RUN: not interp %s | FileCheck %s + +type a of integer; +type b of a; + +func testa(aa: a) => integer +begin + return 0; +end + +func testa(bb: b) => real +begin + return 0.0; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ifvrf.asl b/asllib/tests/language.t/Ifvrf.asl new file mode 100644 index 000000000..ddf0d04ec --- /dev/null +++ b/asllib/tests/language.t/Ifvrf.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! Not implemented + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ifyfn.asl b/asllib/tests/language.t/Ifyfn.asl new file mode 100644 index 000000000..9545773df --- /dev/null +++ b/asllib/tests/language.t/Ifyfn.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s + +func a() +begin + assert(FALSE); +end + +func b() +begin + print("Side effect"); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ifzms.asl b/asllib/tests/language.t/Ifzms.asl new file mode 100644 index 000000000..333f59cdd --- /dev/null +++ b/asllib/tests/language.t/Ifzms.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a : bits(8) = '1111 1111'; + var b : bits(8){} = '1111 1111'; + var c = a == b; + + return 0; +end diff --git a/asllib/tests/language.t/Igfzt.asl b/asllib/tests/language.t/Igfzt.asl new file mode 100644 index 000000000..c7388453b --- /dev/null +++ b/asllib/tests/language.t/Igfzt.asl @@ -0,0 +1,23 @@ +// RUN: interp %s | FileCheck %s +// CHECK: TRUE + +var a: integer = 10; + +func write(b: integer) => integer +begin + var c: integer = a; + a = b; + return c; +end + +func main() => integer +begin + var aa: integer = write(20) + 10; + + a = 10; + + var bb: integer = 10 + write(20); + + print((aa == bb)); + return 0; +end diff --git a/asllib/tests/language.t/Ighgk.asl b/asllib/tests/language.t/Ighgk.asl new file mode 100644 index 000000000..b17cae660 --- /dev/null +++ b/asllib/tests/language.t/Ighgk.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func under_constrained(a: integer{}) +begin + pass; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Igjhs.asl b/asllib/tests/language.t/Igjhs.asl new file mode 100644 index 000000000..bb67b10a1 --- /dev/null +++ b/asllib/tests/language.t/Igjhs.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! I believe this is internal only + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Igjzq.asl b/asllib/tests/language.t/Igjzq.asl new file mode 100644 index 000000000..4e720da53 --- /dev/null +++ b/asllib/tests/language.t/Igjzq.asl @@ -0,0 +1,18 @@ +// RUN: interp %s | FileCheck %s + +// a global which may only hold the values 8, 16 or 32 +var gWid: integer {8,16,32}; +// a global constant which holds the value 64 and has type integer {64} +constant constantValue = 64; +// The initializer for the following config is a compile-time-constant +// whose value is 32 hence its type is integer {32} which type checks +// against the type of configWid +config configWid: integer {8,16,32} = constantValue DIV 2; +// Although constantValue is of type integer, it is a compile-time constant +// so the initializer of configWid is `32: integer{32}` +config halfWid: integer {4,8,16} = configWid DIV 2; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Igklw.asl b/asllib/tests/language.t/Igklw.asl new file mode 100644 index 000000000..d73b57187 --- /dev/null +++ b/asllib/tests/language.t/Igklw.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func main(a: integer) => integer +begin + return 0; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iglhk.asl b/asllib/tests/language.t/Iglhk.asl new file mode 100644 index 000000000..4694a7296 --- /dev/null +++ b/asllib/tests/language.t/Iglhk.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Implementation specific + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iglwm.asl b/asllib/tests/language.t/Iglwm.asl new file mode 100644 index 000000000..8bb192f99 --- /dev/null +++ b/asllib/tests/language.t/Iglwm.asl @@ -0,0 +1,7 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: bits({0..10}) = '00'; + return 0; +end diff --git a/asllib/tests/language.t/Igqmv.asl b/asllib/tests/language.t/Igqmv.asl new file mode 100644 index 000000000..484e2b04f --- /dev/null +++ b/asllib/tests/language.t/Igqmv.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +type a of bits(4 as integer {4,8}); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Igqrd.asl b/asllib/tests/language.t/Igqrd.asl new file mode 100644 index 000000000..63675eea2 --- /dev/null +++ b/asllib/tests/language.t/Igqrd.asl @@ -0,0 +1,48 @@ +// RUN: interp %s | FileCheck %s + +config systemWid: integer {8,16} = 8; +// systemWid==>systemWid +func getDefault() => bits(systemWid) +begin + var ret: bits(systemWid) = Zeros(systemWid); + return ret; +end + +func systemOp(x: bits(systemWid)) => bits(systemWid) +begin + return (NOT x); +end + +func getWidth {N: integer} (x: bits(N)) => integer +begin + return N; +end + +func test() +begin + var addr = getDefault(); + // Type of addr is bits(systemWid) + // which is a constrained width bitvector bits({8,16}) + addr = systemOp(addr); // Legal + // Both LHS and RHS are bits(systemWid) + let N = getWidth(addr) as {8,16}; + // Invokes execution-time check that RHS is IN {8,16} + // Type of N is integer {8,16} + // N==>N + var newAddr: bits(N) = [ Zeros(N-1), '1']; + // newAddr = systemOp(addr); // ILLEGAL + // LHS is bits(N) but RHS is bits(systemWid) + newAddr = systemOp(addr) as bits(N); + // Incurs an execution-time check that (N==systemWid) + // - = newAddr + addr; // ILLEGAL + // Type checker cannot demonstrate (systemWid==N) + newAddr = newAddr + (addr as bits(N)); // Legal + // Incurs an execution-time check that (N==systemWid) + // addr = newAddr; // ILLEGAL + addr = newAddr as bits(systemWid); // Legal +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Igqyg.asl b/asllib/tests/language.t/Igqyg.asl new file mode 100644 index 000000000..46cedc77b --- /dev/null +++ b/asllib/tests/language.t/Igqyg.asl @@ -0,0 +1,50 @@ +// RUN: interp %s | FileCheck %s + +var gInt: integer {1,2,3}; // a constrained mutable global + +func mutables(wid: integer{}) +begin + // type checker knows wid-->wid + constant mod = 1; + // RHS is immutable so mod-->1 + let size01 = wid + gInt; + // RHS is mutable so size01-->size01 + var data01: bits(size01+1); + // size01 reduces to size01 so + // type checker knows data01 is (size01+1) wide + let size02 = wid + gInt + mod; + // RHS is mutable so size02-->size02 + var data02: bits(size02); + // size02-->size02 so + // type checker knows data02 is (size02) wide + data01=data02; + // type checker emits an error "Widths do not match" + // since it cannot tell that (size01+1)==(size02) +end + +func immutables(wid: integer{}) +begin + // type checker knows wid-->wid + constant mod = 1; + // RHS is immutable so mod-->1 + let size01 = wid; + // RHS is immutable so size01-->wid + var data01: bits(size01+1); + // size01-->wid so + // type checker knows data01 is (wid+1) wide + let size02 = wid + mod; + // RHS is statically evaluable + // and mod-->1 so + // type checker knows size02-->(wid+1) + var data02: bits(size02); + // size02-->(wid+1) so + // type checker knows data02 is (wid+1) wide + data01=data02; + // type checker knows that (wid+1)==(wid+1) + // Widths match +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Igysk.asl b/asllib/tests/language.t/Igysk.asl new file mode 100644 index 000000000..e208dcb6f --- /dev/null +++ b/asllib/tests/language.t/Igysk.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +func test(a: bits({2, 4})) +begin + var b: bits(4) = a; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Igzvm.asl b/asllib/tests/language.t/Igzvm.asl new file mode 100644 index 000000000..d621121b5 --- /dev/null +++ b/asllib/tests/language.t/Igzvm.asl @@ -0,0 +1,22 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 10 + +type a of exception{ + aa: integer +}; + +type b subtypes a; + +func main() => integer +begin + try + throw b { + aa=10 + }; + catch + when aa : a => print(aa.aa); + + end + + return 0; +end diff --git a/asllib/tests/language.t/Ihjbh.asl b/asllib/tests/language.t/Ihjbh.asl new file mode 100644 index 000000000..fe3ba8b62 --- /dev/null +++ b/asllib/tests/language.t/Ihjbh.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s + +// CHECK: 99999999999999999999999999999999999999999999999 +// CHECK-NEXT: -99999999999999999999999999999999999999999999999 + +func main() => integer +begin + // Does not exactly test for a minimum and a maximum but these break through 32 bit and 64 bit values + var a: integer = 99999999999999999999999999999999999999999999999; + var b: integer = -99999999999999999999999999999999999999999999999; + + print(a); + print(b); + + return 0; +end diff --git a/asllib/tests/language.t/Ihjcd.asl b/asllib/tests/language.t/Ihjcd.asl new file mode 100644 index 000000000..d48b403a2 --- /dev/null +++ b/asllib/tests/language.t/Ihjcd.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 1000000 +// CHECK-NEXT: 1000000 + +func main() => integer +begin + print(1000000); + print(1_000_000); + return 0; +end diff --git a/asllib/tests/language.t/Ihjrd.asl b/asllib/tests/language.t/Ihjrd.asl new file mode 100644 index 000000000..ceb0864e8 --- /dev/null +++ b/asllib/tests/language.t/Ihjrd.asl @@ -0,0 +1,21 @@ +// RUN: not interp %s | FileCheck %s + +var b: integer; + +getter a[] => integer +begin + return b; +end + +setter a[] = value: integer +begin + b = value; + return; +end + +var a: string; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ihlbl.asl b/asllib/tests/language.t/Ihlbl.asl new file mode 100644 index 000000000..d540d60f8 --- /dev/null +++ b/asllib/tests/language.t/Ihlbl.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +type a of exception {a: integer}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ihmrk.asl b/asllib/tests/language.t/Ihmrk.asl new file mode 100644 index 000000000..8f818d664 --- /dev/null +++ b/asllib/tests/language.t/Ihmrk.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 0 +// CHECK-NEXT: FALSE + +func main() => integer +begin + var a: (integer, boolean); + var (b, c) = a; + print(b); + print(c); + return 0; +end diff --git a/asllib/tests/language.t/Ihsql.asl b/asllib/tests/language.t/Ihsql.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Ihsql.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ihswr.asl b/asllib/tests/language.t/Ihswr.asl new file mode 100644 index 000000000..f51065642 --- /dev/null +++ b/asllib/tests/language.t/Ihswr.asl @@ -0,0 +1,13 @@ +// RUN: not interp %s | FileCheck %s + +func testing(a: bits(4)) +begin + pass; +end + +func main() => integer +begin + var a: bits(2); + testing(a); + return 0; +end diff --git a/asllib/tests/language.t/Ihsww.asl b/asllib/tests/language.t/Ihsww.asl new file mode 100644 index 000000000..50db72642 --- /dev/null +++ b/asllib/tests/language.t/Ihsww.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 10 + +config a: integer = 10; + +func main() => integer +begin + print(a); + return 0; +end diff --git a/asllib/tests/language.t/Ihvlx.asl b/asllib/tests/language.t/Ihvlx.asl new file mode 100644 index 000000000..f178bfba6 --- /dev/null +++ b/asllib/tests/language.t/Ihvlx.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var __should_error_by_convention: integer; + return 0; +end diff --git a/asllib/tests/language.t/Ihybt.asl b/asllib/tests/language.t/Ihybt.asl new file mode 100644 index 000000000..8f8b0ffac --- /dev/null +++ b/asllib/tests/language.t/Ihybt.asl @@ -0,0 +1,23 @@ +// RUN: interp %s | FileCheck %s + +var counter: integer = 0; + +func nonexecution() => integer +begin + return 10; +end + +func execution() => integer +begin + counter = counter + 1; + return counter; +end + + +func main() => integer +begin + let a = nonexecution(); + let b = execution(); + + return 0; +end diff --git a/asllib/tests/language.t/Ijdcc.asl b/asllib/tests/language.t/Ijdcc.asl new file mode 100644 index 000000000..9fab6785e --- /dev/null +++ b/asllib/tests/language.t/Ijdcc.asl @@ -0,0 +1,10 @@ +// RUN: not interp %s | FileCheck %s + +type a of bits(5) { + [10:7] aa +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ijejd.asl b/asllib/tests/language.t/Ijejd.asl new file mode 100644 index 000000000..d4d6055c7 --- /dev/null +++ b/asllib/tests/language.t/Ijejd.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +func t(a: integer{0, 1}, b: integer{3, 2}) +begin + var c = '1111 1111'; + var d = c[b:a]; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ijqpk.asl b/asllib/tests/language.t/Ijqpk.asl new file mode 100644 index 000000000..ba62fbd9d --- /dev/null +++ b/asllib/tests/language.t/Ijqpk.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 10 + +func main() => integer +begin + var a: integer = 10; + var b: real = Real(a); + + print(b); + return 0; +end diff --git a/asllib/tests/language.t/Ijrdl.asl b/asllib/tests/language.t/Ijrdl.asl new file mode 100644 index 000000000..d8778b79e --- /dev/null +++ b/asllib/tests/language.t/Ijrdl.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +type a of integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ijskw.asl b/asllib/tests/language.t/Ijskw.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Ijskw.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ijvrm.asl b/asllib/tests/language.t/Ijvrm.asl new file mode 100644 index 000000000..5e2d92128 --- /dev/null +++ b/asllib/tests/language.t/Ijvrm.asl @@ -0,0 +1,9 @@ +// RUN: not interp %s | FileCheck %s + +type a subtypes b; +type b subtypes a; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ikbxm.asl b/asllib/tests/language.t/Ikbxm.asl new file mode 100644 index 000000000..46c5653a2 --- /dev/null +++ b/asllib/tests/language.t/Ikbxm.asl @@ -0,0 +1,13 @@ +// RUN: not interp %s | FileCheck %s + +func a() +begin + var b = c; +end + +func main() => integer +begin + var c = 10; + a(); + return 0; +end diff --git a/asllib/tests/language.t/Ikfcr.asl b/asllib/tests/language.t/Ikfcr.asl new file mode 100644 index 000000000..cd98c6956 --- /dev/null +++ b/asllib/tests/language.t/Ikfcr.asl @@ -0,0 +1,15 @@ +// RUN: interp %s | FileCheck %s + +func test{N}(a: bits(N)) +begin + var b: integer = N; + return; +end + +func main() => integer +begin + constant a: integer{0..10} = 1; + var b: bits(a); + test(b); + return 0; +end diff --git a/asllib/tests/language.t/Ikfyg.asl b/asllib/tests/language.t/Ikfyg.asl new file mode 100644 index 000000000..08d7f7451 --- /dev/null +++ b/asllib/tests/language.t/Ikfyg.asl @@ -0,0 +1,9 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + for x = 0 to 10 do + break; + end + return 0; +end diff --git a/asllib/tests/language.t/Ikgks.asl b/asllib/tests/language.t/Ikgks.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Ikgks.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ikgmc.asl b/asllib/tests/language.t/Ikgmc.asl new file mode 100644 index 000000000..1dffafe71 --- /dev/null +++ b/asllib/tests/language.t/Ikgmc.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +type a of bits(6) { + [3:0] aa, + [4] bb, + [5] cc +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ikjdr.asl b/asllib/tests/language.t/Ikjdr.asl new file mode 100644 index 000000000..08930d757 --- /dev/null +++ b/asllib/tests/language.t/Ikjdr.asl @@ -0,0 +1,36 @@ +// RUN: interp %s | FileCheck %s + +func invokeMe {N: integer {8,16,32}} (x: bits(N)) +begin + return; +end + +func test(M: integer {8,16,32}, L: integer {8,16}) +begin + var myM: bits(M); + var myL: bits(L); + if (M != L) then + return; + end + // Note the type-checker does not do full program analysis + // So it does not know that M==L after this statement + // myM = myL; // ILLEGAL + // myM and myL are constrained width bitvectors of determined widths + // M and L respectively. + // The type-checker does not know (M==L), so subtype-satisfaction + // disallows this use of myL. + myM = myL as bits(M); // Legal + // The author explicitly claimed that myL has the width of myM + // An execution-time check of (M==L) is required + invokeMe(myL); // Legal + // The parameter N is taken to be the value which corresponds + // with the width of myL and the width of myL is an integer {8,16} + // which complies with the declaration of parameter 'N' + // The rules for subtype-satisfaction are satisfied since + // the formal 'x' and the actual 'myL' are of the same determined width. +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ikkcc.asl b/asllib/tests/language.t/Ikkcc.asl new file mode 100644 index 000000000..d129bb2ee --- /dev/null +++ b/asllib/tests/language.t/Ikkcc.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +type a of integer; + +func main() => integer +begin + var aa: a = 10; + var aaa: integer = aa; + var aaaa: a = aaa; + return 0; +end diff --git a/asllib/tests/language.t/Ikkqy.asl b/asllib/tests/language.t/Ikkqy.asl new file mode 100644 index 000000000..9576f9736 --- /dev/null +++ b/asllib/tests/language.t/Ikkqy.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +config a = 10; + +type b of bits(a); +type c of integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iknxj.asl b/asllib/tests/language.t/Iknxj.asl new file mode 100644 index 000000000..02460e148 --- /dev/null +++ b/asllib/tests/language.t/Iknxj.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s + +func testing(a: bits({2, 4, 8})) +begin + pass; +end + +func test(a: bits({2})) +begin + testing(a); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ikpbx.asl b/asllib/tests/language.t/Ikpbx.asl new file mode 100644 index 000000000..a82469b33 --- /dev/null +++ b/asllib/tests/language.t/Ikpbx.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +type aa of integer; + +type a of bits(5) { + [0] aa +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ikrll.asl b/asllib/tests/language.t/Ikrll.asl new file mode 100644 index 000000000..5e721b8fe --- /dev/null +++ b/asllib/tests/language.t/Ikrll.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a : integer{4} = 4; + var b = a as integer{0..4}; + return 0; +end diff --git a/asllib/tests/language.t/Iktjn.asl b/asllib/tests/language.t/Iktjn.asl new file mode 100644 index 000000000..13971480e --- /dev/null +++ b/asllib/tests/language.t/Iktjn.asl @@ -0,0 +1,33 @@ +// RUN: not interp %s | FileCheck %s + +func sameWid {N: integer {2,4,8,16}} (A: bits(N), B: bits(N)) => bits(N) +begin + return A; +end + +func test1() +begin + var A1, B1: bits(8); + var C1 = sameWid(A1, B1); + // The invocation type of sameWid's return type is bits(8) + // so `C1` has type `bits(8)` +end + +func test2(N: integer{4,8}) +begin + let wid: integer {2,4,8} = N; // A little unusual... + var A2: bits(N); // bits(N as {4,8}) + var D2: bits(wid); // bits(wid as {2,4,8}) + A2 = D2; // legal - matching determined widths + D2 = A2; // legal - matching determined widths + // Although A2 and D2 have the same width, they have different + // constraints so the following is illegal + var result = sameWid(A2, D2); + // If it were not illegal then the return type could not be determined + // and is either bits(N as {4,8}) or bits(wid as {2,4,8}) +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ikxsd.asl b/asllib/tests/language.t/Ikxsd.asl new file mode 100644 index 000000000..0821512c1 --- /dev/null +++ b/asllib/tests/language.t/Ikxsd.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s + +func testing(a: bits({0..10})) +begin + pass; +end + +func test(a: bits({0..3})) +begin + testing(a); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ildnp.asl b/asllib/tests/language.t/Ildnp.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Ildnp.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ilfjz.asl b/asllib/tests/language.t/Ilfjz.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Ilfjz.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ilghj.asl b/asllib/tests/language.t/Ilghj.asl new file mode 100644 index 000000000..69c6de834 --- /dev/null +++ b/asllib/tests/language.t/Ilghj.asl @@ -0,0 +1,13 @@ +// RUN: interp %s | FileCheck %s + +func check{M: integer{4,8}}(flag: boolean, x: bits(M), y: bits(8)) => boolean +begin + if flag then + return (x as bits(8)) == y; // valid + end +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ilhlr.asl b/asllib/tests/language.t/Ilhlr.asl new file mode 100644 index 000000000..ae01397ac --- /dev/null +++ b/asllib/tests/language.t/Ilhlr.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer{3} = 1 + 2; + + return 0; +end diff --git a/asllib/tests/language.t/Ilrvn.asl b/asllib/tests/language.t/Ilrvn.asl new file mode 100644 index 000000000..8576b42dc --- /dev/null +++ b/asllib/tests/language.t/Ilrvn.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! There is a lot to test here so will likely be covered in 7.3.1 + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ilwqq.asl b/asllib/tests/language.t/Ilwqq.asl new file mode 100644 index 000000000..8c4f12648 --- /dev/null +++ b/asllib/tests/language.t/Ilwqq.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +var a = b; +var b = c; +var c : integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ilykd.asl b/asllib/tests/language.t/Ilykd.asl new file mode 100644 index 000000000..2d8d3d7a0 --- /dev/null +++ b/asllib/tests/language.t/Ilykd.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +func nonexecution(a: integer) => integer +begin + return 10; +end + +func main() => integer +begin + var a = nonexecution(10); + return 0; +end diff --git a/asllib/tests/language.t/Ilzcx.asl b/asllib/tests/language.t/Ilzcx.asl new file mode 100644 index 000000000..943e11314 --- /dev/null +++ b/asllib/tests/language.t/Ilzcx.asl @@ -0,0 +1,15 @@ +// RUN: not interp %s | FileCheck %s + +var counter: integer = 0; +constant counter_two: integer = add(); + +func adder() => integer +begin + counter = counter + 1; + return counter; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Imhyb.asl b/asllib/tests/language.t/Imhyb.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Imhyb.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Imhys.asl b/asllib/tests/language.t/Imhys.asl new file mode 100644 index 000000000..8aeb56252 --- /dev/null +++ b/asllib/tests/language.t/Imhys.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + assert(FALSE); + return 0; +end diff --git a/asllib/tests/language.t/Imjwm.asl b/asllib/tests/language.t/Imjwm.asl new file mode 100644 index 000000000..526111738 --- /dev/null +++ b/asllib/tests/language.t/Imjwm.asl @@ -0,0 +1,7 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: bits(4) = '1111 1111 1111'[3:0]; + return 0; +end diff --git a/asllib/tests/language.t/Imkpr.asl b/asllib/tests/language.t/Imkpr.asl new file mode 100644 index 000000000..a7009eba0 --- /dev/null +++ b/asllib/tests/language.t/Imkpr.asl @@ -0,0 +1,42 @@ +// RUN: interp %s | FileCheck %s + +func invokedN {N: integer {8,16,32}} (x: bits(N)) => bits(N) +begin + var myBits: bits(N); + // The type of myBits is bits(N as {8,16,32}) + if N == 8 then // "GUARD" + // myBits = '10101010'; // ILLEGAL + // since the type of myBits is not of width 8 + myBits = '10101010' as bits(N); // Legal (line AS01) + // type checker inserts execution-time check `N==8` + else + myBits = Zeros(N); + end + return myBits; +end + +func test(M: integer) +begin + var myVal: bits(M as {16,32}); + // Incurs execution-time check that (M IN {16,32}) + var myResult: bits(M as {8,16}); + // Incurs execution-time check that (M IN {8,16}) + // myResult = invokedN(myVal); // ILLEGAL + // The return type of invokedN(myVal) is bits(M as {16,32}) + // which does not type satisfy myResult + myResult = invokedN(myVal as bits({8,16})); // returns a bits({8,16}) + // Execution-time check that M IN {8,16} + // Note that the only value of M which can cause this invocation is `16` + // so the execution-time check `N==8` in invokedN at "AS01" is not executed + // due to its `if N==8` above failing + myVal = invokedN(myResult) as bits({16, 32}); + // Execution-time check that the returned value is IN {16,32} + // Invocation matches signature so it type-checks + // Note that myResult may be a bits(8), + // so the check at line AS01 may be executed +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Immkf.asl b/asllib/tests/language.t/Immkf.asl new file mode 100644 index 000000000..2f50e227d --- /dev/null +++ b/asllib/tests/language.t/Immkf.asl @@ -0,0 +1,13 @@ +// RUN: not interp %s | FileCheck %s + +func foo{N, M}(bv1 : bits(N), bv2 : bits(M)) +begin + var a : integer{0..N}; + var b : integer{0..M}; + a = b; // illegal +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Impsw.asl b/asllib/tests/language.t/Impsw.asl new file mode 100644 index 000000000..1c8dea070 --- /dev/null +++ b/asllib/tests/language.t/Impsw.asl @@ -0,0 +1,13 @@ +// RUN : interp %s | FileCheck %s + +func f(N: integer) => bits(N) +begin + let x: bits(N+1) = Zeros(N); + return x; +end + +func main() => integer +begin + - = f(32); + return 0; +end diff --git a/asllib/tests/language.t/Imqwb.asl b/asllib/tests/language.t/Imqwb.asl new file mode 100644 index 000000000..0d4a09ebd --- /dev/null +++ b/asllib/tests/language.t/Imqwb.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: (boolean, bits(32)) = (TRUE, Zeros(32)); + + return 0; +end diff --git a/asllib/tests/language.t/Imrhk.asl b/asllib/tests/language.t/Imrhk.asl new file mode 100644 index 000000000..fcf737489 --- /dev/null +++ b/asllib/tests/language.t/Imrhk.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s + +func constrained(N: integer{1..10}) => bits(N) +begin + return Zeros(N); +end + +func fixed(N: integer{10}) => bits(N) +begin + return Zeros(N); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Imszt.asl b/asllib/tests/language.t/Imszt.asl new file mode 100644 index 000000000..b5d48c43b --- /dev/null +++ b/asllib/tests/language.t/Imszt.asl @@ -0,0 +1,20 @@ +// RUN: interp %s | FileCheck %s + +config a = 10; + +func compiletime() => integer +begin + return 10; +end + +func noncompiletime() => integer +begin + return a; +end + +func main() => integer +begin + var b = compiletime(); + var c = noncompiletime(); + return 0; +end diff --git a/asllib/tests/language.t/Imtml.asl b/asllib/tests/language.t/Imtml.asl new file mode 100644 index 000000000..05ddf1c6a --- /dev/null +++ b/asllib/tests/language.t/Imtml.asl @@ -0,0 +1,17 @@ +// RUN: interp %s | FileCheck %s + +type a of integer; +type b subtypes a; +type c subtypes b; + +func test(aa: a) +begin + pass; +end + +func main() => integer +begin + var cc: c; + test(cc); + return 0; +end diff --git a/asllib/tests/language.t/Imtwl.asl b/asllib/tests/language.t/Imtwl.asl new file mode 100644 index 000000000..7c75cc750 --- /dev/null +++ b/asllib/tests/language.t/Imtwl.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +func a{N:integer{0..10}}(b: bits(N)) +begin + pass; +end + +func main() => integer +begin + a('1111 1100 00'); + return 0; +end diff --git a/asllib/tests/language.t/Imvnz.asl b/asllib/tests/language.t/Imvnz.asl new file mode 100644 index 000000000..2077c7894 --- /dev/null +++ b/asllib/tests/language.t/Imvnz.asl @@ -0,0 +1,10 @@ +// RUN: not interp %s | FileCheck %s + +var a: integer; + +func main() => integer +begin + var a: integer; + assert a == a; + return 0; +end diff --git a/asllib/tests/language.t/Imzxl.asl b/asllib/tests/language.t/Imzxl.asl new file mode 100644 index 000000000..523621464 --- /dev/null +++ b/asllib/tests/language.t/Imzxl.asl @@ -0,0 +1,13 @@ +// RUN: not interp %s | FileCheck %s + +type enum of enumeration{A, B}; + +func A() +begin + pass; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Inbct.asl b/asllib/tests/language.t/Inbct.asl new file mode 100644 index 000000000..f3627fdf1 --- /dev/null +++ b/asllib/tests/language.t/Inbct.asl @@ -0,0 +1,7 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here as many of these are tested in previous requirement tests +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Inhxt.asl b/asllib/tests/language.t/Inhxt.asl new file mode 100644 index 000000000..ff8f0d248 --- /dev/null +++ b/asllib/tests/language.t/Inhxt.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +config configWid: integer {32, 64} = 32; +config gExtra : integer {0, 8} = 0; + +var gReg: bits(configWid); +var gRegF: bits(configWid + gExtra); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Inlfd.asl b/asllib/tests/language.t/Inlfd.asl new file mode 100644 index 000000000..74854d2b6 --- /dev/null +++ b/asllib/tests/language.t/Inlfd.asl @@ -0,0 +1,11 @@ +// RUN : interp %s | FileCheck %s + +type a of integer; + +func main() => integer +begin + var aa: a; + var aaa: a = aa; + + return 0; +end diff --git a/asllib/tests/language.t/Intyz.asl b/asllib/tests/language.t/Intyz.asl new file mode 100644 index 000000000..d3d633840 --- /dev/null +++ b/asllib/tests/language.t/Intyz.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Inxjr.asl b/asllib/tests/language.t/Inxjr.asl new file mode 100644 index 000000000..9ae357941 --- /dev/null +++ b/asllib/tests/language.t/Inxjr.asl @@ -0,0 +1,20 @@ +// RUN: interp %s | FileCheck %s + +var counter: integer = 0; + +func nonexecution() => integer +begin + return 10; +end + +func execution() => integer +begin + counter = counter + 1; + return counter; +end + + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Inxkd.asl b/asllib/tests/language.t/Inxkd.asl new file mode 100644 index 000000000..49888bdb4 --- /dev/null +++ b/asllib/tests/language.t/Inxkd.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! There is nothing to test + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ipbpq.asl b/asllib/tests/language.t/Ipbpq.asl new file mode 100644 index 000000000..6d3c558c6 --- /dev/null +++ b/asllib/tests/language.t/Ipbpq.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s +// CHECK: TRUE +// CHECK-NEXT: TRUE +func main() => integer +begin + var c = '10010'; + + print((c IN '10x10')); + print((c IN '10 x 10')); + return 0; +end diff --git a/asllib/tests/language.t/Ipdkt.asl b/asllib/tests/language.t/Ipdkt.asl new file mode 100644 index 000000000..3e62baeef --- /dev/null +++ b/asllib/tests/language.t/Ipdkt.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func test(N: integer{}) => bits(N) +begin + return Zeros(N); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ipfgq.asl b/asllib/tests/language.t/Ipfgq.asl new file mode 100644 index 000000000..ddc14db91 --- /dev/null +++ b/asllib/tests/language.t/Ipfgq.asl @@ -0,0 +1,16 @@ +// RUN: not interp %s | FileCheck %s + +func a() +begin + pass; +end + +getter a => integer +begin + return 10; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ipfng.asl b/asllib/tests/language.t/Ipfng.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Ipfng.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ipgss.asl b/asllib/tests/language.t/Ipgss.asl new file mode 100644 index 000000000..5b1562714 --- /dev/null +++ b/asllib/tests/language.t/Ipgss.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 0 +// CHECK-NEXT: 0 + +func main() => integer +begin + var a: array[2] of integer; + print(a[0]); + print(a[1]); + return 0; +end diff --git a/asllib/tests/language.t/Ipkxk.asl b/asllib/tests/language.t/Ipkxk.asl new file mode 100644 index 000000000..1990cce31 --- /dev/null +++ b/asllib/tests/language.t/Ipkxk.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +let x: integer = 10; +let y: integer = x; +let z: integer = x + y; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ipqct.asl b/asllib/tests/language.t/Ipqct.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Ipqct.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iprpy.asl b/asllib/tests/language.t/Iprpy.asl new file mode 100644 index 000000000..01211e295 --- /dev/null +++ b/asllib/tests/language.t/Iprpy.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +type enum of enumeration{A, B}; + + +func main() => integer +begin + var a: boolean = A <= B; + + return 0; +end diff --git a/asllib/tests/language.t/Iqczx.asl b/asllib/tests/language.t/Iqczx.asl new file mode 100644 index 000000000..9b707e29b --- /dev/null +++ b/asllib/tests/language.t/Iqczx.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 0xFFFF +// CHECK-NEXT: 0xFFFF + +func main() => integer +begin + print('1111 1111 1111 1111'); + print('1111111111111111'); + return 0; +end diff --git a/asllib/tests/language.t/Iqdhp.asl b/asllib/tests/language.t/Iqdhp.asl new file mode 100644 index 000000000..848bfcc50 --- /dev/null +++ b/asllib/tests/language.t/Iqdhp.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var myData: bits(16) {[4] flag, + [3:0, 8:5] data, + [9:0] value} ='1111 0101 1010 0000'; + return 0; +end diff --git a/asllib/tests/language.t/Iqfzh.asl b/asllib/tests/language.t/Iqfzh.asl new file mode 100644 index 000000000..e4cc29208 --- /dev/null +++ b/asllib/tests/language.t/Iqfzh.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s +// CHECK: TRUE + +func main() => integer +begin + var a: bits(2); + print((a == '00')); + return 0; +end diff --git a/asllib/tests/language.t/Iqjnf.asl b/asllib/tests/language.t/Iqjnf.asl new file mode 100644 index 000000000..9887b4d6f --- /dev/null +++ b/asllib/tests/language.t/Iqjnf.asl @@ -0,0 +1,19 @@ +// RUN: interp %s | FileCheck %s + +getter a[] => integer +begin + return 10; +end + +getter b[value: integer] => integer +begin + return value; +end + +func main() => integer +begin + var aa = a[]; + var bb = b[10]; + + return 0; +end diff --git a/asllib/tests/language.t/Iqjtn_a.asl b/asllib/tests/language.t/Iqjtn_a.asl new file mode 100644 index 000000000..47ec8263a --- /dev/null +++ b/asllib/tests/language.t/Iqjtn_a.asl @@ -0,0 +1,15 @@ +// RUN: not interp %s | FileCheck %s + +var globe_var: integer = 0; + +func write_to_var(a: integer) => integer +begin + globe_var = a; + return a; +end + +func main() => integer +begin + var a: (integer, integer) = (write_to_var(1), write_to_var(2)); + return 0; +end diff --git a/asllib/tests/language.t/Iqjtn_b.asl b/asllib/tests/language.t/Iqjtn_b.asl new file mode 100644 index 000000000..3b56d4e69 --- /dev/null +++ b/asllib/tests/language.t/Iqjtn_b.asl @@ -0,0 +1,15 @@ +// RUN: not interp %s | FileCheck %s + +var globe_var: integer = 0; + +func write_to_var(a: integer) => integer +begin + globe_var = a; + return a; +end + +func main() => integer +begin + var a: integer = write_to_var(10) + globe_var; + return 0; +end diff --git a/asllib/tests/language.t/Iqjtn_c.asl b/asllib/tests/language.t/Iqjtn_c.asl new file mode 100644 index 000000000..9f5414267 --- /dev/null +++ b/asllib/tests/language.t/Iqjtn_c.asl @@ -0,0 +1,24 @@ +// RUN: not interp %s 2>&1| FileCheck %s +// CHECK-NOT: Exception + +var globe_var: integer = 0; + +func write_to_var(a: integer) => integer +begin + globe_var = a; + return a; +end + +type exc of exception{err_code:integer}; + +func throwing() => integer +begin + throw exc{err_code=0}; + return 10; +end + +func main() => integer +begin + var a: integer = write_to_var(10) + throwing(); + return 0; +end diff --git a/asllib/tests/language.t/Iqjtn_d.asl b/asllib/tests/language.t/Iqjtn_d.asl new file mode 100644 index 000000000..effe85b50 --- /dev/null +++ b/asllib/tests/language.t/Iqjtn_d.asl @@ -0,0 +1,16 @@ +// RUN: not interp %s 2>&1| FileCheck %s +// CHECK-NOT: Exception + +type exc of exception{err_code:integer}; + +func throwing() => integer +begin + throw exc{err_code=0}; + return 10; +end + +func main() => integer +begin + var a: integer = throwing() + throwing(); + return 0; +end diff --git a/asllib/tests/language.t/Iqmwt.asl b/asllib/tests/language.t/Iqmwt.asl new file mode 100644 index 000000000..a40b57586 --- /dev/null +++ b/asllib/tests/language.t/Iqmwt.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +type enum of enumeration{A, B}; +type enum2 subtypes enum; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iqnsd.asl b/asllib/tests/language.t/Iqnsd.asl new file mode 100644 index 000000000..357d89547 --- /dev/null +++ b/asllib/tests/language.t/Iqnsd.asl @@ -0,0 +1,25 @@ +// RUN: interp %s | FileCheck %s + +type widTy of integer {4,8}; + +func callCB {N: widTy} (arg1: bits(N)) => bits(N) +begin + // The formal argument is a constrained width bitvector + // whose determined width N is IN {4,8} + // For checking actual arguments, the domain of arg1 is + // domain(bits(4)) union domain(bits(8)) + return arg1; +end + +func bitvector(N: widTy) +begin + var CB1: (bits(-: widTy), integer) = (Zeros(N), 0); + // CB1 is a tuple whose first element is a constrained width bitvector + // whose width is implicitly determined by the width of the bitvector + // returned by the call to Zeros, i.e. N. +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iqrxp.asl b/asllib/tests/language.t/Iqrxp.asl new file mode 100644 index 000000000..3f9562bd2 --- /dev/null +++ b/asllib/tests/language.t/Iqrxp.asl @@ -0,0 +1,27 @@ +// RUN: interp %s | FileCheck %s +// CHECK: HELLO +// CHECK-NEXT: WORLD +// CHECK-NEXT: HELLO +// CHECK-NEXT: HELLO +// CHECK-NEXT: WORLD + +func write_hello() => boolean +begin + print("HELLO"); + return TRUE; +end + +func write_world() => boolean +begin + print("WORLD"); + return TRUE; +end + +func main() => integer +begin + var a: boolean = write_hello() && write_world(); + var b: boolean = write_hello() || write_world(); + var c: boolean = write_hello() --> write_world(); + + return 0; +end diff --git a/asllib/tests/language.t/Iqslr.asl b/asllib/tests/language.t/Iqslr.asl new file mode 100644 index 000000000..4affa846f --- /dev/null +++ b/asllib/tests/language.t/Iqslr.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! This will be tested in section 9 + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Irbzw.asl b/asllib/tests/language.t/Irbzw.asl new file mode 100644 index 000000000..68ad0fdb6 --- /dev/null +++ b/asllib/tests/language.t/Irbzw.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! How would I test this? + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Irkbv.asl b/asllib/tests/language.t/Irkbv.asl new file mode 100644 index 000000000..96aa18f71 --- /dev/null +++ b/asllib/tests/language.t/Irkbv.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s + +func test(a: integer{}) +begin + pass; +end + +func test2{a: integer}(b: bits(a)) +begin + test(a); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Irqqb.asl b/asllib/tests/language.t/Irqqb.asl new file mode 100644 index 000000000..d43f079dc --- /dev/null +++ b/asllib/tests/language.t/Irqqb.asl @@ -0,0 +1,19 @@ +// RUN: interp %s | FileCheck %s + +func testParams{K : integer} (N: integer, M: integer, L: integer, lbv: bits(L), kbv: bits(K)) => bits(N) +begin + var kBits: bits(K); // legal + // K is a parameter, so it is an under-constrained integer + var nBits: bits(N); // legal + // N is a parameter because it is a formal argument and is used in the type of the bitvector of a return type, so it is an under-constrained integer + var lBits: bits(L); // legal + // L is a parameter because it is a formal argument and is used in the type of the bitvector of a formal argument, so it is an under-constrained integer + // var mBits: bits(M); // ILLEGAL + // M is not a parameter so it is an unconstrained integer + return nBits; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Irxlg.asl b/asllib/tests/language.t/Irxlg.asl new file mode 100644 index 000000000..70076ff2e --- /dev/null +++ b/asllib/tests/language.t/Irxlg.asl @@ -0,0 +1,26 @@ +// RUN: interp %s | FileCheck %s +// CHECK: FALSE +// CHECK-NEXT: TRUE +// CHECK-NEXT: 0x5 +// CHECK-NEXT: 0x4 +// CHECK-NEXT: 0x2 +// CHECK-NEXT: 0x1 +// CHECK-NEXT: 0x1 + + +func main() => integer +begin + var a : bits(3) = '101'; + var b : bits(3) = '100'; + + print((a == b)); // Legal + print((a != b)); // Legal + print((a OR b)); // Legal + print((a AND b)); // Legal + print((NOT a)); // Legal + print((a EOR b)); // Legal + print((a + b)); // Legal + print((a - b)); // Legal + + return 0; +end diff --git a/asllib/tests/language.t/Iryrp.asl b/asllib/tests/language.t/Iryrp.asl new file mode 100644 index 000000000..1c593aec4 --- /dev/null +++ b/asllib/tests/language.t/Iryrp.asl @@ -0,0 +1,7 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var intWid: integer {32,64} = 32; + return 0; +end diff --git a/asllib/tests/language.t/Isbck.asl b/asllib/tests/language.t/Isbck.asl new file mode 100644 index 000000000..e6b7e0221 --- /dev/null +++ b/asllib/tests/language.t/Isbck.asl @@ -0,0 +1,24 @@ +// RUN: interp %s | FileCheck %s + +type T1 of integer; // the named type `T1` whose structure is integer +type T2 of integer; // the named type `T2` whose structure is integer +type pairT of (integer, T1); // the named type `pairT` whose structure is (integer, integer) + +func tsub01() +begin + var dataT1: T1; + var pair: pairT = (1,dataT1); + // legal since right hand side has anonymous, non-primitive type (integer, T1) + let dataAsInt: integer = dataT1; + pair = (1, dataAsInt); + // legal since right hand side has anonymous, primitive type (integer, integer) + let dataT2: T2 = 10; + // pair = (1, dataT2); + // illegal since right hand side has anonymous, non-primitive type (integer, T2) + // which does not subtype-satisfy named type pairT +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Isbfk.asl b/asllib/tests/language.t/Isbfk.asl new file mode 100644 index 000000000..6e4c73677 --- /dev/null +++ b/asllib/tests/language.t/Isbfk.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer{0..10} = 5; + + var b: integer{5..6} = a + 1 as integer{5..6}; + + return 0; +end diff --git a/asllib/tests/language.t/Isbwr.asl b/asllib/tests/language.t/Isbwr.asl new file mode 100644 index 000000000..05040a071 --- /dev/null +++ b/asllib/tests/language.t/Isbwr.asl @@ -0,0 +1,13 @@ +// RUN: interp %s | FileCheck %s + +func test(a: bits({0..3})) +begin + pass; +end + +func main() => integer +begin + var a: bits({1..3}) = '11'; + test(a); + return 0; +end diff --git a/asllib/tests/language.t/Iscbx.asl b/asllib/tests/language.t/Iscbx.asl new file mode 100644 index 000000000..584f80f2f --- /dev/null +++ b/asllib/tests/language.t/Iscbx.asl @@ -0,0 +1,9 @@ +// RUN: not interp %s | FileCheck %s + +config a: integer = 4; + +func main() => integer +begin + var b: bits(a); + return 0; +end diff --git a/asllib/tests/language.t/Iscly.asl b/asllib/tests/language.t/Iscly.asl new file mode 100644 index 000000000..87a7ff9d1 --- /dev/null +++ b/asllib/tests/language.t/Iscly.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var func: integer; + return 0; +end diff --git a/asllib/tests/language.t/Isctb.asl b/asllib/tests/language.t/Isctb.asl new file mode 100644 index 000000000..a4f3ba29c --- /dev/null +++ b/asllib/tests/language.t/Isctb.asl @@ -0,0 +1,33 @@ +// RUN: not interp %s | FileCheck %s + +var b: integer; + +type ty of integer; + +getter a[] => integer +begin + return b; +end + +setter a[] = value: integer +begin + b = value; + return; +end + + +getter a[] => ty +begin + return b; +end + +setter a[] = value: ty +begin + b = value; + return; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Isjdc.asl b/asllib/tests/language.t/Isjdc.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Isjdc.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ismmh.asl b/asllib/tests/language.t/Ismmh.asl new file mode 100644 index 000000000..207b4bc8a --- /dev/null +++ b/asllib/tests/language.t/Ismmh.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +type c subtypes b; +type b subtypes a; +type a of integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Isqvv.asl b/asllib/tests/language.t/Isqvv.asl new file mode 100644 index 000000000..a99eab5ba --- /dev/null +++ b/asllib/tests/language.t/Isqvv.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: bits(0) = ''; + var b: bits(4) = '1101'; + return 0; +end diff --git a/asllib/tests/language.t/Issxj.asl b/asllib/tests/language.t/Issxj.asl new file mode 100644 index 000000000..1ace19090 --- /dev/null +++ b/asllib/tests/language.t/Issxj.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var (a, -) = (1, 2); + + return 0; +end diff --git a/asllib/tests/language.t/Iszvf.asl b/asllib/tests/language.t/Iszvf.asl new file mode 100644 index 000000000..dda9c788e --- /dev/null +++ b/asllib/tests/language.t/Iszvf.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: bits(4); + var b = a as bits(4); + var c = a as bits({0..10}); + return 0; +end diff --git a/asllib/tests/language.t/Itbhh.asl b/asllib/tests/language.t/Itbhh.asl new file mode 100644 index 000000000..d758c9466 --- /dev/null +++ b/asllib/tests/language.t/Itbhh.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! How would I be able to test this? + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Itcst.asl b/asllib/tests/language.t/Itcst.asl new file mode 100644 index 000000000..f7e899ac8 --- /dev/null +++ b/asllib/tests/language.t/Itcst.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +config a: integer = 1; +var b: bits(a as integer{0..100}); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Itfps.asl b/asllib/tests/language.t/Itfps.asl new file mode 100644 index 000000000..87f6c4523 --- /dev/null +++ b/asllib/tests/language.t/Itfps.asl @@ -0,0 +1,21 @@ +// RUN: interp %s | FileCheck %s + +type a of integer; + +type b of record{a: integer}; + +type a_record_ty of record { + flag : boolean, + count: integer, + data : bit +}; + +func main() => integer +begin + var a_record = a_record_ty { + flag = FALSE, + count = 0, + data = '0' + }; + return 0; +end diff --git a/asllib/tests/language.t/Itfsz.asl b/asllib/tests/language.t/Itfsz.asl new file mode 100644 index 000000000..8123e193b --- /dev/null +++ b/asllib/tests/language.t/Itfsz.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +var a = '1111 1111'; + +func main() => integer +begin + var b = a[0]; + var c = a[3:1]; + var d = a[3:1, 6:5]; + + return 0; +end diff --git a/asllib/tests/language.t/Itqgh.asl b/asllib/tests/language.t/Itqgh.asl new file mode 100644 index 000000000..d70c1419d --- /dev/null +++ b/asllib/tests/language.t/Itqgh.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +func test(a: integer) => bits(a) +begin + var b: bits(a); + return b; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Itsxl.asl b/asllib/tests/language.t/Itsxl.asl new file mode 100644 index 000000000..e47bc8504 --- /dev/null +++ b/asllib/tests/language.t/Itsxl.asl @@ -0,0 +1,13 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 10 +// CHECK-NEXT: 20 + +var a = (10, 20); + +func main() => integer +begin + print(a.item0); + print(a.item1); + + return 0; +end diff --git a/asllib/tests/language.t/Itvdt.asl b/asllib/tests/language.t/Itvdt.asl new file mode 100644 index 000000000..b580ce6a4 --- /dev/null +++ b/asllib/tests/language.t/Itvdt.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! Not sure what this means + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Itwjf.asl b/asllib/tests/language.t/Itwjf.asl new file mode 100644 index 000000000..cf98f607c --- /dev/null +++ b/asllib/tests/language.t/Itwjf.asl @@ -0,0 +1,18 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 5 +// CHECK-NEXT: 5 +// CHECK-NEXT: 5 + +func a(aa: integer) +begin + print(aa); +end + +func main() => integer +begin + var bb = 5; + print(bb); + a(bb); + print(bb); + return 0; +end diff --git a/asllib/tests/language.t/Itwtz.asl b/asllib/tests/language.t/Itwtz.asl new file mode 100644 index 000000000..28a870add --- /dev/null +++ b/asllib/tests/language.t/Itwtz.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var a: bits(2); + var b: bits(4) = a; + return 0; +end diff --git a/asllib/tests/language.t/Itzvj_a.asl b/asllib/tests/language.t/Itzvj_a.asl new file mode 100644 index 000000000..3420a07a1 --- /dev/null +++ b/asllib/tests/language.t/Itzvj_a.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +func invalid() => bits(integer{4, 8}) +begin + return '0000'; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Itzvj_b.asl b/asllib/tests/language.t/Itzvj_b.asl new file mode 100644 index 000000000..059c25f5c --- /dev/null +++ b/asllib/tests/language.t/Itzvj_b.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func valid{N:integer{4, 8}}(a: bits(N)) => bits(N) +begin + return a; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ivfdp.asl b/asllib/tests/language.t/Ivfdp.asl new file mode 100644 index 000000000..ab9961de4 --- /dev/null +++ b/asllib/tests/language.t/Ivfdp.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s + +func test{N:integer{5..10}}(a: bits(N)) => integer{N} +begin + return N; +end + +func main() => integer +begin + var a = test('1111'); + return 0; +end diff --git a/asllib/tests/language.t/Ivgsp.asl b/asllib/tests/language.t/Ivgsp.asl new file mode 100644 index 000000000..51a13b96f --- /dev/null +++ b/asllib/tests/language.t/Ivgsp.asl @@ -0,0 +1,19 @@ +// RUN: interp %s | FileCheck %s + +func a() => integer +begin + return 10; +end + +func a() => string +begin + return "10"; +end + +func main() => integer +begin + var b: integer = a(); + var c: string = a(); + + return 0; +end diff --git a/asllib/tests/language.t/Ivmkf.asl b/asllib/tests/language.t/Ivmkf.asl new file mode 100644 index 000000000..39705644e --- /dev/null +++ b/asllib/tests/language.t/Ivmkf.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s +// CHECK: TRUE + +func main() => integer +begin + var a: bits(4) = '1000'; + print((a IN '1xxx')); + return 0; +end diff --git a/asllib/tests/language.t/Ivmzf.asl b/asllib/tests/language.t/Ivmzf.asl new file mode 100644 index 000000000..4bea3cb52 --- /dev/null +++ b/asllib/tests/language.t/Ivmzf.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer{10} = (3 + 2) * 2; + + return 0; +end diff --git a/asllib/tests/language.t/Ivpst.asl b/asllib/tests/language.t/Ivpst.asl new file mode 100644 index 000000000..15b916310 --- /dev/null +++ b/asllib/tests/language.t/Ivpst.asl @@ -0,0 +1,15 @@ +// RUN: not interp %s | FileCheck %s + +func a(n: integer{}, b: bits(n)) +begin + if (n == 4) then + var c: bits(4) = b; + else + pass; + end +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ivqhq.asl b/asllib/tests/language.t/Ivqhq.asl new file mode 100644 index 000000000..924029715 --- /dev/null +++ b/asllib/tests/language.t/Ivqhq.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to be tested + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ivqlx.asl b/asllib/tests/language.t/Ivqlx.asl new file mode 100644 index 000000000..49f054ece --- /dev/null +++ b/asllib/tests/language.t/Ivqlx.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a = 10; + var b = 5; + var c = (a + b) as integer{10..20}; + return 0; +end diff --git a/asllib/tests/language.t/Ivylk.asl b/asllib/tests/language.t/Ivylk.asl new file mode 100644 index 000000000..77c677e72 --- /dev/null +++ b/asllib/tests/language.t/Ivylk.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +var only: bits(-: integer{1,2}) = Zeros(1); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iwbwl.asl b/asllib/tests/language.t/Iwbwl.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Iwbwl.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iwdmd.asl b/asllib/tests/language.t/Iwdmd.asl new file mode 100644 index 000000000..8b966c1b4 --- /dev/null +++ b/asllib/tests/language.t/Iwdmd.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +var a: bits(8) = '11110000'; +var b: bits(8) = '1111 0000'; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iwhlv.asl b/asllib/tests/language.t/Iwhlv.asl new file mode 100644 index 000000000..a37df9b98 --- /dev/null +++ b/asllib/tests/language.t/Iwhlv.asl @@ -0,0 +1,20 @@ +// RUN: interp %s | FileCheck %s + +var _a : integer; + +getter a => integer +begin + return _a; +end + +setter a = value: integer +begin + _a = value; + return; +end + +func main() => integer +begin + a = 5; + return 0; +end diff --git a/asllib/tests/language.t/Iwjcl.asl b/asllib/tests/language.t/Iwjcl.asl new file mode 100644 index 000000000..f40c4c11a --- /dev/null +++ b/asllib/tests/language.t/Iwjcl.asl @@ -0,0 +1,14 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 1 +// CHECK-NEXT: 2 + +func main() => integer +begin + var a: real = 1.5; + var b: integer = RoundDown(a); + var c: integer = RoundUp(a); + + print(b); + print(c); + return 0; +end diff --git a/asllib/tests/language.t/Iwlnm.asl b/asllib/tests/language.t/Iwlnm.asl new file mode 100644 index 000000000..35bc3b1f3 --- /dev/null +++ b/asllib/tests/language.t/Iwlnm.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +var a = '1xx1'; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iwlpj.asl b/asllib/tests/language.t/Iwlpj.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Iwlpj.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iwvgg.asl b/asllib/tests/language.t/Iwvgg.asl new file mode 100644 index 000000000..2b2b8e504 --- /dev/null +++ b/asllib/tests/language.t/Iwvgg.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +config a = 10; + +type b of integer; +type c of bits(a); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iwvqz.asl b/asllib/tests/language.t/Iwvqz.asl new file mode 100644 index 000000000..3fd616063 --- /dev/null +++ b/asllib/tests/language.t/Iwvqz.asl @@ -0,0 +1,7 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iwxgp.asl b/asllib/tests/language.t/Iwxgp.asl new file mode 100644 index 000000000..8aeb56252 --- /dev/null +++ b/asllib/tests/language.t/Iwxgp.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + assert(FALSE); + return 0; +end diff --git a/asllib/tests/language.t/Iwykz.asl b/asllib/tests/language.t/Iwykz.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Iwykz.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iwzkm.asl b/asllib/tests/language.t/Iwzkm.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Iwzkm.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ixfpv.asl b/asllib/tests/language.t/Ixfpv.asl new file mode 100644 index 000000000..7711f9465 --- /dev/null +++ b/asllib/tests/language.t/Ixfpv.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s +// CHECK: 10 +// CHECK-NEXT: 20 + +var a = (10, 20); + +func main() => integer +begin + var c = a.item2; + + return 0; +end diff --git a/asllib/tests/language.t/Ixpdt.asl b/asllib/tests/language.t/Ixpdt.asl new file mode 100644 index 000000000..74faddebb --- /dev/null +++ b/asllib/tests/language.t/Ixpdt.asl @@ -0,0 +1,7 @@ +// RUN : interp %s | FileCheck %s + +// ! Not sure what this means +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ixsfy.asl b/asllib/tests/language.t/Ixsfy.asl new file mode 100644 index 000000000..571219230 --- /dev/null +++ b/asllib/tests/language.t/Ixsfy.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +config a = 10; + +func main() => integer +begin + var b = 10 + 10; + var c = 10 + a; + return 0; +end diff --git a/asllib/tests/language.t/Ixvbg.asl b/asllib/tests/language.t/Ixvbg.asl new file mode 100644 index 000000000..8ab6f8cf6 --- /dev/null +++ b/asllib/tests/language.t/Ixvbg.asl @@ -0,0 +1,17 @@ +// RUN: interp %s | FileCheck %s + +func widCheck {M: integer} (N: integer, b: bits(M)) => bits(N) +begin + if (N==M) then + return b as bits(N); // Inserts execution-time check + else + return Zeros(N); + end +end + +func main() => integer +begin + var a: bits(10); + var b = widCheck(10, a); + return 0; +end diff --git a/asllib/tests/language.t/Ixykc.asl b/asllib/tests/language.t/Ixykc.asl new file mode 100644 index 000000000..e3408ece1 --- /dev/null +++ b/asllib/tests/language.t/Ixykc.asl @@ -0,0 +1,15 @@ +// RUN: interp %s | FileCheck %s + +var nonexecutiontime : integer = 10 + 10; +var executiontime : integer = test() + 1; + +func test() => integer +begin + nonexecutiontime = nonexecutiontime + 1; + return nonexecutiontime; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iybgl.asl b/asllib/tests/language.t/Iybgl.asl new file mode 100644 index 000000000..deab6624b --- /dev/null +++ b/asllib/tests/language.t/Iybgl.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +config wid = 10; + +type b of bits(wid); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iybhf.asl b/asllib/tests/language.t/Iybhf.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Iybhf.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iydbr.asl b/asllib/tests/language.t/Iydbr.asl new file mode 100644 index 000000000..a74fc11a4 --- /dev/null +++ b/asllib/tests/language.t/Iydbr.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s +// CHECK-NOT: 5 + +func main() => integer +begin + for x = 10 to 1 do + print(x); + end + return 0; +end diff --git a/asllib/tests/language.t/Iyftf.asl b/asllib/tests/language.t/Iyftf.asl new file mode 100644 index 000000000..cd8105a7d --- /dev/null +++ b/asllib/tests/language.t/Iyftf.asl @@ -0,0 +1,7 @@ +// RUN: interp %s | FileCheck %s + +// ! There is nothing to test +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iyhml.asl b/asllib/tests/language.t/Iyhml.asl new file mode 100644 index 000000000..bd3aab3c1 --- /dev/null +++ b/asllib/tests/language.t/Iyhml.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +func test(a: integer{0..10}, b: integer{4..7}) +begin + var c: integer{0..70} = a * b; + var d: integer{-7..6} = a - b; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iyhrp.asl b/asllib/tests/language.t/Iyhrp.asl new file mode 100644 index 000000000..3e7ce74c4 --- /dev/null +++ b/asllib/tests/language.t/Iyhrp.asl @@ -0,0 +1,14 @@ +// RUN: not interp %s | FileCheck %s + +func f(x: integer {2, 4}, y: integer {-1..1}) +begin + let z = x DIV y; // Illegal + // type of z involves constraints with division by zero + // let ok = x DIV (y as {-1,1}); + // // legal but incurs runtime check +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iyjbb.asl b/asllib/tests/language.t/Iyjbb.asl new file mode 100644 index 000000000..ebd8cbc57 --- /dev/null +++ b/asllib/tests/language.t/Iyjbb.asl @@ -0,0 +1,18 @@ +// RUN: interp %s | FileCheck %s + +func CTCs(x: integer) +begin + // var A: bit; + // let B: integer = A as integer; // ILLEGAL + // bit cannot be an integer + let C: integer {8,16} = x as {8,16}; + // The execution-time check is `x IN {8,16}` + let D: integer {8,16} = C as {8,16}; + // Type checker can determine that C is already an integer {8,16} + // so no further check is required +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iyklf.asl b/asllib/tests/language.t/Iyklf.asl new file mode 100644 index 000000000..c382e1041 --- /dev/null +++ b/asllib/tests/language.t/Iyklf.asl @@ -0,0 +1,19 @@ +// RUN: interp %s | FileCheck %s +// CHECK: a + +type a of exception{}; +type b subtypes a; + +func main() => integer +begin + try + try + throw b{}; + catch + when b => throw; + end + catch + when a => print("a"); + end + return 0; +end diff --git a/asllib/tests/language.t/Iymhx.asl b/asllib/tests/language.t/Iymhx.asl new file mode 100644 index 000000000..189a85fd0 --- /dev/null +++ b/asllib/tests/language.t/Iymhx.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +func test{M: integer}(a: bits(M + 1)) => bits(M) +begin + return a[M:0]; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iymrt.asl b/asllib/tests/language.t/Iymrt.asl new file mode 100644 index 000000000..3d5d145c9 --- /dev/null +++ b/asllib/tests/language.t/Iymrt.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! This is implementation specific so nothing concrete to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iypxd.asl b/asllib/tests/language.t/Iypxd.asl new file mode 100644 index 000000000..a1e2c6c6e --- /dev/null +++ b/asllib/tests/language.t/Iypxd.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +let (a, b) = (10, 10); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iywkg.asl b/asllib/tests/language.t/Iywkg.asl new file mode 100644 index 000000000..1d1aefc2b --- /dev/null +++ b/asllib/tests/language.t/Iywkg.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! This is implementation specific + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iyxsy.asl b/asllib/tests/language.t/Iyxsy.asl new file mode 100644 index 000000000..7c243d7fa --- /dev/null +++ b/asllib/tests/language.t/Iyxsy.asl @@ -0,0 +1,23 @@ +// RUN: interp %s | FileCheck %s + +func primitiveConstraint(value: integer {8,16}) +begin + let j = value*(1+1); + // The expression (1+1) is a compile-time constant + // hence the type of (1+1) is integer {2} + // and j is of type integer {16,32} + var factor: integer = 2; // factor is of type integer + // Note that without the explicit type, factor would be integer {2} + let k = value * factor; // k is of type integer + // since factor is unconstrained + let c = if (factor==2) then value * 2 else value; + // The 'then' subexpression is integer {16,32} + // The 'else' subexpression is integer {8,16} + // The conditional expression (and hence c) + // is of type integer {8,16,32} +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iyyqx.asl b/asllib/tests/language.t/Iyyqx.asl new file mode 100644 index 000000000..5cde7f83f --- /dev/null +++ b/asllib/tests/language.t/Iyyqx.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +getter a => integer +begin + return 10; +end + +func main() => integer +begin + var b = a; + return 0; +end diff --git a/asllib/tests/language.t/Izddj.asl b/asllib/tests/language.t/Izddj.asl new file mode 100644 index 000000000..bb3da1082 --- /dev/null +++ b/asllib/tests/language.t/Izddj.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +func under_constrained(a: integer{}) +begin + pass; +end + +func main() => integer +begin + under_constrained(10); + return 0; +end diff --git a/asllib/tests/language.t/Izlbw.asl b/asllib/tests/language.t/Izlbw.asl new file mode 100644 index 000000000..12e1f2060 --- /dev/null +++ b/asllib/tests/language.t/Izlbw.asl @@ -0,0 +1,7 @@ +// RUN : interp %s | FileCheck %s + +// ! This is not implemented +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Izlzc.asl b/asllib/tests/language.t/Izlzc.asl new file mode 100644 index 000000000..b8e416c65 --- /dev/null +++ b/asllib/tests/language.t/Izlzc.asl @@ -0,0 +1,14 @@ +// RUN: not interp %s | FileCheck %s + +func illegal_constraints {N: integer {8,16,32}} ( + arg0: bits(N as {8,16,32}), + arg1: bits((N+1) as {9,17}) +) +begin + return; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Izpwm.asl b/asllib/tests/language.t/Izpwm.asl new file mode 100644 index 000000000..0ff678405 --- /dev/null +++ b/asllib/tests/language.t/Izpwm.asl @@ -0,0 +1,18 @@ +// RUN: interp %s | FileCheck %s + +config a = 10; + +func compiletime() => integer +begin + return 10; +end + +func noncompiletime() => integer +begin + return a; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Iztmq.asl b/asllib/tests/language.t/Iztmq.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Iztmq.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rbdjk.asl b/asllib/tests/language.t/Rbdjk.asl new file mode 100644 index 000000000..b22c20084 --- /dev/null +++ b/asllib/tests/language.t/Rbdjk.asl @@ -0,0 +1,10 @@ +// RUN: not interp %s | FileCheck %s + +type a of bits(4) { + [1:3] b +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rbfwl.asl b/asllib/tests/language.t/Rbfwl.asl new file mode 100644 index 000000000..e1b85712c --- /dev/null +++ b/asllib/tests/language.t/Rbfwl.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + let a = 10; + + return 0; +end diff --git a/asllib/tests/language.t/Rbhmy.asl b/asllib/tests/language.t/Rbhmy.asl new file mode 100644 index 000000000..f5eac90a4 --- /dev/null +++ b/asllib/tests/language.t/Rbhmy.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +config a: integer = 10; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rbknt.asl b/asllib/tests/language.t/Rbknt.asl new file mode 100644 index 000000000..3a7168df2 --- /dev/null +++ b/asllib/tests/language.t/Rbknt.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +config b: integer = 1; + +func main() => integer +begin + var a = 1 + b; + return 0; +end diff --git a/asllib/tests/language.t/Rbncy.asl b/asllib/tests/language.t/Rbncy.asl new file mode 100644 index 000000000..6074ae00a --- /dev/null +++ b/asllib/tests/language.t/Rbncy.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 1000 +// CHECK-NEXT: 32 + +func main() => integer +begin + print(exp_real(10, 3)); + print(exp_real(2, 5)); + return 0; +end diff --git a/asllib/tests/language.t/Rbqjg.asl b/asllib/tests/language.t/Rbqjg.asl new file mode 100644 index 000000000..0da00f7bf --- /dev/null +++ b/asllib/tests/language.t/Rbqjg.asl @@ -0,0 +1,13 @@ +// RUN: interp %s | FileCheck %s + +getter a => integer +begin + return 10; +end + +func main() => integer +begin + var b: integer = a; + + return 0; +end diff --git a/asllib/tests/language.t/Rbrcj.asl b/asllib/tests/language.t/Rbrcj.asl new file mode 100644 index 000000000..d74e895eb --- /dev/null +++ b/asllib/tests/language.t/Rbrcj.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + throw; + return 0; +end diff --git a/asllib/tests/language.t/Rbrcm.asl b/asllib/tests/language.t/Rbrcm.asl new file mode 100644 index 000000000..a8cc25ce2 --- /dev/null +++ b/asllib/tests/language.t/Rbrcm.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s +// CHECK: TRUE + +func main() => integer +begin + var T: boolean = [ '1111', '0000' ] == '11110000'; + + print(T); + return 0; +end diff --git a/asllib/tests/language.t/Rbsmk.asl b/asllib/tests/language.t/Rbsmk.asl new file mode 100644 index 000000000..f04d41cb0 --- /dev/null +++ b/asllib/tests/language.t/Rbsmk.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +func length(a: integer) +begin + var b: integer{0..a}; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rbsqr.asl b/asllib/tests/language.t/Rbsqr.asl new file mode 100644 index 000000000..1d39b771a --- /dev/null +++ b/asllib/tests/language.t/Rbsqr.asl @@ -0,0 +1,9 @@ +// RUN: not interp %s | FileCheck %s + +config a : integer = 10; + +func main() => integer +begin + a = 5; + return 0; +end diff --git a/asllib/tests/language.t/Rbwdx.asl b/asllib/tests/language.t/Rbwdx.asl new file mode 100644 index 000000000..1c8008163 --- /dev/null +++ b/asllib/tests/language.t/Rbwdx.asl @@ -0,0 +1,25 @@ +// RUN: interp %s | FileCheck %s + +type a of exception{ + b: integer +}; + +type BAD_OPCODE of exception{}; +type UNDEFINED_OPCODE of exception {reason: string, opcode: bits(16)}; + +func test() +begin + throw UNDEFINED_OPCODE{reason="Undefined", opcode='0111011101110111'}; +end + +func main() => integer +begin + var aa : a; + + aa.b = 10; + + var bb : integer = aa.b; + + print(bb); + return 0; +end diff --git a/asllib/tests/language.t/Rbzkw.asl b/asllib/tests/language.t/Rbzkw.asl new file mode 100644 index 000000000..d9696d216 --- /dev/null +++ b/asllib/tests/language.t/Rbzkw.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func test(a: integer{}, b: integer{0..3}) +begin + var c = a + b; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rccvd.asl b/asllib/tests/language.t/Rccvd.asl new file mode 100644 index 000000000..869c886fe --- /dev/null +++ b/asllib/tests/language.t/Rccvd.asl @@ -0,0 +1,21 @@ +// RUN: interp %s | FileCheck %s + +var global: integer {4,8}; + +func foo {parm: integer} ( + arg0: bits(global), + arg1: bits(parm+global), + arg2: (integer, bits(parm)) +) +begin + // The type of the second part of the tuple `arg2` is + // parameter-defining for `parm`, without which the + // declaration would be illegal. + // None of the other formals are parameter-defining. + return; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rcftd.asl b/asllib/tests/language.t/Rcftd.asl new file mode 100644 index 000000000..8646befc3 --- /dev/null +++ b/asllib/tests/language.t/Rcftd.asl @@ -0,0 +1,17 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 4 +// CHECK-NEXT: -4 +// CHECK-NEXT: 4 + +func main() => integer +begin + var a: integer{4..10}; + var b: integer{-10..-4}; + var c: integer{-10..-4, 4..10}; + + print(a); + print(b); + print(c); + + return 0; +end diff --git a/asllib/tests/language.t/Rcgdg.asl b/asllib/tests/language.t/Rcgdg.asl new file mode 100644 index 000000000..dc0f5b55a --- /dev/null +++ b/asllib/tests/language.t/Rcgdg.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +type a of bits(4) { + [0] b +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rcgwr.asl b/asllib/tests/language.t/Rcgwr.asl new file mode 100644 index 000000000..580d7a0d4 --- /dev/null +++ b/asllib/tests/language.t/Rcgwr.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +type a of (integer); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rchbw.asl b/asllib/tests/language.t/Rchbw.asl new file mode 100644 index 000000000..e2fd45a3e --- /dev/null +++ b/asllib/tests/language.t/Rchbw.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +type a of bits(5) { + [3:0] a, + [3:1] b +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rchkr.asl b/asllib/tests/language.t/Rchkr.asl new file mode 100644 index 000000000..4bda90479 --- /dev/null +++ b/asllib/tests/language.t/Rchkr.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +type a of exception{ + b: integer, + b: integer +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rchth.asl b/asllib/tests/language.t/Rchth.asl new file mode 100644 index 000000000..d019ef1af --- /dev/null +++ b/asllib/tests/language.t/Rchth.asl @@ -0,0 +1,6 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + return 1; +end diff --git a/asllib/tests/language.t/Rckgp.asl b/asllib/tests/language.t/Rckgp.asl new file mode 100644 index 000000000..8231f61c6 --- /dev/null +++ b/asllib/tests/language.t/Rckgp.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +constant a = 10 + 10; +config b = 10 + 10; +var c = a + b; +let d = b + a; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rclqj.asl b/asllib/tests/language.t/Rclqj.asl new file mode 100644 index 000000000..d8bb91628 --- /dev/null +++ b/asllib/tests/language.t/Rclqj.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var - = 10; + + return 0; +end diff --git a/asllib/tests/language.t/Rcnhb.asl b/asllib/tests/language.t/Rcnhb.asl new file mode 100644 index 000000000..0a0883fbd --- /dev/null +++ b/asllib/tests/language.t/Rcnhb.asl @@ -0,0 +1,10 @@ +// RUN: not interp %s | FileCheck %s + +type a of bits(5) { + [3:0, 3:1] b +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rcpck.asl b/asllib/tests/language.t/Rcpck.asl new file mode 100644 index 000000000..dc95e63b6 --- /dev/null +++ b/asllib/tests/language.t/Rcpck.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s +// CHECK: FALSE + +func main() => integer +begin + var a: boolean; + print(a); + return 0; +end diff --git a/asllib/tests/language.t/Rcrqj.asl b/asllib/tests/language.t/Rcrqj.asl new file mode 100644 index 000000000..a1324f5ae --- /dev/null +++ b/asllib/tests/language.t/Rcrqj.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + + +func main() => integer +begin + var a: integer = div_int(10, 2); + var b: integer = fdiv_int(10, 3); + var c: integer = frem_int(10, 2); + + return 0; +end diff --git a/asllib/tests/language.t/Rcwnt.asl b/asllib/tests/language.t/Rcwnt.asl new file mode 100644 index 000000000..c4cf6a4f3 --- /dev/null +++ b/asllib/tests/language.t/Rcwnt.asl @@ -0,0 +1,20 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 3 + +func test(d: bits(2), a: integer) => integer +begin + case d of + when '00' => return 1; + when '01' where a > 10 => return 2; + when '01' => return 3; + when '10' => return 4; + when '11' => return 5; + end + return 6; +end + +func main() => integer +begin + print(test('01', 1)); + return 0; +end diff --git a/asllib/tests/language.t/Rcztx.asl b/asllib/tests/language.t/Rcztx.asl new file mode 100644 index 000000000..fb9dcb1bc --- /dev/null +++ b/asllib/tests/language.t/Rcztx.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +type well_constrained of integer {10, 11, 30}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rdbzz.asl b/asllib/tests/language.t/Rdbzz.asl new file mode 100644 index 000000000..5eed125dd --- /dev/null +++ b/asllib/tests/language.t/Rdbzz.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +let a: integer = 10; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rdfwz.asl b/asllib/tests/language.t/Rdfwz.asl new file mode 100644 index 000000000..c09c0342c --- /dev/null +++ b/asllib/tests/language.t/Rdfwz.asl @@ -0,0 +1,18 @@ +// RUN: interp %s | FileCheck %s + +var t: integer; + +func a() +begin + let b = 10; +end + +setter c[] = value: integer +begin + t = value; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rdgbm.asl b/asllib/tests/language.t/Rdgbm.asl new file mode 100644 index 000000000..ee18a0b75 --- /dev/null +++ b/asllib/tests/language.t/Rdgbm.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +constant a = Ones(10); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rdgjt.asl b/asllib/tests/language.t/Rdgjt.asl new file mode 100644 index 000000000..c59d1885c --- /dev/null +++ b/asllib/tests/language.t/Rdgjt.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +config size: integer{0..10} = 5; + +type a of array[size] of integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rdgrv.asl b/asllib/tests/language.t/Rdgrv.asl new file mode 100644 index 000000000..9997bf5c6 --- /dev/null +++ b/asllib/tests/language.t/Rdgrv.asl @@ -0,0 +1,13 @@ +// RUN: interp %s | FileCheck %s +// CHECK: Hello +// CHECK-NEXT: World +func main() => integer +begin + try + print("Hello"); + catch + when integer => pass; + end + print("World"); + return 0; +end diff --git a/asllib/tests/language.t/Rdhkh.asl b/asllib/tests/language.t/Rdhkh.asl new file mode 100644 index 000000000..e9fc51346 --- /dev/null +++ b/asllib/tests/language.t/Rdhkh.asl @@ -0,0 +1,18 @@ +// RUN: not interp %s | FileCheck %s + +type a of exception{ + aa: integer +}; + +func main() => integer +begin + try + throw a { + aa=10 + }; + catch + when aa : a => aa.aa = 20; + end + + return 0; +end diff --git a/asllib/tests/language.t/Rdhrc.asl b/asllib/tests/language.t/Rdhrc.asl new file mode 100644 index 000000000..49bca0f25 --- /dev/null +++ b/asllib/tests/language.t/Rdhrc.asl @@ -0,0 +1,15 @@ +// RUN: interp %s | FileCheck %s + +var a: integer; +var b = a; + +func test() +begin + var c = a; +end + +func main() => integer +begin + var d = a; + return 0; +end diff --git a/asllib/tests/language.t/Rdhzt.asl b/asllib/tests/language.t/Rdhzt.asl new file mode 100644 index 000000000..845fadfce --- /dev/null +++ b/asllib/tests/language.t/Rdhzt.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! There is nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rdjmc.asl b/asllib/tests/language.t/Rdjmc.asl new file mode 100644 index 000000000..8ce3a0bc0 --- /dev/null +++ b/asllib/tests/language.t/Rdjmc.asl @@ -0,0 +1,16 @@ +// RUN: not interp %s | FileCheck %s + +var a : integer = 10; + +func sideeffect() => integer +begin + a = a + 1; + return a; +end + +var b = a; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rdkgq.asl b/asllib/tests/language.t/Rdkgq.asl new file mode 100644 index 000000000..845fadfce --- /dev/null +++ b/asllib/tests/language.t/Rdkgq.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! There is nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rdlxt.asl b/asllib/tests/language.t/Rdlxt.asl new file mode 100644 index 000000000..69d80a0ba --- /dev/null +++ b/asllib/tests/language.t/Rdlxt.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +var a = b; +constant b = 10 + 10 + 10; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rdlxv.asl b/asllib/tests/language.t/Rdlxv.asl new file mode 100644 index 000000000..7725ea103 --- /dev/null +++ b/asllib/tests/language.t/Rdlxv.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 10 + +type a of record { + c: integer, + b: integer +}; + +func main() => integer +begin + var b : a; + b.c = 10; + var c: integer = b.c; + print(c); + return 0; +end diff --git a/asllib/tests/language.t/Rdpzk.asl b/asllib/tests/language.t/Rdpzk.asl new file mode 100644 index 000000000..8aeb56252 --- /dev/null +++ b/asllib/tests/language.t/Rdpzk.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + assert(FALSE); + return 0; +end diff --git a/asllib/tests/language.t/Rdvvq.asl b/asllib/tests/language.t/Rdvvq.asl new file mode 100644 index 000000000..e68d5d47e --- /dev/null +++ b/asllib/tests/language.t/Rdvvq.asl @@ -0,0 +1,22 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 30 +// CHECK-NEXT: 10 + +getter a[value1: integer, value2: integer] => integer +begin + return value1 + value2; +end + +getter b[] => integer +begin + return 10; +end + +func main() => integer +begin + var c = a[10, 20]; + print(c); + + print(b[]); + return 0; +end diff --git a/asllib/tests/language.t/Rdwsp.asl b/asllib/tests/language.t/Rdwsp.asl new file mode 100644 index 000000000..001ad49e0 --- /dev/null +++ b/asllib/tests/language.t/Rdwsp.asl @@ -0,0 +1,9 @@ +// RUN: not interp %s | FileCheck %s + +type enum of enumeration{A, B}; +type enum2 of enumeration{A, B}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rdxwn.asl b/asllib/tests/language.t/Rdxwn.asl new file mode 100644 index 000000000..ba7c6228d --- /dev/null +++ b/asllib/tests/language.t/Rdxwn.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +type a of record {b: integer}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rdyqz.asl b/asllib/tests/language.t/Rdyqz.asl new file mode 100644 index 000000000..5c9acde83 --- /dev/null +++ b/asllib/tests/language.t/Rdyqz.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s + +type a of record { + x: integer, + y: integer +}; + +func main() => integer +begin + var b = a { x = 10 }; + return 0; +end diff --git a/asllib/tests/language.t/Rfhyz.asl b/asllib/tests/language.t/Rfhyz.asl new file mode 100644 index 000000000..aa9fa652c --- /dev/null +++ b/asllib/tests/language.t/Rfhyz.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func test{N: integer{}}(a: bits(N)) +begin + var b = [a, '11']; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rfkgp.asl b/asllib/tests/language.t/Rfkgp.asl new file mode 100644 index 000000000..9711bafb9 --- /dev/null +++ b/asllib/tests/language.t/Rfkgp.asl @@ -0,0 +1,14 @@ +// RUN: not interp %s | FileCheck %s + +func runtime() => integer +begin + print("Hello"); + return 10; +end + +constant a = runtime(); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rfmlk.asl b/asllib/tests/language.t/Rfmlk.asl new file mode 100644 index 000000000..7cd44ac15 --- /dev/null +++ b/asllib/tests/language.t/Rfmlk.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a, b, c: integer; + + return 0; +end diff --git a/asllib/tests/language.t/Rfmxk.asl b/asllib/tests/language.t/Rfmxk.asl new file mode 100644 index 000000000..e81e2ef1b --- /dev/null +++ b/asllib/tests/language.t/Rfmxk.asl @@ -0,0 +1,24 @@ +// RUN: interp %s | FileCheck %s + +type a of integer; +type b subtypes a; + + +type c of bits(4) { + [0] cc, + [1:0] ccc +}; + +func main() => integer +begin + var bb: b; + var aa: a = bb; + + var i: integer = 10; + var aaa: a = i; + + var g : bits(4) = '1111'; + var cccc : c = g; + + return 0; +end diff --git a/asllib/tests/language.t/Rfpmt.asl b/asllib/tests/language.t/Rfpmt.asl new file mode 100644 index 000000000..e853a3c9d --- /dev/null +++ b/asllib/tests/language.t/Rfpmt.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 30 + +var a: integer = 10 + 10 + 10; + +func main() => integer +begin + print(a); + return 0; +end diff --git a/asllib/tests/language.t/Rfrdx.asl b/asllib/tests/language.t/Rfrdx.asl new file mode 100644 index 000000000..2570e4e31 --- /dev/null +++ b/asllib/tests/language.t/Rfrdx.asl @@ -0,0 +1,21 @@ +// RUN: interp %s | FileCheck %s + +// Function 'Add' +func Add{N}(x: bits(N), y: bits(N)) => bits(N) +begin + return x + y; +end + +var Counter: integer = 0; + +// Procedure 'IncrementCounter' +func IncrementCounter(inc: integer) +begin + Counter = Counter + inc; + return; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rfrwd.asl b/asllib/tests/language.t/Rfrwd.asl new file mode 100644 index 000000000..a16823cfd --- /dev/null +++ b/asllib/tests/language.t/Rfrwd.asl @@ -0,0 +1,6 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rftpk.asl b/asllib/tests/language.t/Rftpk.asl new file mode 100644 index 000000000..8b2c1c1a6 --- /dev/null +++ b/asllib/tests/language.t/Rftpk.asl @@ -0,0 +1,15 @@ +// RUN: interp %s | FileCheck %s + +type a of integer; +type b subtypes a; + +func aa() => a +begin + var bb: b; + return bb; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rftvn.asl b/asllib/tests/language.t/Rftvn.asl new file mode 100644 index 000000000..b0d98b456 --- /dev/null +++ b/asllib/tests/language.t/Rftvn.asl @@ -0,0 +1,10 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + repeat + pass; + until 10; + + return 0; +end diff --git a/asllib/tests/language.t/Rfwmm.asl b/asllib/tests/language.t/Rfwmm.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Rfwmm.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rfwqm.asl b/asllib/tests/language.t/Rfwqm.asl new file mode 100644 index 000000000..969b82754 --- /dev/null +++ b/asllib/tests/language.t/Rfwqm.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +var a : integer = b; +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rfzsd.asl b/asllib/tests/language.t/Rfzsd.asl new file mode 100644 index 000000000..bdba9786b --- /dev/null +++ b/asllib/tests/language.t/Rfzsd.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +type a of bits({0..10}); +type b of bits(-: integer{0..10}); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rgbnc.asl b/asllib/tests/language.t/Rgbnc.asl new file mode 100644 index 000000000..c6a2b18d6 --- /dev/null +++ b/asllib/tests/language.t/Rgbnc.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 0 + +var a: integer; + +func main() => integer +begin + print(a); + + return 0; +end diff --git a/asllib/tests/language.t/Rgfsh.asl b/asllib/tests/language.t/Rgfsh.asl new file mode 100644 index 000000000..057d6983a --- /dev/null +++ b/asllib/tests/language.t/Rgfsh.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + let a: String = "©"; + return 0; +end diff --git a/asllib/tests/language.t/Rghrp.asl b/asllib/tests/language.t/Rghrp.asl new file mode 100644 index 000000000..cda41b01e --- /dev/null +++ b/asllib/tests/language.t/Rghrp.asl @@ -0,0 +1,10 @@ +// RUN: not interp %s | FileCheck %s + +config a: integer = 10; + +type b of bits(a); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rghxr_a.asl b/asllib/tests/language.t/Rghxr_a.asl new file mode 100644 index 000000000..f3e1f42d4 --- /dev/null +++ b/asllib/tests/language.t/Rghxr_a.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 0 +// CHECK-NEXT: 1 + +func main() => integer +begin + print(frem_int(6, 3)); + print(frem_int(-5, 3)); + return 0; +end diff --git a/asllib/tests/language.t/Rghxr_b.asl b/asllib/tests/language.t/Rghxr_b.asl new file mode 100644 index 000000000..cc2ae4925 --- /dev/null +++ b/asllib/tests/language.t/Rghxr_b.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + print(frem_int(6, -3)); + return 0; +end diff --git a/asllib/tests/language.t/Rgnts.asl b/asllib/tests/language.t/Rgnts.asl new file mode 100644 index 000000000..4d8b9119f --- /dev/null +++ b/asllib/tests/language.t/Rgnts.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s + +func a(N: integer{}, M: integer{}) +begin + var b = N; + b = M; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rgqnl.asl b/asllib/tests/language.t/Rgqnl.asl new file mode 100644 index 000000000..317e9ee09 --- /dev/null +++ b/asllib/tests/language.t/Rgqnl.asl @@ -0,0 +1,39 @@ +// RUN: interp %s | FileCheck %s +// CHECK: TRUE +// CHECK-NEXT: TRUE +// CHECK-NEXT: FALSE +// CHECK-NEXT: TRUE +// CHECK-NEXT: Hello +// CHECK-NEXT: World +// CHECK-NEXT: FALSE +// CHECK-NEXT: World +// CHECK-NEXT: TRUE + + +func true_writer() => boolean +begin + print("Hello"); + return TRUE; +end + +func false_writer() => boolean +begin + print("World"); + return FALSE; +end + +func main() => integer +begin + print(FALSE --> FALSE); + print(FALSE --> TRUE); + print(TRUE --> FALSE); + print(TRUE --> TRUE); + + var a: boolean = true_writer() --> false_writer(); + print(a); + + + var b: boolean = false_writer() --> false_writer(); + print(b); + return 0; +end diff --git a/asllib/tests/language.t/Rgqvz.asl b/asllib/tests/language.t/Rgqvz.asl new file mode 100644 index 000000000..bb868f1d8 --- /dev/null +++ b/asllib/tests/language.t/Rgqvz.asl @@ -0,0 +1,22 @@ +// RUN: interp %s | FileCheck %s +// CHECK: TRUE +// CHECK-NEXT: TRUE + +type myBits of bits(6) { + [0] a, + [1] b, + [2] c, + [3] d, + [4] e, + [5] f +}; + +func main() => integer +begin + var a : myBits = '101010'; + print(((a.f as bits(1)) == '1')); + a.f = '0'; + print(((a.f as bits(1)) == '0')); + + return 0; +end diff --git a/asllib/tests/language.t/Rgrvj.asl b/asllib/tests/language.t/Rgrvj.asl new file mode 100644 index 000000000..499277292 --- /dev/null +++ b/asllib/tests/language.t/Rgrvj.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var a: enumeration {A, B}; + + return 0; +end diff --git a/asllib/tests/language.t/Rgvcc.asl b/asllib/tests/language.t/Rgvcc.asl new file mode 100644 index 000000000..6d57b88f1 --- /dev/null +++ b/asllib/tests/language.t/Rgvcc.asl @@ -0,0 +1,9 @@ +// RUN: not interp %s | FileCheck %s + +type a of exception {}; + +func main() => integer +begin + throw a{}; + return 0; +end diff --git a/asllib/tests/language.t/Rgvks.asl b/asllib/tests/language.t/Rgvks.asl new file mode 100644 index 000000000..eee0acee0 --- /dev/null +++ b/asllib/tests/language.t/Rgvks.asl @@ -0,0 +1,18 @@ +// RUN: interp %s | FileCheck %s +// CHECK: a + +type a of exception{}; + +func main() => integer +begin + try + try + throw a{}; + catch + when a => throw; + end + catch + when a => print("a"); + end + return 0; +end diff --git a/asllib/tests/language.t/Rgvzk.asl b/asllib/tests/language.t/Rgvzk.asl new file mode 100644 index 000000000..be8086b1b --- /dev/null +++ b/asllib/tests/language.t/Rgvzk.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to be tested here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rgwcp.asl b/asllib/tests/language.t/Rgwcp.asl new file mode 100644 index 000000000..ed724512e --- /dev/null +++ b/asllib/tests/language.t/Rgwcp.asl @@ -0,0 +1,7 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer{0, 10}; + return 0; +end diff --git a/asllib/tests/language.t/Rgxqh.asl b/asllib/tests/language.t/Rgxqh.asl new file mode 100644 index 000000000..f597f81f0 --- /dev/null +++ b/asllib/tests/language.t/Rgxqh.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s + +getter a => integer +begin + return 10; +end + +func main() => integer +begin + var b = a[]; + return 0; +end diff --git a/asllib/tests/language.t/Rgycg.asl b/asllib/tests/language.t/Rgycg.asl new file mode 100644 index 000000000..ac02932af --- /dev/null +++ b/asllib/tests/language.t/Rgycg.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 0.0 + +func main() => integer +begin + var a: real; + print(a); + return 0; +end diff --git a/asllib/tests/language.t/Rgyjz.asl b/asllib/tests/language.t/Rgyjz.asl new file mode 100644 index 000000000..1bccdfc1e --- /dev/null +++ b/asllib/tests/language.t/Rgyjz.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: bits(10); + var b = a as bits({0..10}); + + return 0; +end diff --git a/asllib/tests/language.t/Rhdds.asl b/asllib/tests/language.t/Rhdds.asl new file mode 100644 index 000000000..5c677cca3 --- /dev/null +++ b/asllib/tests/language.t/Rhdds.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer{0..10} = 5; + + var b: integer{5..6} = a as {5..6}; + + return 0; +end diff --git a/asllib/tests/language.t/Rhdgv.asl b/asllib/tests/language.t/Rhdgv.asl new file mode 100644 index 000000000..681356d03 --- /dev/null +++ b/asllib/tests/language.t/Rhdgv.asl @@ -0,0 +1,13 @@ +// RUN: not interp %s | FileCheck %s + +var a: integer; + +func a() +begin + pass; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rhhcd.asl b/asllib/tests/language.t/Rhhcd.asl new file mode 100644 index 000000000..1c2cc6571 --- /dev/null +++ b/asllib/tests/language.t/Rhhcd.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func test {N} (a: bits(N)) +begin + var b: array[N] of integer; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rhjpn.asl b/asllib/tests/language.t/Rhjpn.asl new file mode 100644 index 000000000..d2526e19e --- /dev/null +++ b/asllib/tests/language.t/Rhjpn.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +type constrained of integer {10}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rhjyj.asl b/asllib/tests/language.t/Rhjyj.asl new file mode 100644 index 000000000..95544a191 --- /dev/null +++ b/asllib/tests/language.t/Rhjyj.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +type enum of enumeration{A, B}; + +func main() => integer +begin + var a: enum = A; + + return 0; +end diff --git a/asllib/tests/language.t/Rhprd.asl b/asllib/tests/language.t/Rhprd.asl new file mode 100644 index 000000000..3c269f9bf --- /dev/null +++ b/asllib/tests/language.t/Rhprd.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer; + var _a: integer; + var abc: integer; + var ___: integer; + var _a0: integer; + + return 0; +end diff --git a/asllib/tests/language.t/Rhqzy.asl b/asllib/tests/language.t/Rhqzy.asl new file mode 100644 index 000000000..2282a131a --- /dev/null +++ b/asllib/tests/language.t/Rhqzy.asl @@ -0,0 +1,19 @@ +// RUN: interp %s | FileCheck %s + +type a of record { + aa: integer +}; + +type b of record { + aa: integer, + bb: integer +} subtypes a; + +type c subtypes a with { + bb: integer +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rhwtv.asl b/asllib/tests/language.t/Rhwtv.asl new file mode 100644 index 000000000..0b254ac83 --- /dev/null +++ b/asllib/tests/language.t/Rhwtv.asl @@ -0,0 +1,14 @@ +// RUN: interp %s | FileCheck %s + +var a = 10; +var b = 10; + +func c(d: integer, e: integer) +begin + var f = a + b + d + e; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rhyfh.asl b/asllib/tests/language.t/Rhyfh.asl new file mode 100644 index 000000000..8d2ba6fff --- /dev/null +++ b/asllib/tests/language.t/Rhyfh.asl @@ -0,0 +1,19 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 10 +// CHECK-NEXT: 10 +// CHECK-NEXT: 10 +// CHECK-NEXT: 10 +// CHECK-NEXT: 10 +// CHECK-NEXT: 10 + +func main() => integer +begin + print(10); + print(1_0); + print(0xa); + print(0xA); + print(0xA_); + print(0x0a); + + return 0; +end diff --git a/asllib/tests/language.t/Rhyqk.asl b/asllib/tests/language.t/Rhyqk.asl new file mode 100644 index 000000000..a8232135e --- /dev/null +++ b/asllib/tests/language.t/Rhyqk.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! How do I show this? + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rirnq.asl b/asllib/tests/language.t/Rirnq.asl new file mode 100644 index 000000000..c91b2d614 --- /dev/null +++ b/asllib/tests/language.t/Rirnq.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s +// CHECK: runtime_exception + +func main() => integer +begin + assert(FALSE); + return 0; +end diff --git a/asllib/tests/language.t/Rjbxq.asl b/asllib/tests/language.t/Rjbxq.asl new file mode 100644 index 000000000..3ae7be594 --- /dev/null +++ b/asllib/tests/language.t/Rjbxq.asl @@ -0,0 +1,16 @@ +// RUN: not interp %s | FileCheck %s + +config cond = TRUE; + +func main() => integer +begin + var a = 10; + + if cond then + var b = a; + end + + var c = a + b; + + return 0; +end diff --git a/asllib/tests/language.t/Rjbxs.asl b/asllib/tests/language.t/Rjbxs.asl new file mode 100644 index 000000000..155fa403b --- /dev/null +++ b/asllib/tests/language.t/Rjbxs.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s + +func testa{N: integer}(a: bits(N)) +begin + pass; +end + +func testb(a: bits(N), N: integer) +begin + pass; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rjfrd.asl b/asllib/tests/language.t/Rjfrd.asl new file mode 100644 index 000000000..c997ea9d9 --- /dev/null +++ b/asllib/tests/language.t/Rjfrd.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + if TRUE then + var a = 10; + end + + var b = a; + return 0; +end diff --git a/asllib/tests/language.t/Rjgrk.asl b/asllib/tests/language.t/Rjgrk.asl new file mode 100644 index 000000000..24c310a7f --- /dev/null +++ b/asllib/tests/language.t/Rjgrk.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var _: integer; + return 0; +end diff --git a/asllib/tests/language.t/Rjgvx.asl b/asllib/tests/language.t/Rjgvx.asl new file mode 100644 index 000000000..59e37dd04 --- /dev/null +++ b/asllib/tests/language.t/Rjgvx.asl @@ -0,0 +1,13 @@ +// RUN: interp %s | FileCheck %s + +func test(a: integer) => integer +begin + return a + 1; +end + +func main() => integer +begin + var a = test(10); + + return 0; +end diff --git a/asllib/tests/language.t/Rjgwf.asl b/asllib/tests/language.t/Rjgwf.asl new file mode 100644 index 000000000..e7be84831 --- /dev/null +++ b/asllib/tests/language.t/Rjgwf.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +type a of boolean; + +func main() => integer +begin + var aa: a; + var aaa: a; + + var b = aa || aaa; + return 0; +end diff --git a/asllib/tests/language.t/Rjhkl.asl b/asllib/tests/language.t/Rjhkl.asl new file mode 100644 index 000000000..3efa989f4 --- /dev/null +++ b/asllib/tests/language.t/Rjhkl.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var a: (integer, integer); + a.item0 = 10; + return 0; +end diff --git a/asllib/tests/language.t/Rjhst.asl b/asllib/tests/language.t/Rjhst.asl new file mode 100644 index 000000000..f4720c02c --- /dev/null +++ b/asllib/tests/language.t/Rjhst.asl @@ -0,0 +1,14 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 3 + +func main() => integer +begin + case '1010' of + when '0000' => print("1"); + when '1000' => print("2"); + when '1010' => print("3"); + when '1111' => print("4"); + otherwise => pass; + end + return 0; +end diff --git a/asllib/tests/language.t/Rjjcj.asl b/asllib/tests/language.t/Rjjcj.asl new file mode 100644 index 000000000..10bba4c12 --- /dev/null +++ b/asllib/tests/language.t/Rjjcj.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: array[3] of integer; + a[0] = 10; + + return 0; +end diff --git a/asllib/tests/language.t/Rjnmr.asl b/asllib/tests/language.t/Rjnmr.asl new file mode 100644 index 000000000..114471973 --- /dev/null +++ b/asllib/tests/language.t/Rjnmr.asl @@ -0,0 +1,13 @@ +// RUN: not interp %s | FileCheck %s + +func a() => integer +begin + print("error"); + return 10; +end + +func main() => integer +begin + constant b = a(); + return 0; +end diff --git a/asllib/tests/language.t/Rjpvl.asl b/asllib/tests/language.t/Rjpvl.asl new file mode 100644 index 000000000..eb63f8392 --- /dev/null +++ b/asllib/tests/language.t/Rjpvl.asl @@ -0,0 +1,34 @@ +// RUN: interp %s | FileCheck %s + + +// declaration of a tuple type and then a var identifier using that type +type MyTupleT of (boolean, integer); +var enable_value : MyTupleT; + +// declaration let identifier (of type tuple), with initialization +let default_range : (integer, integer) = (0, 31); + +// declaration of two var identifiers +// The type information for a and b is taken from the initialization expression +var (a, b) = default_range; + +// a function that returns a tuple +func calcEnable() => myTupleT +begin + return (TRUE, data); // returning a 2-tuple +end + +func main() => integer +begin + // assignment to a tuple + enable_value = calcEnable(); + + // multiple assignment to the list of elements `lo, hi` from + // a conditional expression that has one tuple literal `(0,63)` + // and a variable default_range, of type tuple. + // Note that the expression on the left side of the equals sign is + // not a tuple but instead a list of elements. + (lo, hi) = if sf then (0, 63) else default_range; + + return 0; +end diff --git a/asllib/tests/language.t/Rjqxc.asl b/asllib/tests/language.t/Rjqxc.asl new file mode 100644 index 000000000..b158675e5 --- /dev/null +++ b/asllib/tests/language.t/Rjqxc.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s +// CHECK-NOT: Run + +func main() => integer +begin + while FALSE do + print("Run"); + end + return 0; +end diff --git a/asllib/tests/language.t/Rjqyf.asl b/asllib/tests/language.t/Rjqyf.asl new file mode 100644 index 000000000..91ad08a99 --- /dev/null +++ b/asllib/tests/language.t/Rjqyf.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + assert(10); + return 0; +end diff --git a/asllib/tests/language.t/Rjvtr.asl b/asllib/tests/language.t/Rjvtr.asl new file mode 100644 index 000000000..0cf3a961f --- /dev/null +++ b/asllib/tests/language.t/Rjvtr.asl @@ -0,0 +1,9 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + case TRUE of + when FALSE => print("FALSE"); + end + return 0; +end diff --git a/asllib/tests/language.t/Rjwph.asl b/asllib/tests/language.t/Rjwph.asl new file mode 100644 index 000000000..ecd7842cc --- /dev/null +++ b/asllib/tests/language.t/Rjwph.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s +// CHECK: Hello World + +func main() => integer +begin + print("Hello World"); + return 0; +end diff --git a/asllib/tests/language.t/Rjzst.asl b/asllib/tests/language.t/Rjzst.asl new file mode 100644 index 000000000..b87a51df3 --- /dev/null +++ b/asllib/tests/language.t/Rjzst.asl @@ -0,0 +1,17 @@ +// RUN: interp %s | FileCheck %s +// CHECK: aa +// CHECK-NEXT: bb + +type a of exception{}; + + +func main() => integer +begin + try + throw a{}; + catch + when a => print("aa"); + end + print("bb"); + return 0; +end diff --git a/asllib/tests/language.t/Rkcds.asl b/asllib/tests/language.t/Rkcds.asl new file mode 100644 index 000000000..fcde11aaa --- /dev/null +++ b/asllib/tests/language.t/Rkcds.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s + +type a of exception { + x: integer, + y: integer +}; + +func main() => integer +begin + var b = a { x = 10 }; + return 0; +end diff --git a/asllib/tests/language.t/Rkcmk.asl b/asllib/tests/language.t/Rkcmk.asl new file mode 100644 index 000000000..98fdbf3e1 --- /dev/null +++ b/asllib/tests/language.t/Rkcmk.asl @@ -0,0 +1,16 @@ +// RUN: not interp %s | FileCheck %s + +func a() +begin + pass; +end + +func a() +begin + pass; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rkczs.asl b/asllib/tests/language.t/Rkczs.asl new file mode 100644 index 000000000..5015dea4c --- /dev/null +++ b/asllib/tests/language.t/Rkczs.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func test{N: integer{1..5}}(a: bits(N)) +begin + var b: bits(N+2) = [a, '11']; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rkdks.asl b/asllib/tests/language.t/Rkdks.asl new file mode 100644 index 000000000..0982c540d --- /dev/null +++ b/asllib/tests/language.t/Rkdks.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +type id of integer; + +var a: id; + + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rkfgj.asl b/asllib/tests/language.t/Rkfgj.asl new file mode 100644 index 000000000..73ce76681 --- /dev/null +++ b/asllib/tests/language.t/Rkfgj.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s + +func test() +begin + pass; +end + +func test(a: bits(10)) +begin + pass; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rkfys.asl b/asllib/tests/language.t/Rkfys.asl new file mode 100644 index 000000000..1cb5451ed --- /dev/null +++ b/asllib/tests/language.t/Rkfys.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func test(a: integer{1..4}, b: integer{0..3}) +begin + var c: integer{1..7} = a + b; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rkgxl.asl b/asllib/tests/language.t/Rkgxl.asl new file mode 100644 index 000000000..38d568624 --- /dev/null +++ b/asllib/tests/language.t/Rkgxl.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +type a of exception; +type b of exception{}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rkldr.asl b/asllib/tests/language.t/Rkldr.asl new file mode 100644 index 000000000..a41669524 --- /dev/null +++ b/asllib/tests/language.t/Rkldr.asl @@ -0,0 +1,17 @@ +// RUN: not interp %s | FileCheck %s + +var a : integer = 0; + +func sideeffect() => integer +begin + a = a + 1; + return 10; +end + +func main() => integer +begin + for x = 0 to sideeffect() do + pass; + end + return 0; +end diff --git a/asllib/tests/language.t/Rkmbd.asl b/asllib/tests/language.t/Rkmbd.asl new file mode 100644 index 000000000..6fd6aef3b --- /dev/null +++ b/asllib/tests/language.t/Rkmbd.asl @@ -0,0 +1,13 @@ +// RUN: interp %s | FileCheck %s + +func test{N: integer}(a: bits(N)) => bits(N) +begin + return a; +end + +func main() => integer +begin + var a = test('1111 0000'); + + return 0; +end diff --git a/asllib/tests/language.t/Rksqp_a.asl b/asllib/tests/language.t/Rksqp_a.asl new file mode 100644 index 000000000..b9a737f71 --- /dev/null +++ b/asllib/tests/language.t/Rksqp_a.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +let a: integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rksqp_b.asl b/asllib/tests/language.t/Rksqp_b.asl new file mode 100644 index 000000000..e84983d70 --- /dev/null +++ b/asllib/tests/language.t/Rksqp_b.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +constant a: integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rksqp_c.asl b/asllib/tests/language.t/Rksqp_c.asl new file mode 100644 index 000000000..fee7f3d0f --- /dev/null +++ b/asllib/tests/language.t/Rksqp_c.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +config a: integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rkszm.asl b/asllib/tests/language.t/Rkszm.asl new file mode 100644 index 000000000..ef9296a01 --- /dev/null +++ b/asllib/tests/language.t/Rkszm.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 0 + +func main() => integer +begin + var a: integer; + + print(a); + + return 0; +end diff --git a/asllib/tests/language.t/Rktbg.asl b/asllib/tests/language.t/Rktbg.asl new file mode 100644 index 000000000..785142817 --- /dev/null +++ b/asllib/tests/language.t/Rktbg.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s + +func a() +begin + var b: bits(4); + var c = b[10:0]; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rkvnx.asl b/asllib/tests/language.t/Rkvnx.asl new file mode 100644 index 000000000..6940b8eb9 --- /dev/null +++ b/asllib/tests/language.t/Rkvnx.asl @@ -0,0 +1,10 @@ +// RUN: not interp %s | FileCheck %s + +var a = (10, 10); + +func main() => integer +begin + a.item0 = 4; + + return 0; +end diff --git a/asllib/tests/language.t/Rkxmr.asl b/asllib/tests/language.t/Rkxmr.asl new file mode 100644 index 000000000..2f42dfb66 --- /dev/null +++ b/asllib/tests/language.t/Rkxmr.asl @@ -0,0 +1,13 @@ +// RUN: not interp %s | FileCheck %s + +func check{M: integer{4,8}}(flag: boolean, x: bits(M), y: bits(8)) => boolean +begin + if flag then + return x == y; + end +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rkztj.asl b/asllib/tests/language.t/Rkztj.asl new file mode 100644 index 000000000..685e22207 --- /dev/null +++ b/asllib/tests/language.t/Rkztj.asl @@ -0,0 +1,15 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 0 +// CHECK-NEXT: 3 + +func main() => integer +begin + print("0"); + if FALSE then + print("1"); + elsif FALSE then + print("2"); + end + print("3"); + return 0; +end diff --git a/asllib/tests/language.t/Rlccn.asl b/asllib/tests/language.t/Rlccn.asl new file mode 100644 index 000000000..e577def86 --- /dev/null +++ b/asllib/tests/language.t/Rlccn.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s +// CHECK: TRUE +type enum of enumeration{A, B}; + +func main() => integer +begin + var a: enum; + print((a == A)); + return 0; +end diff --git a/asllib/tests/language.t/Rlcfd.asl b/asllib/tests/language.t/Rlcfd.asl new file mode 100644 index 000000000..e60779263 --- /dev/null +++ b/asllib/tests/language.t/Rlcfd.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +var a = 10; + +func main() => integer +begin + var a = 4; + print(a); + + return 0; +end diff --git a/asllib/tests/language.t/Rlcsz.asl b/asllib/tests/language.t/Rlcsz.asl new file mode 100644 index 000000000..9247c7824 --- /dev/null +++ b/asllib/tests/language.t/Rlcsz.asl @@ -0,0 +1,13 @@ +// RUN: not interp %s | FileCheck %s + +var _a : integer; + +setter a = value: integer +begin + _a = value; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rlghs.asl b/asllib/tests/language.t/Rlghs.asl new file mode 100644 index 000000000..46e09837f --- /dev/null +++ b/asllib/tests/language.t/Rlghs.asl @@ -0,0 +1,10 @@ +// RUN: not interp %s | FileCheck %s + +type a of bits(4) { + -3 b +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rljbg.asl b/asllib/tests/language.t/Rljbg.asl new file mode 100644 index 000000000..7061fb2ad --- /dev/null +++ b/asllib/tests/language.t/Rljbg.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +type a of bits(-:integer{0..10}); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rlljz.asl b/asllib/tests/language.t/Rlljz.asl new file mode 100644 index 000000000..709f0c7eb --- /dev/null +++ b/asllib/tests/language.t/Rlljz.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +var a: real = 10.0; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rlpdl.asl b/asllib/tests/language.t/Rlpdl.asl new file mode 100644 index 000000000..7966095b8 --- /dev/null +++ b/asllib/tests/language.t/Rlpdl.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +type b of integer subtypes a; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rlrhd.asl b/asllib/tests/language.t/Rlrhd.asl new file mode 100644 index 000000000..95769e64d --- /dev/null +++ b/asllib/tests/language.t/Rlrhd.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s +// CHECK: TRUE +// CHECK-NEXT: FALSE +// CHECK-NEXT: FALSE +// CHECK-NEXT: TRUE + + +func main() => integer +begin + print(FALSE <-> FALSE); + print(FALSE <-> TRUE); + print(TRUE <-> FALSE); + print(TRUE <-> TRUE); + + return 0; +end diff --git a/asllib/tests/language.t/Rlsnp.asl b/asllib/tests/language.t/Rlsnp.asl new file mode 100644 index 000000000..5e1ff6397 --- /dev/null +++ b/asllib/tests/language.t/Rlsnp.asl @@ -0,0 +1,7 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer{0..10}; + return 0; +end diff --git a/asllib/tests/language.t/Rlsvv.asl b/asllib/tests/language.t/Rlsvv.asl new file mode 100644 index 000000000..fcd00c4c9 --- /dev/null +++ b/asllib/tests/language.t/Rlsvv.asl @@ -0,0 +1,19 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 1 +// CHECK-NEXT: 2 +// CHECK-NEXT: 3 +// CHECK-NEXT: 4 +// CHECK-NEXT: 5 +// CHECK-NEXT: 6 +// CHECK-NEXT: 7 +// CHECK-NEXT: 8 +// CHECK-NEXT: 9 +// CHECK-NEXT: 10 + +func main() => integer +begin + for x = 1 to 10 do + print(x); + end + return 0; +end diff --git a/asllib/tests/language.t/Rlvth.asl b/asllib/tests/language.t/Rlvth.asl new file mode 100644 index 000000000..3784a994e --- /dev/null +++ b/asllib/tests/language.t/Rlvth.asl @@ -0,0 +1,13 @@ +// RUN: not interp %s | FileCheck %s + +config a: integer{} = 10; + +func test{}(N: integer{0..(a as integer{0..10})}, b: bits(N)) +begin + pass; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rlxqz.asl b/asllib/tests/language.t/Rlxqz.asl new file mode 100644 index 000000000..1a6f0bc3d --- /dev/null +++ b/asllib/tests/language.t/Rlxqz.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var a: integer = 0.0; + return 0; +end diff --git a/asllib/tests/language.t/Rlyds.asl b/asllib/tests/language.t/Rlyds.asl new file mode 100644 index 000000000..3b523f810 --- /dev/null +++ b/asllib/tests/language.t/Rlyds.asl @@ -0,0 +1,13 @@ +// RUN: interp %s | FileCheck %s + + +var a: integer{10}; +var b: integer{0..10}; +var c: integer{5 + 5}; +constant d: integer{0..10} = 5; +var e: integer{d..20}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rmbrm.asl b/asllib/tests/language.t/Rmbrm.asl new file mode 100644 index 000000000..aed299682 --- /dev/null +++ b/asllib/tests/language.t/Rmbrm.asl @@ -0,0 +1,14 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 0 + +type c of record { + a: integer +}; + +func main() => integer +begin + var b: c; + var a : integer = b.a; + print(a); + return 0; +end diff --git a/asllib/tests/language.t/Rmbzp.asl b/asllib/tests/language.t/Rmbzp.asl new file mode 100644 index 000000000..eb845adcd --- /dev/null +++ b/asllib/tests/language.t/Rmbzp.asl @@ -0,0 +1,19 @@ +// RUN: interp %s | FileCheck %s + +var b: integer; + +getter a[] => integer +begin + return b; +end + +setter a[] = value: integer +begin + b = value; + return; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rmdzd.asl b/asllib/tests/language.t/Rmdzd.asl new file mode 100644 index 000000000..14f0d1a33 --- /dev/null +++ b/asllib/tests/language.t/Rmdzd.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +type a of record { + b: integer, + b: integer +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rmghv.asl b/asllib/tests/language.t/Rmghv.asl new file mode 100644 index 000000000..057525495 --- /dev/null +++ b/asllib/tests/language.t/Rmghv.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +type a of exception{ + b: integer +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rmhfw.asl b/asllib/tests/language.t/Rmhfw.asl new file mode 100644 index 000000000..8aeb56252 --- /dev/null +++ b/asllib/tests/language.t/Rmhfw.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + assert(FALSE); + return 0; +end diff --git a/asllib/tests/language.t/Rmhpw.asl b/asllib/tests/language.t/Rmhpw.asl new file mode 100644 index 000000000..e007984f7 --- /dev/null +++ b/asllib/tests/language.t/Rmhpw.asl @@ -0,0 +1,15 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 1 +// CHECK_NEXT: 2 +// CHECK_NEXT: 4 +// CHECK_NEXT: 8 + +func main() => integer +begin + var a : integer = 1; + while a < 10 do + print(a); + a = 2 * a; + end + return 0; +end diff --git a/asllib/tests/language.t/Rmhwm.asl b/asllib/tests/language.t/Rmhwm.asl new file mode 100644 index 000000000..d8778b79e --- /dev/null +++ b/asllib/tests/language.t/Rmhwm.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +type a of integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rmkgb.asl b/asllib/tests/language.t/Rmkgb.asl new file mode 100644 index 000000000..e673d7976 --- /dev/null +++ b/asllib/tests/language.t/Rmkgb.asl @@ -0,0 +1,20 @@ +// RUN: not interp %s | FileCheck %s + +type a of exception{ + aa: integer +}; + +func main() => integer +begin + try + throw a { + aa=10 + }; + catch + when aa : a => pass; + end + + print(aa.aa); + + return 0; +end diff --git a/asllib/tests/language.t/Rmpmg.asl b/asllib/tests/language.t/Rmpmg.asl new file mode 100644 index 000000000..b0b6c3eea --- /dev/null +++ b/asllib/tests/language.t/Rmpmg.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +type a of bits(5) { + [0] aa, + [1] aa +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rmrht.asl b/asllib/tests/language.t/Rmrht.asl new file mode 100644 index 000000000..cc9d124ab --- /dev/null +++ b/asllib/tests/language.t/Rmrht.asl @@ -0,0 +1,10 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var a: bits(1); + var b: bits(11); + var c = a == b; + + return 0; +end diff --git a/asllib/tests/language.t/Rmwbn.asl b/asllib/tests/language.t/Rmwbn.asl new file mode 100644 index 000000000..66172fe47 --- /dev/null +++ b/asllib/tests/language.t/Rmwbn.asl @@ -0,0 +1,17 @@ +// RUN: interp %s | FileCheck %s + +config c: integer{} = 10; + +func test(N: integer) => bits(N) +begin + return Zeros(N); +end + +func main() => integer +begin + var a: bits(10) = test(10); + var b: bits(5) = test(5); + + var cc: bits(c) = test(c); + return 0; +end diff --git a/asllib/tests/language.t/Rmxps.asl b/asllib/tests/language.t/Rmxps.asl new file mode 100644 index 000000000..1ceff0087 --- /dev/null +++ b/asllib/tests/language.t/Rmxps.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s +// CHECK: FALSE +// CHECK-NEXT: TRUE + +func main() => integer +begin + print(FALSE); + print(TRUE); + return 0; +end diff --git a/asllib/tests/language.t/Rmxyq.asl b/asllib/tests/language.t/Rmxyq.asl new file mode 100644 index 000000000..36e98cf85 --- /dev/null +++ b/asllib/tests/language.t/Rmxyq.asl @@ -0,0 +1,15 @@ +// RUN: interp %s | FileCheck %s + +type a of bits(10) { + [5:0] a, + [4] b +}; + +func main() => integer +begin + var ab : a = '1111 1111 11'; + var abc : bits(6) = ab.a; + ab.b = '0'; + + return 0; +end diff --git a/asllib/tests/language.t/Rmzjj.asl b/asllib/tests/language.t/Rmzjj.asl new file mode 100644 index 000000000..47be10ae4 --- /dev/null +++ b/asllib/tests/language.t/Rmzjj.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +getter a[] => integer +begin + return 10; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rnbdj.asl b/asllib/tests/language.t/Rnbdj.asl new file mode 100644 index 000000000..866b8f350 --- /dev/null +++ b/asllib/tests/language.t/Rnbdj.asl @@ -0,0 +1,9 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + if 10 then + pass; + end + return 0; +end diff --git a/asllib/tests/language.t/Rncnq.asl b/asllib/tests/language.t/Rncnq.asl new file mode 100644 index 000000000..dc0981a47 --- /dev/null +++ b/asllib/tests/language.t/Rncnq.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func a(n: integer{}) +begin + var b: bits(n); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rnctb.asl b/asllib/tests/language.t/Rnctb.asl new file mode 100644 index 000000000..007a9e956 --- /dev/null +++ b/asllib/tests/language.t/Rnctb.asl @@ -0,0 +1,17 @@ +// RUN: interp %s | FileCheck %s + + +getter a{N:integer{1..100}}[t: bits(N)] => bits(N) +begin + return Zeros(N); +end + +setter a{N:integer}[t: bits(N)] = value: bits(N) +begin + return; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rncwm.asl b/asllib/tests/language.t/Rncwm.asl new file mode 100644 index 000000000..b3c9b16aa --- /dev/null +++ b/asllib/tests/language.t/Rncwm.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 1000 +// CHECK-NEXT: 32 + +func main() => integer +begin + print(exp_int(10, 3)); + print(exp_int(2, 5)); + return 0; +end diff --git a/asllib/tests/language.t/Rnfbn.asl b/asllib/tests/language.t/Rnfbn.asl new file mode 100644 index 000000000..34393ffda --- /dev/null +++ b/asllib/tests/language.t/Rnfbn.asl @@ -0,0 +1,7 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: bits(-:integer{10}); + return 0; +end diff --git a/asllib/tests/language.t/Rnfkg.asl b/asllib/tests/language.t/Rnfkg.asl new file mode 100644 index 000000000..68ad0fdb6 --- /dev/null +++ b/asllib/tests/language.t/Rnfkg.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! How would I test this? + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rnhgp.asl b/asllib/tests/language.t/Rnhgp.asl new file mode 100644 index 000000000..7642fdcdf --- /dev/null +++ b/asllib/tests/language.t/Rnhgp.asl @@ -0,0 +1,13 @@ +// RUN: not interp %s | FileCheck %s + +var a = '1111 1111'; + +func test(b: integer) => integer +begin + return a[b:0]; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rnjdz.asl b/asllib/tests/language.t/Rnjdz.asl new file mode 100644 index 000000000..320b47e9e --- /dev/null +++ b/asllib/tests/language.t/Rnjdz.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 0 + +func main() => integer +begin + var a: integer; + print(a); + return 0; +end diff --git a/asllib/tests/language.t/Rnpwr.asl b/asllib/tests/language.t/Rnpwr.asl new file mode 100644 index 000000000..30715d982 --- /dev/null +++ b/asllib/tests/language.t/Rnpwr.asl @@ -0,0 +1,22 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 0 +// CHECK-NEXT: 1 +// CHECK-NEXT: 2 +// CHECK-NEXT: 3 +// CHECK-NEXT: 4 +// CHECK-NEXT: 5 +// CHECK-NEXT: 6 +// CHECK-NEXT: 7 +// CHECK-NEXT: 8 +// CHECK-NEXT: 9 +// CHECK-NEXT: 10 + +func main() => integer +begin + var a : integer = 0; + repeat + print(a); + a = a + 1; + until a > 10; + return 0; +end diff --git a/asllib/tests/language.t/Rnxrc.asl b/asllib/tests/language.t/Rnxrc.asl new file mode 100644 index 000000000..9a7dbdbd6 --- /dev/null +++ b/asllib/tests/language.t/Rnxrc.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + throw 10; + return 0; +end diff --git a/asllib/tests/language.t/Rnxrx.asl b/asllib/tests/language.t/Rnxrx.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Rnxrx.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rnxsf.asl b/asllib/tests/language.t/Rnxsf.asl new file mode 100644 index 000000000..e96bcf8fd --- /dev/null +++ b/asllib/tests/language.t/Rnxsf.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +type a of integer; + +func main() => integer +begin + var b: a; + + return 0; +end diff --git a/asllib/tests/language.t/Rnynk.asl b/asllib/tests/language.t/Rnynk.asl new file mode 100644 index 000000000..eb8abc567 --- /dev/null +++ b/asllib/tests/language.t/Rnynk.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func test{N: integer}(a: bits(N)) +begin + var b = [a, '11']; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rnywh.asl b/asllib/tests/language.t/Rnywh.asl new file mode 100644 index 000000000..67bbf6d2a --- /dev/null +++ b/asllib/tests/language.t/Rnywh.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +func prod() +begin + return 10; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rnzgh.asl b/asllib/tests/language.t/Rnzgh.asl new file mode 100644 index 000000000..12b3186fd --- /dev/null +++ b/asllib/tests/language.t/Rnzgh.asl @@ -0,0 +1,10 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var a : integer = 0; + for x = 10 downto a do + a = a + 1; + end + return 0; +end diff --git a/asllib/tests/language.t/Rpbfk.asl b/asllib/tests/language.t/Rpbfk.asl new file mode 100644 index 000000000..801813318 --- /dev/null +++ b/asllib/tests/language.t/Rpbfk.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 0x0 +// CHECK-NEXT: 0xF +// CHECK-NEXT: 0x0 + +func main() => integer +begin + print('0000'); + print('1111'); + print('0 0 0 0'); + return 0; +end diff --git a/asllib/tests/language.t/Rpblf.asl b/asllib/tests/language.t/Rpblf.asl new file mode 100644 index 000000000..2d7c08431 --- /dev/null +++ b/asllib/tests/language.t/Rpblf.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer{0..10} = 5; + + var b: integer{5..6} = a as integer{5..6}; + + return 0; +end diff --git a/asllib/tests/language.t/Rpfwq.asl b/asllib/tests/language.t/Rpfwq.asl new file mode 100644 index 000000000..b350d594a --- /dev/null +++ b/asllib/tests/language.t/Rpfwq.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s + +func test(N: integer, a: bits(N)) +begin + pass; +end + +func main() => integer +begin + test(10, '1111'); + return 0; +end diff --git a/asllib/tests/language.t/Rpgfc.asl b/asllib/tests/language.t/Rpgfc.asl new file mode 100644 index 000000000..98fdbf3e1 --- /dev/null +++ b/asllib/tests/language.t/Rpgfc.asl @@ -0,0 +1,16 @@ +// RUN: not interp %s | FileCheck %s + +func a() +begin + pass; +end + +func a() +begin + pass; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rphnz.asl b/asllib/tests/language.t/Rphnz.asl new file mode 100644 index 000000000..41468ff5f --- /dev/null +++ b/asllib/tests/language.t/Rphnz.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s + +func a() => integer +begin + var b: integer{0..10} = 4; + return b; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rplyx.asl b/asllib/tests/language.t/Rplyx.asl new file mode 100644 index 000000000..381d98253 --- /dev/null +++ b/asllib/tests/language.t/Rplyx.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +config width = 10; +var a : bits(width); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rpmqb.asl b/asllib/tests/language.t/Rpmqb.asl new file mode 100644 index 000000000..845fadfce --- /dev/null +++ b/asllib/tests/language.t/Rpmqb.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! There is nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rpnqj.asl b/asllib/tests/language.t/Rpnqj.asl new file mode 100644 index 000000000..3ae4eeacf --- /dev/null +++ b/asllib/tests/language.t/Rpnqj.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +let a = (10, 10); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rprzn.asl b/asllib/tests/language.t/Rprzn.asl new file mode 100644 index 000000000..ae0c07e0b --- /dev/null +++ b/asllib/tests/language.t/Rprzn.asl @@ -0,0 +1,14 @@ +// RUN: not interp %s | FileCheck %s + +func runtime() => integer +begin + print("Hello"); + return 10; +end + +config a = runtime(); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rptdd.asl b/asllib/tests/language.t/Rptdd.asl new file mode 100644 index 000000000..63d85814b --- /dev/null +++ b/asllib/tests/language.t/Rptdd.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func test{N: integer}(a: bits(N)) => bits(N) +begin + return a; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rptng.asl b/asllib/tests/language.t/Rptng.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Rptng.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rpxrr.asl b/asllib/tests/language.t/Rpxrr.asl new file mode 100644 index 000000000..4b4342e3b --- /dev/null +++ b/asllib/tests/language.t/Rpxrr.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +type a of array[10] of integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rpzzj.asl b/asllib/tests/language.t/Rpzzj.asl new file mode 100644 index 000000000..cfcf86d24 --- /dev/null +++ b/asllib/tests/language.t/Rpzzj.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +config c = 4; +func main() => integer +begin + var a = 4; + var b = a as integer{4}; + var d = c as integer{4}; + + return 0; +end diff --git a/asllib/tests/language.t/Rqcvm.asl b/asllib/tests/language.t/Rqcvm.asl new file mode 100644 index 000000000..4eaee311b --- /dev/null +++ b/asllib/tests/language.t/Rqcvm.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +func test(a: integer, b: integer) => integer +begin + return 2 * a + b; +end + +func main() => integer +begin + var a = test(10 + 4, test(1, 2)); + return 0; +end diff --git a/asllib/tests/language.t/Rqcym.asl b/asllib/tests/language.t/Rqcym.asl new file mode 100644 index 000000000..1b4f87296 --- /dev/null +++ b/asllib/tests/language.t/Rqcym.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +type b of bits(5); + +type a of bits(6) { + [4:0] aa : b, +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rqdqd.asl b/asllib/tests/language.t/Rqdqd.asl new file mode 100644 index 000000000..291448a34 --- /dev/null +++ b/asllib/tests/language.t/Rqdqd.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a, b = 10; + + return 0; +end diff --git a/asllib/tests/language.t/Rqggh.asl b/asllib/tests/language.t/Rqggh.asl new file mode 100644 index 000000000..bf03e4792 --- /dev/null +++ b/asllib/tests/language.t/Rqggh.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here due to Iwvqz + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rqkxv.asl b/asllib/tests/language.t/Rqkxv.asl new file mode 100644 index 000000000..239bc0177 --- /dev/null +++ b/asllib/tests/language.t/Rqkxv.asl @@ -0,0 +1,30 @@ +// RUN: interp %s | FileCheck %s + +var _a: integer; + +getter a[] => integer +begin + return _a; +end + +setter a[] = value: integer +begin + _a = value; + return; +end + +getter b[index: integer] => integer +begin + return _a * index; +end + +setter b[index: integer] = value: integer +begin + _a = value * index; + return; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rqmdm.asl b/asllib/tests/language.t/Rqmdm.asl new file mode 100644 index 000000000..50fface41 --- /dev/null +++ b/asllib/tests/language.t/Rqmdm.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var newevent: integer; + return 0; +end diff --git a/asllib/tests/language.t/Rqnqv.asl b/asllib/tests/language.t/Rqnqv.asl new file mode 100644 index 000000000..02c2a1ca6 --- /dev/null +++ b/asllib/tests/language.t/Rqnqv.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +var a: string = "test"; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rqqbb.asl b/asllib/tests/language.t/Rqqbb.asl new file mode 100644 index 000000000..b9f0bda8e --- /dev/null +++ b/asllib/tests/language.t/Rqqbb.asl @@ -0,0 +1,19 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 10.0 +// CHECK-NEXT: 10.0 +// CHECK-NEXT: 10.0 +// CHECK-NEXT: 10.0 +// CHECK-NEXT: 10.0 +// CHECK-NEXT: 10.0 + +func main() => integer +begin + print(10.0); + print(1_0.0); + print(10.0_); + print(10.00); + print(10_.0); + print(10.0_0); + + return 0; +end diff --git a/asllib/tests/language.t/Rqwsq.asl b/asllib/tests/language.t/Rqwsq.asl new file mode 100644 index 000000000..c284a7e32 --- /dev/null +++ b/asllib/tests/language.t/Rqwsq.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 0 +// CHECK-NEXT: 0 +func main() => integer +begin + var a: (integer, integer); + var (b, c) = a; + print(b); + print(c); + return 0; +end diff --git a/asllib/tests/language.t/Rqxgw.asl b/asllib/tests/language.t/Rqxgw.asl new file mode 100644 index 000000000..9a1338fc6 --- /dev/null +++ b/asllib/tests/language.t/Rqxgw.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s +// CHECK: TRUE + +func main() => integer +begin + var a: bit; + var b: bit(1); + + print((a == b)); + return 0; +end diff --git a/asllib/tests/language.t/Rqybh.asl b/asllib/tests/language.t/Rqybh.asl new file mode 100644 index 000000000..93593e78c --- /dev/null +++ b/asllib/tests/language.t/Rqybh.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func test{N: integer}(a: bits(N)) => integer{N} +begin + return N; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rqyzd.asl b/asllib/tests/language.t/Rqyzd.asl new file mode 100644 index 000000000..8b42d0fb6 --- /dev/null +++ b/asllib/tests/language.t/Rqyzd.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var a: bits(-:integer); + return 0; +end diff --git a/asllib/tests/language.t/Rqzjs.asl b/asllib/tests/language.t/Rqzjs.asl new file mode 100644 index 000000000..c220c6e72 --- /dev/null +++ b/asllib/tests/language.t/Rqzjs.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +config a: integer{10} = 10; + +type b of bits(a); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rrcsd.asl b/asllib/tests/language.t/Rrcsd.asl new file mode 100644 index 000000000..abc4ea49f --- /dev/null +++ b/asllib/tests/language.t/Rrcsd.asl @@ -0,0 +1,14 @@ +// RUN: not interp %s | FileCheck %s + +type a of record { + aa: bits(1), + bb: bits(2), + cc: integer +}; + +func main() => integer +begin + var aa: a; + var bb: bits({1..10}) = aa.[aa, bb, cc]; + return 0; +end diff --git a/asllib/tests/language.t/Rrfqp.asl b/asllib/tests/language.t/Rrfqp.asl new file mode 100644 index 000000000..47ee4a4fe --- /dev/null +++ b/asllib/tests/language.t/Rrfqp.asl @@ -0,0 +1,7 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a = (1 + 1 * (3 - 3)) == (4 - (3 - 4)); + return 0; +end diff --git a/asllib/tests/language.t/Rrhtn.asl b/asllib/tests/language.t/Rrhtn.asl new file mode 100644 index 000000000..e3f6d1e63 --- /dev/null +++ b/asllib/tests/language.t/Rrhtn.asl @@ -0,0 +1,13 @@ +// RUN: not interp %s | FileCheck %s + +config a: integer = 10; + +func test(b: bits(a)) => bits(a) +begin + return b; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rrlqp.asl b/asllib/tests/language.t/Rrlqp.asl new file mode 100644 index 000000000..77e27f2b2 --- /dev/null +++ b/asllib/tests/language.t/Rrlqp.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer{0..10, 20..30}; + + return 0; +end diff --git a/asllib/tests/language.t/Rrmtq.asl b/asllib/tests/language.t/Rrmtq.asl new file mode 100644 index 000000000..dc37fabc4 --- /dev/null +++ b/asllib/tests/language.t/Rrmtq.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +type a of bits(6) { + [3, 1:0] aa, +}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rrqng.asl b/asllib/tests/language.t/Rrqng.asl new file mode 100644 index 000000000..ea523ace2 --- /dev/null +++ b/asllib/tests/language.t/Rrqng.asl @@ -0,0 +1,9 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + for x = 0 to 10 do + x = x + 1; + end + return 0; +end diff --git a/asllib/tests/language.t/Rrtcf.asl b/asllib/tests/language.t/Rrtcf.asl new file mode 100644 index 000000000..d84c8eda0 --- /dev/null +++ b/asllib/tests/language.t/Rrtcf.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s + +func test() +begin + pass; +end + +func main() => integer +begin + test(10); + return 0; +end diff --git a/asllib/tests/language.t/Rrxhx.asl b/asllib/tests/language.t/Rrxhx.asl new file mode 100644 index 000000000..18bc8e152 --- /dev/null +++ b/asllib/tests/language.t/Rrxhx.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s + +func function() => integer +begin + return 10; +end + +func procedure() +begin + pass; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rrxqb.asl b/asllib/tests/language.t/Rrxqb.asl new file mode 100644 index 000000000..8293f8518 --- /dev/null +++ b/asllib/tests/language.t/Rrxqb.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + case TRUE of + when FALSE => print("FALSE"); + otherwise => print("Otherwise"); + end + return 0; +end diff --git a/asllib/tests/language.t/Rrxyn.asl b/asllib/tests/language.t/Rrxyn.asl new file mode 100644 index 000000000..faf3f1bf8 --- /dev/null +++ b/asllib/tests/language.t/Rrxyn.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 240 +// CHECK-NEXT: -16 + +func main() => integer +begin + var T: bits(8) = '11110000'; + + print(UInt(T)); + print(SInt(T)); + return 0; +end diff --git a/asllib/tests/language.t/Rrymd.asl b/asllib/tests/language.t/Rrymd.asl new file mode 100644 index 000000000..3b5673a9a --- /dev/null +++ b/asllib/tests/language.t/Rrymd.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var result = '1000' IN '1xxx'; + + return 0; +end diff --git a/asllib/tests/language.t/Rrzll.asl b/asllib/tests/language.t/Rrzll.asl new file mode 100644 index 000000000..ffe5306ea --- /dev/null +++ b/asllib/tests/language.t/Rrzll.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +constant a = 10 + 10; +config b = 10 + 10; +var c = a + b; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rsblx.asl b/asllib/tests/language.t/Rsblx.asl new file mode 100644 index 000000000..b1c893c5b --- /dev/null +++ b/asllib/tests/language.t/Rsblx.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +constant a: integer = 10; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rschv.asl b/asllib/tests/language.t/Rschv.asl new file mode 100644 index 000000000..8fba1931b --- /dev/null +++ b/asllib/tests/language.t/Rschv.asl @@ -0,0 +1,13 @@ +// RUN: not interp %s | FileCheck %s + +type a of integer; + +func b() +begin + var aa : ty; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rsdjk.asl b/asllib/tests/language.t/Rsdjk.asl new file mode 100644 index 000000000..c0513e504 --- /dev/null +++ b/asllib/tests/language.t/Rsdjk.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + try + pass; + catch + when 10 => pass; + end + return 0; +end diff --git a/asllib/tests/language.t/Rsfpm.asl b/asllib/tests/language.t/Rsfpm.asl new file mode 100644 index 000000000..f4dee2454 --- /dev/null +++ b/asllib/tests/language.t/Rsfpm.asl @@ -0,0 +1,25 @@ +// RUN: interp %s | FileCheck %s + +var globe: integer = 10; + +func a() +begin + globe = globe + 10; +end + +func b() +begin + print("Side effect"); +end + +type expc of exception{}; + +func c() +begin + throw expc{}; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rskrk.asl b/asllib/tests/language.t/Rskrk.asl new file mode 100644 index 000000000..2b1f67598 --- /dev/null +++ b/asllib/tests/language.t/Rskrk.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s +config a: integer{0..10} = 10; +type b of bits(a); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rsnqj.asl b/asllib/tests/language.t/Rsnqj.asl new file mode 100644 index 000000000..49facb01a --- /dev/null +++ b/asllib/tests/language.t/Rsnqj.asl @@ -0,0 +1,14 @@ +// RUN: not interp %s | FileCheck %s + +var t: integer = 0; + +func a() => bits(0) +begin + t = t + 1; + return Zeros(0); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rspnm.asl b/asllib/tests/language.t/Rspnm.asl new file mode 100644 index 000000000..63c258f44 --- /dev/null +++ b/asllib/tests/language.t/Rspnm.asl @@ -0,0 +1,36 @@ +// RUN: interp %s | FileCheck %s +// CHECK: b +// CHECK-NEXT: a +// CHECK-NEXT: other + +type a of exception{}; +type b of exception{}; +type c of exception{}; + +func main() => integer +begin + try + throw b{}; + catch + when a => print("a"); + when b => print("b"); + otherwise => print("other"); + end + + try + throw a{}; + catch + when a => print("a"); + when b => print("b"); + otherwise => print("other"); + end + + try + throw c{}; + catch + when a => print("a"); + when b => print("b"); + otherwise => print("other"); + end + return 0; +end diff --git a/asllib/tests/language.t/Rsppt.asl b/asllib/tests/language.t/Rsppt.asl new file mode 100644 index 000000000..bd1750088 --- /dev/null +++ b/asllib/tests/language.t/Rsppt.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +var a: bits(5) = '11111'; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rsqjj.asl b/asllib/tests/language.t/Rsqjj.asl new file mode 100644 index 000000000..088810434 --- /dev/null +++ b/asllib/tests/language.t/Rsqjj.asl @@ -0,0 +1,9 @@ +// RUN: not interp %s | FileCheck %s +config a = 10; + +func main() => integer +begin + constant b = a; + + return 0; +end diff --git a/asllib/tests/language.t/Rsqxn.asl b/asllib/tests/language.t/Rsqxn.asl new file mode 100644 index 000000000..488b6a691 --- /dev/null +++ b/asllib/tests/language.t/Rsqxn.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer{1} = 1; + var b: integer{0} = 0; + + var c = a == b; + return 0; +end diff --git a/asllib/tests/language.t/Rsrhn.asl b/asllib/tests/language.t/Rsrhn.asl new file mode 100644 index 000000000..902c3b7c1 --- /dev/null +++ b/asllib/tests/language.t/Rsrhn.asl @@ -0,0 +1,9 @@ +// RUN: not interp %s | FileCheck %s + +type a of integer; +type b of string subtypes a; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rssbd.asl b/asllib/tests/language.t/Rssbd.asl new file mode 100644 index 000000000..b17b4bf02 --- /dev/null +++ b/asllib/tests/language.t/Rssbd.asl @@ -0,0 +1,15 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 10 + +func main() => integer +begin + var a : integer = 0; + + for x = 0 to 10 do + a = x; + end + + print(a); + + return 0; +end diff --git a/asllib/tests/language.t/Rsvdj.asl b/asllib/tests/language.t/Rsvdj.asl new file mode 100644 index 000000000..68f11a2de --- /dev/null +++ b/asllib/tests/language.t/Rsvdj.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! Nothing to test here + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rsvjb.asl b/asllib/tests/language.t/Rsvjb.asl new file mode 100644 index 000000000..68cde8679 --- /dev/null +++ b/asllib/tests/language.t/Rsvjb.asl @@ -0,0 +1,15 @@ +// RUN: interp %s | FileCheck %s + +type a of exception{ + b: integer +}; + +func main() => integer +begin + var aa : a; + var bb : integer = aa.b; + + print(bb); + + return 0; +end diff --git a/asllib/tests/language.t/Rsvmm.asl b/asllib/tests/language.t/Rsvmm.asl new file mode 100644 index 000000000..41675479d --- /dev/null +++ b/asllib/tests/language.t/Rsvmm.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 2 +// CHECK-NEXT: -2 + +func main() => integer +begin + print(fdiv_int(6, 3)); + print(fdiv_int(-5, 3)); + return 0; +end diff --git a/asllib/tests/language.t/Rswqd.asl b/asllib/tests/language.t/Rswqd.asl new file mode 100644 index 000000000..65dcd56d9 --- /dev/null +++ b/asllib/tests/language.t/Rswqd.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s +// CHECK-NOT: 10 + +// This is a comment and should not be passed + +// var a: integer = 10; + +func main() => integer +begin + // print(a); + return 0; +end diff --git a/asllib/tests/language.t/Rswvp.asl b/asllib/tests/language.t/Rswvp.asl new file mode 100644 index 000000000..eb845adcd --- /dev/null +++ b/asllib/tests/language.t/Rswvp.asl @@ -0,0 +1,19 @@ +// RUN: interp %s | FileCheck %s + +var b: integer; + +getter a[] => integer +begin + return b; +end + +setter a[] = value: integer +begin + b = value; + return; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rtcdl.asl b/asllib/tests/language.t/Rtcdl.asl new file mode 100644 index 000000000..93593e78c --- /dev/null +++ b/asllib/tests/language.t/Rtcdl.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func test{N: integer}(a: bits(N)) => integer{N} +begin + return N; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rtfjz.asl b/asllib/tests/language.t/Rtfjz.asl new file mode 100644 index 000000000..ce42844af --- /dev/null +++ b/asllib/tests/language.t/Rtfjz.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + constant a = 10; + + return 0; +end diff --git a/asllib/tests/language.t/Rthsv.asl b/asllib/tests/language.t/Rthsv.asl new file mode 100644 index 000000000..bd0425805 --- /dev/null +++ b/asllib/tests/language.t/Rthsv.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + + +func main() => integer +begin + print(shiftleft_int(100, -3)); + return 0; +end diff --git a/asllib/tests/language.t/Rtjkq.asl b/asllib/tests/language.t/Rtjkq.asl new file mode 100644 index 000000000..fdedd633c --- /dev/null +++ b/asllib/tests/language.t/Rtjkq.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +func test(N: integer) +begin + let illegal : integer {32, 64} = N; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rtjrh.asl b/asllib/tests/language.t/Rtjrh.asl new file mode 100644 index 000000000..937c61d26 --- /dev/null +++ b/asllib/tests/language.t/Rtjrh.asl @@ -0,0 +1,18 @@ +// RUN: not interp %s | FileCheck %s + +var _a: integer; + +getter a => integer +begin + return _a; +end + +getter _a[value: integer] => integer +begin + return _a; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rtmys.asl b/asllib/tests/language.t/Rtmys.asl new file mode 100644 index 000000000..2a11b111a --- /dev/null +++ b/asllib/tests/language.t/Rtmys.asl @@ -0,0 +1,14 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 3 + +func main() => integer +begin + if FALSE then + print("1"); + elsif FALSE then + print("2"); + elsif TRUE then + print("3"); + end + return 0; +end diff --git a/asllib/tests/language.t/Rtphr.asl b/asllib/tests/language.t/Rtphr.asl new file mode 100644 index 000000000..b17cae660 --- /dev/null +++ b/asllib/tests/language.t/Rtphr.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func under_constrained(a: integer{}) +begin + pass; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rtrdj.asl b/asllib/tests/language.t/Rtrdj.asl new file mode 100644 index 000000000..20d9bd43a --- /dev/null +++ b/asllib/tests/language.t/Rtrdj.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +var a: integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rttgq.asl b/asllib/tests/language.t/Rttgq.asl new file mode 100644 index 000000000..b7e8bfc1f --- /dev/null +++ b/asllib/tests/language.t/Rttgq.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s + +type a of boolean; + +func main() => integer +begin + var aa: a; + var aaa: integer; + + var b = aa || aaa; + return 0; +end diff --git a/asllib/tests/language.t/Rtvpr.asl b/asllib/tests/language.t/Rtvpr.asl new file mode 100644 index 000000000..f08b3c920 --- /dev/null +++ b/asllib/tests/language.t/Rtvpr.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +type a of (integer, integer); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rtxtc.asl b/asllib/tests/language.t/Rtxtc.asl new file mode 100644 index 000000000..c728abfa0 --- /dev/null +++ b/asllib/tests/language.t/Rtxtc.asl @@ -0,0 +1,25 @@ +// RUN: interp %s | FileCheck %s +// CHECK: Caught correctly +// CHECK-NEXT: Caught incorrectly + +type a of exception{}; +type b of exception{}; + +func main() => integer +begin + try + throw a{}; + catch + when a => print("Caught correctly"); + otherwise => print("Caught incorrectly"); + end + + + try + throw b{}; + catch + when a => print("Caught correctly"); + otherwise => print("Caught incorrectly"); + end + return 0; +end diff --git a/asllib/tests/language.t/Rtznr.asl b/asllib/tests/language.t/Rtznr.asl new file mode 100644 index 000000000..e954e1b64 --- /dev/null +++ b/asllib/tests/language.t/Rtznr.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +func test{N}(a: bits(N)) +begin + var b: integer{0..N}; + pass; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rtzrv.asl b/asllib/tests/language.t/Rtzrv.asl new file mode 100644 index 000000000..4c7bfd173 --- /dev/null +++ b/asllib/tests/language.t/Rtzrv.asl @@ -0,0 +1,10 @@ +// RUN: not interp %s | FileCheck %s + +config a = 10; + +func main() => integer +begin + constant b = a; + + return 0; +end diff --git a/asllib/tests/language.t/Rtzsp.asl b/asllib/tests/language.t/Rtzsp.asl new file mode 100644 index 000000000..715f6daf6 --- /dev/null +++ b/asllib/tests/language.t/Rtzsp.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s + +func test() +begin + pass; +end + +func main() => integer +begin + test2(); + return 0; +end diff --git a/asllib/tests/language.t/Rvbll.asl b/asllib/tests/language.t/Rvbll.asl new file mode 100644 index 000000000..8b98cc28e --- /dev/null +++ b/asllib/tests/language.t/Rvbll.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a : integer{2} = 2; + var b = a as integer{0..3}; + return 0; +end diff --git a/asllib/tests/language.t/Rvbmx.asl b/asllib/tests/language.t/Rvbmx.asl new file mode 100644 index 000000000..c235eed74 --- /dev/null +++ b/asllib/tests/language.t/Rvbmx.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: bits(4) = ['11', '00']; + + return 0; +end diff --git a/asllib/tests/language.t/Rvczx.asl b/asllib/tests/language.t/Rvczx.asl new file mode 100644 index 000000000..c5c58b4b3 --- /dev/null +++ b/asllib/tests/language.t/Rvczx.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +func b(n: bits({1,3,5})) +begin + pass; +end + +func main() => integer +begin + var a: bits({1,3,5}) = '011' as bits({1,3,5}); + return 0; +end diff --git a/asllib/tests/language.t/Rvddg.asl b/asllib/tests/language.t/Rvddg.asl new file mode 100644 index 000000000..ca541ff76 --- /dev/null +++ b/asllib/tests/language.t/Rvddg.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + Unreachable(); + return 0; +end diff --git a/asllib/tests/language.t/Rvdpc.asl b/asllib/tests/language.t/Rvdpc.asl new file mode 100644 index 000000000..b82131e8d --- /dev/null +++ b/asllib/tests/language.t/Rvdpc.asl @@ -0,0 +1,13 @@ +// RUN: interp %s | FileCheck %s + +func a() +begin + var bb: integer{0..2} = 1; + var cc = bb + 1; + var dd: integer{2..4} = cc + 1; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rvgzf.asl b/asllib/tests/language.t/Rvgzf.asl new file mode 100644 index 000000000..d9b435487 --- /dev/null +++ b/asllib/tests/language.t/Rvgzf.asl @@ -0,0 +1,14 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 80 +// CHECK-NEXT: 96 +// CHECK-NEXT: 3 +// CHECK-NEXT: 6 + +func main() => integer +begin + print(shiftleft_int(10, 3)); + print(shiftleft_int(3, 5)); + print(shiftright_int(100, 5)); + print(shiftright_int(50, 3)); + return 0; +end diff --git a/asllib/tests/language.t/Rvnkt.asl b/asllib/tests/language.t/Rvnkt.asl new file mode 100644 index 000000000..aeb6f3920 --- /dev/null +++ b/asllib/tests/language.t/Rvnkt.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer{1..10} = 4; + var b = (10 DIV a) == 5; + return 0; +end diff --git a/asllib/tests/language.t/Rvtjw.asl b/asllib/tests/language.t/Rvtjw.asl new file mode 100644 index 000000000..a21daa997 --- /dev/null +++ b/asllib/tests/language.t/Rvtjw.asl @@ -0,0 +1,9 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + for i = 0.0 to 10.0 do + pass; + end + return 0; +end diff --git a/asllib/tests/language.t/Rwbcq.asl b/asllib/tests/language.t/Rwbcq.asl new file mode 100644 index 000000000..7434321f8 --- /dev/null +++ b/asllib/tests/language.t/Rwbcq.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +type a of record { + x: integer, + y: integer +}; + +func main() => integer +begin + var b = a { x = 10, y = 5 }; + return 0; +end diff --git a/asllib/tests/language.t/Rwdgq.asl b/asllib/tests/language.t/Rwdgq.asl new file mode 100644 index 000000000..980dc19d1 --- /dev/null +++ b/asllib/tests/language.t/Rwdgq.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +let x: integer = 10; +func main() => integer +begin + x = 5; + return 0; +end diff --git a/asllib/tests/language.t/Rwfmf.asl b/asllib/tests/language.t/Rwfmf.asl new file mode 100644 index 000000000..7a4b90de7 --- /dev/null +++ b/asllib/tests/language.t/Rwfmf.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +type a of record; +type b of record{}; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rwgsy.asl b/asllib/tests/language.t/Rwgsy.asl new file mode 100644 index 000000000..0c94b40b6 --- /dev/null +++ b/asllib/tests/language.t/Rwgsy.asl @@ -0,0 +1,9 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + case '1' of + when '1' where 1 => pass; + end + return 0; +end diff --git a/asllib/tests/language.t/Rwgvr.asl b/asllib/tests/language.t/Rwgvr.asl new file mode 100644 index 000000000..a5af26f88 --- /dev/null +++ b/asllib/tests/language.t/Rwgvr.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 0 + +func main() => integer +begin + var a: array[10] of integer; + print(a[0]); + return 0; +end diff --git a/asllib/tests/language.t/Rwhrs.asl b/asllib/tests/language.t/Rwhrs.asl new file mode 100644 index 000000000..e5f7632a6 --- /dev/null +++ b/asllib/tests/language.t/Rwhrs.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! I am not sure what this means + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rwjyh.asl b/asllib/tests/language.t/Rwjyh.asl new file mode 100644 index 000000000..57ee418d0 --- /dev/null +++ b/asllib/tests/language.t/Rwjyh.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +type unconstrained of integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rwkcy.asl b/asllib/tests/language.t/Rwkcy.asl new file mode 100644 index 000000000..d88f9b247 --- /dev/null +++ b/asllib/tests/language.t/Rwkcy.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s +// CHECK: + +func main() => integer +begin + var a: string; + print(a); + return 0; +end diff --git a/asllib/tests/language.t/Rwkhc_a.asl b/asllib/tests/language.t/Rwkhc_a.asl new file mode 100644 index 000000000..09b9082f5 --- /dev/null +++ b/asllib/tests/language.t/Rwkhc_a.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s + +func a() +begin + throw; +end + +func b() +begin + a(); +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rwkhc_b.asl b/asllib/tests/language.t/Rwkhc_b.asl new file mode 100644 index 000000000..9a5cf7095 --- /dev/null +++ b/asllib/tests/language.t/Rwkhc_b.asl @@ -0,0 +1,11 @@ +// RUN: not interp %s | FileCheck %s + +func a() +begin + +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rwlch.asl b/asllib/tests/language.t/Rwlch.asl new file mode 100644 index 000000000..bb67b10a1 --- /dev/null +++ b/asllib/tests/language.t/Rwlch.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! I believe this is internal only + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rwmfv.asl b/asllib/tests/language.t/Rwmfv.asl new file mode 100644 index 000000000..28c8d7d4b --- /dev/null +++ b/asllib/tests/language.t/Rwmfv.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer = 10; + var b: integer = a; + return 0; +end diff --git a/asllib/tests/language.t/Rwqrn.asl b/asllib/tests/language.t/Rwqrn.asl new file mode 100644 index 000000000..078b0b94f --- /dev/null +++ b/asllib/tests/language.t/Rwqrn.asl @@ -0,0 +1,16 @@ +// RUN: not interp %s | FileCheck %s + +var a: integer; + +func sideeffect() => boolean +begin + a = a + 1; + + return TRUE; +end + +func main() => integer +begin + assert(sideeffect()); + return 0; +end diff --git a/asllib/tests/language.t/Rwvqt.asl b/asllib/tests/language.t/Rwvqt.asl new file mode 100644 index 000000000..29abd2055 --- /dev/null +++ b/asllib/tests/language.t/Rwvqt.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s +// CHECK-NOT: 1 + +func main() => integer +begin + var a : integer = 0; + repeat + print(a); + a = a + 1; + until TRUE; + return 0; +end diff --git a/asllib/tests/language.t/Rwvxs.asl b/asllib/tests/language.t/Rwvxs.asl new file mode 100644 index 000000000..1f6fb0733 --- /dev/null +++ b/asllib/tests/language.t/Rwvxs.asl @@ -0,0 +1,15 @@ +// RUN: interp %s | FileCheck %s + +type a of exception{ + aa: integer +}; + +func main() => integer +begin + try + pass; + catch + when aa: a => var b: integer = aa.aa; + end + return 0; +end diff --git a/asllib/tests/language.t/Rwwtv_a.asl b/asllib/tests/language.t/Rwwtv_a.asl new file mode 100644 index 000000000..f97180f3b --- /dev/null +++ b/asllib/tests/language.t/Rwwtv_a.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + print(div_int(6, -3)); + return 0; +end diff --git a/asllib/tests/language.t/Rwwtv_b.asl b/asllib/tests/language.t/Rwwtv_b.asl new file mode 100644 index 000000000..2cfedf871 --- /dev/null +++ b/asllib/tests/language.t/Rwwtv_b.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + print(fdiv_int(6, 0)); + return 0; +end diff --git a/asllib/tests/language.t/Rwzcs.asl b/asllib/tests/language.t/Rwzcs.asl new file mode 100644 index 000000000..f2b33d03b --- /dev/null +++ b/asllib/tests/language.t/Rwzcs.asl @@ -0,0 +1,9 @@ +// RUN: not interp %s | FileCheck %s + +var a = '1111 1111'; + +func main() => integer +begin + var b = a[1:4]; + return 0; +end diff --git a/asllib/tests/language.t/Rwzjq.asl b/asllib/tests/language.t/Rwzjq.asl new file mode 100644 index 000000000..268a3dca3 --- /dev/null +++ b/asllib/tests/language.t/Rwzjq.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +let a = 10; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rwzsl.asl b/asllib/tests/language.t/Rwzsl.asl new file mode 100644 index 000000000..8aeb56252 --- /dev/null +++ b/asllib/tests/language.t/Rwzsl.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + assert(FALSE); + return 0; +end diff --git a/asllib/tests/language.t/Rwzvx.asl b/asllib/tests/language.t/Rwzvx.asl new file mode 100644 index 000000000..dceee3aa2 --- /dev/null +++ b/asllib/tests/language.t/Rwzvx.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var a : integer{0..4} = 4; + var b = a as integer{0..3}; + return 0; +end diff --git a/asllib/tests/language.t/Rxbmn.asl b/asllib/tests/language.t/Rxbmn.asl new file mode 100644 index 000000000..bb67b10a1 --- /dev/null +++ b/asllib/tests/language.t/Rxbmn.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +// ! I believe this is internal only + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rxcjd.asl b/asllib/tests/language.t/Rxcjd.asl new file mode 100644 index 000000000..b950ab3d5 --- /dev/null +++ b/asllib/tests/language.t/Rxcjd.asl @@ -0,0 +1,16 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 1.000000e+69 +// CHECK-NEXT: -1.000000e+69 +// CHECK-NEXT: 1.000000e-70 + +func main() => integer +begin + var a: real = 1000000000000000000000000000000000000000000000000000000000000000000000.0; + var b: real = -1000000000000000000000000000000000000000000000000000000000000000000000.0; + var c: real = 0.0000000000000000000000000000000000000000000000000000000000000000000001; + + print(a); + print(b); + print(c); + return 0; +end diff --git a/asllib/tests/language.t/Rxhpb.asl b/asllib/tests/language.t/Rxhpb.asl new file mode 100644 index 000000000..573d4fec6 --- /dev/null +++ b/asllib/tests/language.t/Rxhpb.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a = 10; + + return 0; +end diff --git a/asllib/tests/language.t/Rxkgc.asl b/asllib/tests/language.t/Rxkgc.asl new file mode 100644 index 000000000..b791c742d --- /dev/null +++ b/asllib/tests/language.t/Rxkgc.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var a: integer = 10 - 5 - 3; + return 0; +end diff --git a/asllib/tests/language.t/Rxnbn.asl b/asllib/tests/language.t/Rxnbn.asl new file mode 100644 index 000000000..5d5abd786 --- /dev/null +++ b/asllib/tests/language.t/Rxnbn.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a : bits(10 + 10); + var b : bits(20) = a; + return 0; +end diff --git a/asllib/tests/language.t/Rxnsk.asl b/asllib/tests/language.t/Rxnsk.asl new file mode 100644 index 000000000..b9ec89464 --- /dev/null +++ b/asllib/tests/language.t/Rxnsk.asl @@ -0,0 +1,15 @@ +// RUN: not interp %s | FileCheck %s + +type a of exception{}; + + +func thrower() +begin + throw a; +end + +func main() => integer +begin + thrower(); + return 0; +end diff --git a/asllib/tests/language.t/Rxsdc.asl b/asllib/tests/language.t/Rxsdc.asl new file mode 100644 index 000000000..573d4fec6 --- /dev/null +++ b/asllib/tests/language.t/Rxsdc.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a = 10; + + return 0; +end diff --git a/asllib/tests/language.t/Rxssl.asl b/asllib/tests/language.t/Rxssl.asl new file mode 100644 index 000000000..d0f52db77 --- /dev/null +++ b/asllib/tests/language.t/Rxssl.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 2 + +func main() => integer +begin + if FALSE then + print("1"); + else + print("2"); + end + return 0; +end diff --git a/asllib/tests/language.t/Rxvwk.asl b/asllib/tests/language.t/Rxvwk.asl new file mode 100644 index 000000000..31ec1bfe7 --- /dev/null +++ b/asllib/tests/language.t/Rxvwk.asl @@ -0,0 +1,18 @@ +// RUN: interp %s | FileCheck %s + +func f(P: integer {2,4,8}) +begin + var opA = [Zeros(P-1), '1']; + // First element of concatenation is a constrained width bitvector of determined width + // with constraint {1,3,7} and width (P-1) + // Second element of concatenation is a fixed width bitvector of width 1 + // For the purpose of calculating the resulting type, it has constraint {1} + // The result is a constrained width bitvector of determined width + // with constraint {1+1,3+1,7+1} and width ((P-1)+1) + // Hence the type of opA is bits(P as {2,4,8}) +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rxylp.asl b/asllib/tests/language.t/Rxylp.asl new file mode 100644 index 000000000..a272304fe --- /dev/null +++ b/asllib/tests/language.t/Rxylp.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: bits({1..10}) = '111'; + + return 0; +end diff --git a/asllib/tests/language.t/Rxzvt.asl b/asllib/tests/language.t/Rxzvt.asl new file mode 100644 index 000000000..47f1dad22 --- /dev/null +++ b/asllib/tests/language.t/Rxzvt.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +config test = TRUE; +func main() => integer +begin + var a: integer{0, 1} = if test then 0 else 1; + return 0; +end diff --git a/asllib/tests/language.t/Rybwy.asl b/asllib/tests/language.t/Rybwy.asl new file mode 100644 index 000000000..22c7aa1a6 --- /dev/null +++ b/asllib/tests/language.t/Rybwy.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s + +type base of record { + one: other +}; + +type other of base; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rycdb.asl b/asllib/tests/language.t/Rycdb.asl new file mode 100644 index 000000000..50e14a7ad --- /dev/null +++ b/asllib/tests/language.t/Rycdb.asl @@ -0,0 +1,19 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 10 +// CHECK-NEXT: 5 +// CHECK-NEXT: 3 + +func main() => integer +begin + var a = if TRUE then 10 else 5; + print(a); + + var b = if FALSE then 10 else 5; + print(b); + + var t = a + b; + + var c = if t == 20 then 1 elsif t == 10 then 2 elsif t == 15 then 3 else 4; + print(c); + return 0; +end diff --git a/asllib/tests/language.t/Rycpx.asl b/asllib/tests/language.t/Rycpx.asl new file mode 100644 index 000000000..69aca7370 --- /dev/null +++ b/asllib/tests/language.t/Rycpx.asl @@ -0,0 +1,24 @@ +// RUN: interp %s | FileCheck %s + +config a = 10; + +func f1() => boolean +begin + return a == 0; +end + +func f2(t: integer{2,4,8}) => boolean +begin + return a == t; +end + +func checkY (y: integer) +begin + if (f1() && f2(y as {2,4,8})) then pass; end +end + +func main() => integer +begin + checkY(10); + return 0; +end diff --git a/asllib/tests/language.t/Rydfq.asl b/asllib/tests/language.t/Rydfq.asl new file mode 100644 index 000000000..9cde95dff --- /dev/null +++ b/asllib/tests/language.t/Rydfq.asl @@ -0,0 +1,22 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 4 + +var _a: integer = 10; + +getter a => integer +begin + return _a; +end + +setter a = value: integer +begin + _a = value; +end + +func main() => integer +begin + a = 4; + print(_a); + + return 0; +end diff --git a/asllib/tests/language.t/Ryhnv.asl b/asllib/tests/language.t/Ryhnv.asl new file mode 100644 index 000000000..27b686548 --- /dev/null +++ b/asllib/tests/language.t/Ryhnv.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +type a of enumeration {A, B}; +type b of array [a] of integer; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Ryspm.asl b/asllib/tests/language.t/Ryspm.asl new file mode 100644 index 000000000..60299ffaa --- /dev/null +++ b/asllib/tests/language.t/Ryspm.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer{1} = 1; + let b: integer{2} = 2; + constant c: integer{3} = 3; + + var d: integer{6} = a + b + c; + return 0; +end diff --git a/asllib/tests/language.t/Rytky.asl b/asllib/tests/language.t/Rytky.asl new file mode 100644 index 000000000..14b633037 --- /dev/null +++ b/asllib/tests/language.t/Rytky.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +var a: boolean = TRUE; +var b: boolean = FALSE; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rytnr.asl b/asllib/tests/language.t/Rytnr.asl new file mode 100644 index 000000000..9d002a0f6 --- /dev/null +++ b/asllib/tests/language.t/Rytnr.asl @@ -0,0 +1,10 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var a : integer = 0; + for x = a to 10 do + a = a + 1; + end + return 0; +end diff --git a/asllib/tests/language.t/Ryvxf.asl b/asllib/tests/language.t/Ryvxf.asl new file mode 100644 index 000000000..3b0310e5e --- /dev/null +++ b/asllib/tests/language.t/Ryvxf.asl @@ -0,0 +1,19 @@ +// RUN: interp %s | FileCheck %s +// CHECK: a + +type a of exception{}; +type b of exception{}; +type c of exception{}; + +func main() => integer +begin + try + throw a{}; + catch + when a => print("a"); + when b => print("b"); + otherwise => print("other"); + end + + return 0; +end diff --git a/asllib/tests/language.t/Ryyfr.asl b/asllib/tests/language.t/Ryyfr.asl new file mode 100644 index 000000000..99de15b56 --- /dev/null +++ b/asllib/tests/language.t/Ryyfr.asl @@ -0,0 +1,14 @@ +// RUN: not interp %s | FileCheck %s + +type a of bits(4) { + [0] aa, + [0] bb +}; + +func main() => integer +begin + var b: a; + b.[aa, bb] = '11'; + + return 0; +end diff --git a/asllib/tests/language.t/Ryypn.asl b/asllib/tests/language.t/Ryypn.asl new file mode 100644 index 000000000..5d69f41df --- /dev/null +++ b/asllib/tests/language.t/Ryypn.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a : bits(2) {[0] a [1] b} = '11'; + var b : bits(2) {[0] a [1] b} = a; + + return 0; +end diff --git a/asllib/tests/language.t/Ryzhm.asl b/asllib/tests/language.t/Ryzhm.asl new file mode 100644 index 000000000..7cbfd27c2 --- /dev/null +++ b/asllib/tests/language.t/Ryzhm.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! There are alot of cases to test here and its not interpreter related. + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rzcvd.asl b/asllib/tests/language.t/Rzcvd.asl new file mode 100644 index 000000000..14abadcf9 --- /dev/null +++ b/asllib/tests/language.t/Rzcvd.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +func a(N: integer{}, M: integer{}) +begin + var b = N; + var c: integer{}; +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rzdkc.asl b/asllib/tests/language.t/Rzdkc.asl new file mode 100644 index 000000000..694c8280f --- /dev/null +++ b/asllib/tests/language.t/Rzdkc.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +var x: integer{} = 10; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rzdsj.asl b/asllib/tests/language.t/Rzdsj.asl new file mode 100644 index 000000000..8a813252c --- /dev/null +++ b/asllib/tests/language.t/Rzdsj.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +var a : integer{10} = 10; +var b : integer{9} = 0x9; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rzffv.asl b/asllib/tests/language.t/Rzffv.asl new file mode 100644 index 000000000..b580ce6a4 --- /dev/null +++ b/asllib/tests/language.t/Rzffv.asl @@ -0,0 +1,8 @@ +// RUN : interp %s | FileCheck %s + +// ! Not sure what this means + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rzhvh.asl b/asllib/tests/language.t/Rzhvh.asl new file mode 100644 index 000000000..22909a0f7 --- /dev/null +++ b/asllib/tests/language.t/Rzhvh.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var (a, b) = (1, 2, 3); + + return 0; +end diff --git a/asllib/tests/language.t/Rzhyt.asl b/asllib/tests/language.t/Rzhyt.asl new file mode 100644 index 000000000..89f58d890 --- /dev/null +++ b/asllib/tests/language.t/Rzhyt.asl @@ -0,0 +1,14 @@ +// RUN: interp %s | FileCheck %s + +type a of record { + aa: bits(2), + bb: bits(2) +}; + + +func main() => integer +begin + var b: a; + b.[aa, bb] = '1111'; + return 0; +end diff --git a/asllib/tests/language.t/Rzjky.asl b/asllib/tests/language.t/Rzjky.asl new file mode 100644 index 000000000..1623d52d7 --- /dev/null +++ b/asllib/tests/language.t/Rzjky.asl @@ -0,0 +1,8 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer{10} = 10; + + return 0; +end diff --git a/asllib/tests/language.t/Rzjsh.asl b/asllib/tests/language.t/Rzjsh.asl new file mode 100644 index 000000000..f064477c9 --- /dev/null +++ b/asllib/tests/language.t/Rzjsh.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +type a of bits(6) { + [4:0] aa, +}; + +func main() => integer +begin + var b: a; + var c: bits(5) = b.aa; + return 0; +end diff --git a/asllib/tests/language.t/Rzlwd.asl b/asllib/tests/language.t/Rzlwd.asl new file mode 100644 index 000000000..3a582bfce --- /dev/null +++ b/asllib/tests/language.t/Rzlwd.asl @@ -0,0 +1,12 @@ +// RUN: not interp %s | FileCheck %s + +func test{N: integer{5..10}}(a: bits(N)) +begin + pass; +end + +func main() => integer +begin + test('11'); + return 0; +end diff --git a/asllib/tests/language.t/Rzndl.asl b/asllib/tests/language.t/Rzndl.asl new file mode 100644 index 000000000..3d6ef1275 --- /dev/null +++ b/asllib/tests/language.t/Rzndl.asl @@ -0,0 +1,37 @@ +// RUN: interp %s | FileCheck %s +// CHECK-: TRUE +// CHECK-NEXT: TRUE +// CHECK-NEXT: FALSE +// CHECK-NEXT: TRUE +// CHECK-NEXT: FALSE +// CHECK-NEXT: TRUE +// CHECK-NEXT: TRUE +// CHECK-NEXT: TRUE +// CHECK-NEXT: TRUE +// CHECK-NEXT: FALSE + +func main() => integer +begin + let expr_A = '111' IN {'1xx'}; + print(expr_A); + let expr_Aa = '111' IN '1xx'; + print(expr_Aa); + let expr_B = '111' IN {'0xx'}; + print(expr_B); + let expr_C = 3 IN {2,3,4}; + print(expr_C); + let expr_D = 1 IN {2,3,4}; + print(expr_D); + let expr_E = 3 IN {1..10}; + print(expr_E); + let expr_F = 3 IN {<= 10}; + print(expr_F); + let expr_G = 3 IN !{1,2,4}; + print(expr_G); + let expr_H = (1,'10') IN {(1,'1x')}; + print(expr_H); + let expr_I = (1,'10') IN {(1,'0x'), (2, '1x')}; + print(expr_I); + + return 0; +end diff --git a/asllib/tests/language.t/Rznth.asl b/asllib/tests/language.t/Rznth.asl new file mode 100644 index 000000000..fab46a51e --- /dev/null +++ b/asllib/tests/language.t/Rznth.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +var a: bits(10); +config b = 10; +var bb: bits(b); +constant c = 10; +var cc: bits(c); + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rzrkm.asl b/asllib/tests/language.t/Rzrkm.asl new file mode 100644 index 000000000..f4e5f7dcf --- /dev/null +++ b/asllib/tests/language.t/Rzrkm.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +type a of integer; +type b of integer subtypes a; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rzrvy.asl b/asllib/tests/language.t/Rzrvy.asl new file mode 100644 index 000000000..1c8746512 --- /dev/null +++ b/asllib/tests/language.t/Rzrvy.asl @@ -0,0 +1,15 @@ +// RUN: interp %s | FileCheck %s +// CHECK: hello +// CHECK-NEXT: wor"ld +// CHECK-NEXT: te\st +// CHECK-NEXT: bre +// CHECK-NEXT: ak + +func main() => integer +begin + print("hello"); + print("wor\"ld"); + print("te\\st"); + print("bre\nak"); + return 0; +end diff --git a/asllib/tests/language.t/Rzrwh.asl b/asllib/tests/language.t/Rzrwh.asl new file mode 100644 index 000000000..4776161d8 --- /dev/null +++ b/asllib/tests/language.t/Rzrwh.asl @@ -0,0 +1,7 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: bits(16) = '0000 0001 0010 0100'; + return 0; +end diff --git a/asllib/tests/language.t/Rzsnd.asl b/asllib/tests/language.t/Rzsnd.asl new file mode 100644 index 000000000..8dda6e36a --- /dev/null +++ b/asllib/tests/language.t/Rzsnd.asl @@ -0,0 +1,20 @@ +// RUN: interp %s | FileCheck %s + +func testa(N: integer) +begin + for x = 0 to N do + pass; + end +end + +func testb(N: integer{}) +begin + for x = 0 to N do + pass; + end +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rztjn_a.asl b/asllib/tests/language.t/Rztjn_a.asl new file mode 100644 index 000000000..84119cfee --- /dev/null +++ b/asllib/tests/language.t/Rztjn_a.asl @@ -0,0 +1,10 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 2 +// CHECK-NEXT: -2 + +func main() => integer +begin + print(div_int(6, 3)); + print(div_int(-6, 3)); + return 0; +end diff --git a/asllib/tests/language.t/Rztjn_b.asl b/asllib/tests/language.t/Rztjn_b.asl new file mode 100644 index 000000000..77404eed0 --- /dev/null +++ b/asllib/tests/language.t/Rztjn_b.asl @@ -0,0 +1,7 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + print(div_int(6, 2)); + return 0; +end diff --git a/asllib/tests/language.t/Rztlb.asl b/asllib/tests/language.t/Rztlb.asl new file mode 100644 index 000000000..39cbdaf7a --- /dev/null +++ b/asllib/tests/language.t/Rztlb.asl @@ -0,0 +1,22 @@ +// RUN: interp %s | FileCheck %s +// CHECK: a + +type a of exception{}; +type b of exception{}; +type c of exception{}; + +func main() => integer +begin + try + try + throw a{}; + catch + when b => print("b"); + end + catch + when a => print("a"); + when b => print("b"); + otherwise => print("other"); + end + return 0; +end diff --git a/asllib/tests/language.t/Rztrr.asl b/asllib/tests/language.t/Rztrr.asl new file mode 100644 index 000000000..954f670a3 --- /dev/null +++ b/asllib/tests/language.t/Rztrr.asl @@ -0,0 +1,8 @@ +// RUN: not interp %s | FileCheck %s + +func main() => integer +begin + var a: array[10] of integer; + var b = a[100]; + return 0; +end diff --git a/asllib/tests/language.t/Rzvpt.asl b/asllib/tests/language.t/Rzvpt.asl new file mode 100644 index 000000000..975432f2d --- /dev/null +++ b/asllib/tests/language.t/Rzvpt.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 0x0 + +func main() => integer +begin + var a: bits(32); + print(a); + return 0; +end diff --git a/asllib/tests/language.t/Rzwch.asl b/asllib/tests/language.t/Rzwch.asl new file mode 100644 index 000000000..e3d5dfbe9 --- /dev/null +++ b/asllib/tests/language.t/Rzwch.asl @@ -0,0 +1,12 @@ +// RUN: interp %s | FileCheck %s + +type a of exception { + x: integer, + y: integer +}; + +func main() => integer +begin + var b = a { x = 10, y = 5 }; + return 0; +end diff --git a/asllib/tests/language.t/Rzwgh.asl b/asllib/tests/language.t/Rzwgh.asl new file mode 100644 index 000000000..6470b3e87 --- /dev/null +++ b/asllib/tests/language.t/Rzwgh.asl @@ -0,0 +1,7 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: bits(2) = '01'; + return 0; +end diff --git a/asllib/tests/language.t/Rzwhp.asl b/asllib/tests/language.t/Rzwhp.asl new file mode 100644 index 000000000..d6f6bc950 --- /dev/null +++ b/asllib/tests/language.t/Rzwhp.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +type a of integer; +type b subtypes a; + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/Rzxhp.asl b/asllib/tests/language.t/Rzxhp.asl new file mode 100644 index 000000000..0b63770e4 --- /dev/null +++ b/asllib/tests/language.t/Rzxhp.asl @@ -0,0 +1,18 @@ +// RUN: interp %s | FileCheck %s +// CHECK: 1 +// CHECK-NEXT: 2 +// CHECK-NEXT: 3 + +func test() => integer +begin + print(2); + return 3; +end + +func main() => integer +begin + print(1); + var a = test(); + print(a); + return 0; +end diff --git a/asllib/tests/language.t/Rzyvw.asl b/asllib/tests/language.t/Rzyvw.asl new file mode 100644 index 000000000..64b95d841 --- /dev/null +++ b/asllib/tests/language.t/Rzyvw.asl @@ -0,0 +1,11 @@ +// RUN: interp %s | FileCheck %s +// CHECK: Otherwise + +func main() => integer +begin + case TRUE of + when FALSE => print("FALSE"); + otherwise => print("Otherwise"); + end + return 0; +end diff --git a/asllib/tests/language.t/Rzywy.asl b/asllib/tests/language.t/Rzywy.asl new file mode 100644 index 000000000..45935c5d4 --- /dev/null +++ b/asllib/tests/language.t/Rzywy.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +func main() => integer +begin + var a: integer = 10; + var b: integer = a + 10; + + return 0; +end diff --git a/asllib/tests/language.t/Uxknl.asl b/asllib/tests/language.t/Uxknl.asl new file mode 100644 index 000000000..db80cc222 --- /dev/null +++ b/asllib/tests/language.t/Uxknl.asl @@ -0,0 +1,9 @@ +// RUN: interp %s | FileCheck %s + +config a: integer{0..99999999999999999999999999999999} = 4; + +func main() => integer +begin + var b: bits(a); + return 0; +end diff --git a/asllib/tests/language.t/Xxswl.asl b/asllib/tests/language.t/Xxswl.asl new file mode 100644 index 000000000..3698622a5 --- /dev/null +++ b/asllib/tests/language.t/Xxswl.asl @@ -0,0 +1,54 @@ +// RUN: interp %s | FileCheck %s + +// Neither ADDR nor PHYSICAL_ADDR is a subtype of the other. +type ADDR of bits (32) {}; +type PHYSICAL_ADDR of ADDR; + +var addr : ADDR; +var physical: PHYSICAL_ADDR; + +// For the function "raw_addr", +func raw_addr(x: ADDR) => bits(32) +begin + // x may be used as the expression in the return statement + // since the return type is type satisfied by the type of x + return x; +end + +func raw_physical_addr(x: PHYSICAL_ADDR) => bits(32) +begin + return x; +end + +func addresses() +begin + var tmp: bits(32); + // primitive type bits(32) is type-satisfied by both ADDR and PHYSICAL_ADDR + tmp = addr; + physical = tmp; + tmp = ['0', tmp[30:0]]; + addr = tmp; + physical = raw_addr(addr); + addr = raw_physical_addr(physical); + physical = addr[31:0]; // a bitslice is of type bits(N) + addr = physical[31:0]; +end + +type Char of integer{0..255}; +type Byte of integer{0..255}; + +constant K: Char = 210; +var c: Char; +var b: Byte; + +func f() +begin + c = 210; // legal: c has the structure of integer and can be assigned an integer + c = K; // legal: K has type Char and can be assigned to a Char + // b = K; // illegal: a Char cannot be directly assigned to a Byte +end + +func main() => integer +begin + return 0; +end diff --git a/asllib/tests/language.t/run.t b/asllib/tests/language.t/run.t new file mode 100644 index 000000000..d28ecf92e --- /dev/null +++ b/asllib/tests/language.t/run.t @@ -0,0 +1,2669 @@ +Utils: +Make sure that paths to stdlib.asl are hidden + $ export BUILD_PATH_PREFIX_MAP="DUNE_SOURCEROOT=$DUNE_SOURCEROOT:$BUILD_PATH_PREFIX_MAP" + +Test Imhys.asl: + $ aslref Imhys.asl + File Imhys.asl, line 5, characters 11 to 16: + ASL Execution error: Assertion failed: FALSE + [1] + +Test Iwxgp.asl: + $ aslref Iwxgp.asl + File Iwxgp.asl, line 5, characters 11 to 16: + ASL Execution error: Assertion failed: FALSE + [1] + +Test Rdpzk.asl: + $ aslref Rdpzk.asl + File Rdpzk.asl, line 5, characters 11 to 16: + ASL Execution error: Assertion failed: FALSE + [1] + +Test Rirnq.asl: + $ aslref Rirnq.asl + File Rirnq.asl, line 6, characters 11 to 16: + ASL Execution error: Assertion failed: FALSE + [1] +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rirnq.asl + // CHECK: runtime_exception + +Test Rmhfw.asl: + $ aslref Rmhfw.asl + File Rmhfw.asl, line 5, characters 11 to 16: + ASL Execution error: Assertion failed: FALSE + [1] + +Test Rvddg.asl: + $ aslref Rvddg.asl + File ASL Standard Library, line 259, characters 9 to 14: + ASL Execution error: Assertion failed: FALSE + [1] + +Test Ibklj.asl: + $ aslref Ibklj.asl + +Test Icxps.asl: + $ aslref Icxps.asl + Hello world +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Icxps.asl + // CHECK: Hello world + +Test Rbsqr.asl + $ aslref Rbsqr.asl + File Rbsqr.asl, line 7, characters 4 to 5: + ASL Typing error: cannot assign to immutable storage "a". + [1] + +Test Rchth.asl: + $ aslref Rchth.asl + [1] + +Test Rjwph.asl: + $ aslref Rjwph.asl + Hello World +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rjwph.asl + // CHECK: Hello World + +Test Rxnsk.asl: + $ aslref Rxnsk.asl + File Rxnsk.asl, line 8, characters 10 to 11: + ASL Error: Undefined identifier: 'a' + [1] + +Test Dgvbk.asl: + $ aslref Dgvbk.asl + +Test Inxkd.asl: + $ aslref Inxkd.asl + +Test Rfrwd.asl: + $ aslref Rfrwd.asl + +Test Rswqd.asl: + $ aslref Rswqd.asl +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rswqd.asl + // CHECK-NOT: 10 + +Test Ihjcd.asl: + $ aslref Ihjcd.asl + 1000000 + 1000000 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Ihjcd.asl + // CHECK: 1000000 + // CHECK-NEXT: 1000000 + +Test Ipbpq.asl: + $ aslref Ipbpq.asl + TRUE + TRUE +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Ipbpq.asl + // CHECK: TRUE + // CHECK-NEXT: TRUE + +Test Iqczx.asl: + $ aslref Iqczx.asl + '1111111111111111' + '1111111111111111' +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Iqczx.asl + // CHECK: 0xFFFF + // CHECK-NEXT: 0xFFFF + +Test Rhyfh.asl: + $ aslref Rhyfh.asl + 10 + 10 + 10 + 10 + 10 + 10 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rhyfh.asl + // CHECK: 10 + // CHECK-NEXT: 10 + // CHECK-NEXT: 10 + // CHECK-NEXT: 10 + // CHECK-NEXT: 10 + // CHECK-NEXT: 10 + +Test Rmxps.asl: + $ aslref Rmxps.asl + FALSE + TRUE +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rmxps.asl + // CHECK: FALSE + // CHECK-NEXT: TRUE + +Test Rpbfk.asl: + $ aslref Rpbfk.asl + '0000' + '1111' + '0000' +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rpbfk.asl + // CHECK: 0x0 + // CHECK-NEXT: 0xF + // CHECK-NEXT: 0x0 + +Test Rqqbb.asl: + $ aslref Rqqbb.asl + 10. + 10. + 10. + 10. + 10. + 10. +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rqqbb.asl + // CHECK: 10.0 + // CHECK-NEXT: 10.0 + // CHECK-NEXT: 10.0 + // CHECK-NEXT: 10.0 + // CHECK-NEXT: 10.0 + // CHECK-NEXT: 10.0 + +Test Rrymd.asl: + $ aslref Rrymd.asl + +Test Rzrvy.asl: + $ aslref Rzrvy.asl + hello + wor"ld + te\st + bre + ak +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rzrvy.asl + // CHECK: hello + // CHECK-NEXT: wor"ld + // CHECK-NEXT: te\st + // CHECK-NEXT: bre + // CHECK-NEXT: ak + +Test Ihvlx.asl: + $ aslref Ihvlx.asl + +Test Iscly.asl: + $ aslref Iscly.asl + File Iscly.asl, line 5, characters 8 to 12: + ASL Error: Cannot parse. + [1] + +Test Rhprd.asl: + $ aslref Rhprd.asl + +Test Rjgrk.asl: + $ aslref Rjgrk.asl + +Test Rqmdm.asl: + $ aslref Rqmdm.asl + +Test Rgfsh.asl: + $ aslref Rgfsh.asl + File Rgfsh.asl, line 5, characters 4 to 25: + ASL Error: Undefined identifier: 'String' + [1] + +Test Ddpxj.asl: + $ aslref Ddpxj.asl + +Test Ipgss.asl: + $ aslref Ipgss.asl + 0 + 0 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Ipgss.asl + // CHECK: 0 + // CHECK-NEXT: 0 + +Test Rdgjt.asl: + $ aslref Rdgjt.asl + +Test Rhhcd.asl: + $ aslref Rhhcd.asl + +Test Rjjcj.asl: + $ aslref Rjjcj.asl + +Test Rpxrr.asl: + $ aslref Rpxrr.asl + +Test Rwgvr.asl: + $ aslref Rwgvr.asl + 0 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rwgvr.asl + // CHECK: 0 + +Test Ryhnv.asl: + $ aslref Ryhnv.asl + +Test Ihmrk.asl: + $ aslref Ihmrk.asl + 0 + FALSE +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Ihmrk.asl + // CHECK: 0 + // CHECK-NEXT: FALSE + +Test Imqwb.asl: + $ aslref Imqwb.asl + +Test Rcgwr.asl: + $ aslref Rcgwr.asl + +Test Rjhkl.asl: + $ aslref Rjhkl.asl + File Rjhkl.asl, line 6, characters 4 to 5: + ASL Typing error: integer {10} does not subtype any of: bits(-), record { }, + exception { }. + [1] + +Test Rqwsq.asl: + $ aslref Rqwsq.asl + 0 + 0 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rqwsq.asl + // CHECK: 0 + // CHECK-NEXT: 0 + +Test Rtvpr.asl: + $ aslref Rtvpr.asl + +Test Dwgqs.asl: + $ aslref Dwgqs.asl + +Test Itfps.asl: + $ aslref Itfps.asl + +Test Rdlxv.asl: + $ aslref Rdlxv.asl + 10 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rdlxv.asl + // CHECK: 10 + +Test Rdxwn.asl: + $ aslref Rdxwn.asl + +Test Rmbrm.asl: + $ aslref Rmbrm.asl + 0 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rmbrm.asl + // CHECK: 0 + +Test Rmdzd.asl: + $ aslref Rmdzd.asl + File Rmdzd.asl, line 3, character 0 to line 6, character 2: + ASL Typing error: cannot declare already declared element "b". + [1] + +Test Rwfmf.asl: + $ aslref Rwfmf.asl + +Test Dqxyc.asl: + $ aslref Dqxyc.asl + +Test Ihlbl.asl: + $ aslref Ihlbl.asl + +Test Rbwdx.asl: + $ aslref Rbwdx.asl + 10 + +Test Rchkr.asl: + $ aslref Rchkr.asl + File Rchkr.asl, line 3, character 0 to line 6, character 2: + ASL Typing error: cannot declare already declared element "b". + [1] + +Test Rkgxl.asl: + $ aslref Rkgxl.asl + +Test Rmghv.asl: + $ aslref Rmghv.asl + +Test Rsvjb.asl: + $ aslref Rsvjb.asl + 0 + +Test Rmhwm.asl: + $ aslref Rmhwm.asl + +Test Dknbd.asl: + $ aslref Dknbd.asl + +Test Dnzwt.asl: + $ aslref Dnzwt.asl + +Test Dpqck.asl: + $ aslref Dpqck.asl + +Test Rgvzk.asl: + $ aslref Rgvzk.asl + +Test Rgrvj.asl: + $ aslref Rgrvj.asl + File Rgrvj.asl, line 5, characters 11 to 22: + ASL Error: Cannot parse. + [1] + +Test Gpfrq.asl: + $ aslref Gpfrq.asl + +Test Dztpp.asl: + $ aslref Dztpp.asl + +Test Dzxss.asl: + $ aslref Dzxss.asl + +Test Ighgk.asl: + $ aslref Ighgk.asl + File Ighgk.asl, line 3, characters 34 to 35: + ASL Error: Cannot parse. + [1] + +Test Izddj.asl: + $ aslref Izddj.asl + File Izddj.asl, line 3, characters 34 to 35: + ASL Error: Cannot parse. + [1] + +Test Rbsmk.asl: + $ aslref Rbsmk.asl + File Rbsmk.asl, line 5, characters 4 to 25: + ASL Typing error: constrained integer expected, provided integer + [1] + +Test Rcztx.asl: + $ aslref Rcztx.asl + +Test Rgwcp.asl: + $ aslref Rgwcp.asl + +Test Rhjpn.asl: + $ aslref Rhjpn.asl + +Test Rlsnp.asl: + $ aslref Rlsnp.asl + +Test Rtphr.asl: + $ aslref Rtphr.asl + File Rtphr.asl, line 3, characters 34 to 35: + ASL Error: Cannot parse. + [1] + +Test Rwjyh.asl: + $ aslref Rwjyh.asl + +Test Ibbqr.asl: + $ aslref Ibbqr.asl + +Test Icdvy.asl: + $ aslref Icdvy.asl + +Test Ikfcr.asl: + $ aslref Ikfcr.asl + +Test Iwbwl.asl: + $ aslref Iwbwl.asl + +Test Iwlpj.asl: + $ aslref Iwlpj.asl + +Test Rfwmm.asl: + $ aslref Rfwmm.asl + +Test Rlyds.asl: + $ aslref Rlyds.asl + +Test Rrlqp.asl: + $ aslref Rrlqp.asl + +Test Rsvdj.asl: + $ aslref Rsvdj.asl + +Test Rtznr.asl: + $ aslref Rtznr.asl + +Test Iwvqz.asl: + $ aslref Iwvqz.asl + +Test Rcftd.asl: + $ aslref Rcftd.asl + 4 + -10 + -10 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rcftd.asl + // CHECK: 4 + // CHECK-NEXT: -4 + // CHECK-NEXT: 4 + +Test Rnjdz.asl: + $ aslref Rnjdz.asl + 0 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rnjdz.asl + // CHECK: 0 + +Test Rqggh.asl: + $ aslref Rqggh.asl + +Test Ihjbh.asl: + $ aslref Ihjbh.asl + 99999999999999999999999999999999999999999999999 + -99999999999999999999999999999999999999999999999 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Ihjbh.asl + // CHECK: 99999999999999999999999999999999999999999999999 + // CHECK-NEXT: -99999999999999999999999999999999999999999999999 + +Test Dcqxl.asl: + $ aslref Dcqxl.asl + 3.14159 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Dcqxl.asl + // CHECK: 3.141590e+0 + +Test Ijqpk.asl: + $ aslref Ijqpk.asl + 10. +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Ijqpk.asl + // CHECK: 10 + +Test Iwjcl.asl: + $ aslref Iwjcl.asl + 1 + 2 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Iwjcl.asl + // CHECK: 1 + // CHECK-NEXT: 2 + +Test Iyftf.asl: + $ aslref Iyftf.asl + +Test Rgycg.asl: + $ aslref Rgycg.asl + 0. +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rgycg.asl + // CHECK: 0.0 + +Test Rxcjd.asl: + $ aslref Rxcjd.asl + 1e+69 + -1e+69 + 1e-70 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rxcjd.asl + // CHECK: 1.000000e+69 + // CHECK-NEXT: -1.000000e+69 + // CHECK-NEXT: 1.000000e-70 + +Test Idmnl.asl: + $ aslref Idmnl.asl + TRUE + TRUE +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Idmnl.asl + // CHECK: TRUE + // CHECK-NEXT: TRUE + +Test Rwkcy.asl: + $ aslref Rwkcy.asl + + +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rwkcy.asl + // CHECK: + +Test Dyzbq.asl: + $ aslref Dyzbq.asl + +Test Imzxl.asl: + $ aslref Imzxl.asl + File Imzxl.asl, line 5, character 0 to line 8, character 3: + ASL Typing error: cannot declare already declared element "A". + [1] + +Test Iprpy.asl: + $ aslref Iprpy.asl + File Iprpy.asl, line 8, characters 21 to 27: + ASL Typing error: Illegal application of operator <= on types enum and enum + [1] + +Test Iqmwt.asl: + $ aslref Iqmwt.asl + +Test Rdwsp.asl: + $ aslref Rdwsp.asl + File Rdwsp.asl, line 3, characters 13 to 30: + ASL Typing error: cannot declare already declared element "A". + [1] + +Test Rhjyj.asl: + $ aslref Rhjyj.asl + +Test Rlccn.asl: + $ aslref Rlccn.asl + TRUE +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rlccn.asl + // CHECK: TRUE + +Test Rcpck.asl: + $ aslref Rcpck.asl + FALSE +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rcpck.asl + // CHECK: FALSE + +Test Dbvgk.asl: + $ aslref Dbvgk.asl + File Dbvgk.asl, line 3, characters 33 to 34: + ASL Error: Cannot parse. + [1] + +Test Dcbqk.asl: + $ aslref Dcbqk.asl + +Test Dnrwc.asl: + $ aslref Dnrwc.asl + +Test Dwszm.asl: + $ aslref Dwszm.asl + +Test Imrhk.asl: + $ aslref Imrhk.asl + +Test Iybhf.asl: + $ aslref Iybhf.asl + +Test Rfzsd.asl: + $ aslref Rfzsd.asl + File Rfzsd.asl, line 3, characters 15 to 16: + ASL Error: Cannot parse. + [1] + +Test Rljbg.asl: + $ aslref Rljbg.asl + File Rljbg.asl, line 3, characters 16 to 17: + ASL Error: Cannot parse. + [1] + +Test Rnfbn.asl: + $ aslref Rnfbn.asl + File Rnfbn.asl, line 5, characters 17 to 18: + ASL Error: Cannot parse. + [1] + +Test Rqyzd.asl: + $ aslref Rqyzd.asl + File Rqyzd.asl, line 5, characters 17 to 18: + ASL Error: Cannot parse. + [1] + +Test Igqmv.asl: + $ aslref Igqmv.asl + +Test Ijskw.asl: + $ aslref Ijskw.asl + +Test Rghrp.asl: + $ aslref Rghrp.asl + File Rghrp.asl, line 5, characters 0 to 18: + ASL Typing error: constrained integer expected, provided integer + [1] + +Test Rncnq.asl: + $ aslref Rncnq.asl + File Rncnq.asl, line 3, characters 18 to 19: + ASL Error: Cannot parse. + [1] + +Test Rqzjs.asl: + $ aslref Rqzjs.asl + +Test Rskrk.asl: + $ aslref Rskrk.asl + +Test Iqfzh.asl: + $ aslref Iqfzh.asl + TRUE +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Iqfzh.asl + // CHECK: TRUE + +Test Irxlg.asl: + $ aslref Irxlg.asl + FALSE + TRUE + '101' + '100' + '010' + '001' + '001' + '001' +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Irxlg.asl + // CHECK: FALSE + // CHECK-NEXT: TRUE + // CHECK-NEXT: 0x5 + // CHECK-NEXT: 0x4 + // CHECK-NEXT: 0x2 + // CHECK-NEXT: 0x1 + // CHECK-NEXT: 0x1 + +Test Isqvv.asl: + $ aslref Isqvv.asl + +Test Ivmkf.asl: + $ aslref Ivmkf.asl + TRUE +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Ivmkf.asl + // CHECK: TRUE + +Test Ivpst.asl: + $ aslref Ivpst.asl + File Ivpst.asl, line 3, characters 18 to 19: + ASL Error: Cannot parse. + [1] + +Test Rdhzt.asl: + $ aslref Rdhzt.asl + +Test Rdkgq.asl: + $ aslref Rdkgq.asl + +Test Rpmqb.asl: + $ aslref Rpmqb.asl + +Test Rqxgw.asl: + $ aslref Rqxgw.asl + File Rqxgw.asl, line 7, characters 14 to 15: + ASL Error: Cannot parse. + [1] +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rqxgw.asl + // CHECK: TRUE + +Test Rzrwh.asl: + $ aslref Rzrwh.asl + +Test Rzvpt.asl: + $ aslref Rzvpt.asl + '00000000000000000000000000000000' +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rzvpt.asl + // CHECK: 0x0 + +Test Rzwgh.asl: + $ aslref Rzwgh.asl + +Test Iglwm.asl: + $ aslref Iglwm.asl + File Iglwm.asl, line 5, characters 16 to 17: + ASL Error: Cannot parse. + [1] + +Test Imtwl.asl: + $ aslref Imtwl.asl + +Test Itzvj_a.asl: + $ aslref Itzvj_a.asl + File Itzvj_a.asl, line 3, characters 23 to 30: + ASL Error: Cannot parse. + [1] + +Test Itzvj_b.asl: + $ aslref Itzvj_b.asl + +Test Rvczx.asl: + $ aslref Rvczx.asl + File Rvczx.asl, line 3, characters 15 to 16: + ASL Error: Cannot parse. + [1] + +Test Ieoax.asl: + $ aslref Ieoax.asl + +Test Inhxt.asl: + $ aslref Inhxt.asl + +Test Icgyh.asl: + $ aslref Icgyh.asl + +Test Ifpvz.asl: + $ aslref Ifpvz.asl + File Ifpvz.asl, line 3, characters 16 to 17: + ASL Error: Cannot parse. + [1] + +Test Iqnsd.asl: + $ aslref Iqnsd.asl + File Iqnsd.asl, line 16, characters 20 to 21: + ASL Error: Cannot parse. + [1] + +Test Ibghb.asl: + $ aslref Ibghb.asl + +Test Ifzms.asl: + $ aslref Ifzms.asl + +Test Ijdcc.asl: + $ aslref Ijdcc.asl + File Ijdcc.asl, line 3, character 0 to line 5, character 2: + ASL Typing error: Cannot extract from bitvector of length 5 slices 7+:4. + [1] + +Test Ikgmc.asl: + $ aslref Ikgmc.asl + +Test Ikpbx.asl: + $ aslref Ikpbx.asl + +Test Iqdhp.asl: + $ aslref Iqdhp.asl + +Test Rbdjk.asl: + $ aslref Rbdjk.asl + File Rbdjk.asl, line 3, character 0 to line 5, character 2: + ASL Typing error: overlapping slices 3+:(- 1). + [1] + +Test Rcgdg.asl: + $ aslref Rcgdg.asl + +Test Rchbw.asl: + $ aslref Rchbw.asl + +Test Rcnhb.asl: + $ aslref Rcnhb.asl + File Rcnhb.asl, line 3, character 0 to line 5, character 2: + ASL Typing error: overlapping slices 0+:4, 1+:3. + [1] + +Test Rgqvz.asl: + $ aslref Rgqvz.asl + TRUE + TRUE +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rgqvz.asl + // CHECK: TRUE + // CHECK-NEXT: TRUE + +Test Rlghs.asl: + $ aslref Rlghs.asl + File Rlghs.asl, line 4, characters 4 to 5: + ASL Error: Cannot parse. + [1] + +Test Rmpmg.asl: + $ aslref Rmpmg.asl + File Rmpmg.asl, line 3, character 0 to line 6, character 2: + ASL Typing error: cannot declare already declared element "aa". + [1] + +Test Rmxyq.asl: + $ aslref Rmxyq.asl + +Test Rqcym.asl: + $ aslref Rqcym.asl + +Test Rrmtq.asl: + $ aslref Rrmtq.asl + +Test Ryypn.asl: + $ aslref Ryypn.asl + File Ryypn.asl, line 5, characters 27 to 28: + ASL Error: Cannot parse. + [1] + +Test Rzjsh.asl: + $ aslref Rzjsh.asl + +Test Dwxqv.asl: + $ aslref Dwxqv.asl + +Test Iscbx.asl: + $ aslref Iscbx.asl + File Iscbx.asl, line 7, characters 4 to 19: + ASL Typing error: constrained integer expected, provided integer + [1] + +Test Uxknl.asl: + $ aslref Uxknl.asl + +Test Ibyvl.asl: + $ aslref Ibyvl.asl + +Test Ijrdl.asl: + $ aslref Ijrdl.asl + +Test Iwykz.asl: + $ aslref Iwykz.asl + +Test Ihjrd.asl: + $ aslref Ihjrd.asl + File Ihjrd.asl, line 16, characters 0 to 14: + ASL Typing error: multiple recursive declarations: "a", "a", "a" + [1] + +Test Ilwqq.asl: + $ aslref Ilwqq.asl + +Test Imvnz.asl: + $ aslref Imvnz.asl + File Imvnz.asl, line 7, characters 4 to 19: + ASL Typing error: cannot declare already declared element "a". + [1] + +Test Rdhrc.asl: + $ aslref Rdhrc.asl + +Test Rswvp.asl: + $ aslref Rswvp.asl + +Test Ihsww.asl: + $ aslref Ihsww.asl + 10 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Ihsww.asl + // CHECK: 10 + +Output is non-deterministic + $ aslref Ijvrm.asl + File Ijvrm.asl, line 4, characters 0 to 18: + ASL Typing error: multiple recursive declarations: "b", "a" + [1] + +Test Ikgks.asl: + $ aslref Ikgks.asl + +Test Imtml.asl: + $ aslref Imtml.asl + +Test Rhqzy.asl: + $ aslref Rhqzy.asl + +Test Rlpdl.asl: + $ aslref Rlpdl.asl + File Rlpdl.asl, line 3, characters 0 to 29: + ASL Error: Undefined identifier: 'a' + [1] + +Test Rnxrx.asl: + $ aslref Rnxrx.asl + +Test Rsrhn.asl: + $ aslref Rsrhn.asl + File Rsrhn.asl, line 4, characters 0 to 28: + ASL Typing error: a subtype of a was expected, provided string. + [1] + +Test Rzrkm.asl: + $ aslref Rzrkm.asl + +Test Rzwhp.asl: + $ aslref Rzwhp.asl + +Test Rkdks.asl: + $ aslref Rkdks.asl + +# Output is non-deterministic + $ aslref Rybwy.asl + File Rybwy.asl, line 7, characters 0 to 19: + ASL Typing error: multiple recursive declarations: "other", "base" + [1] + +Test Iglhk.asl: + $ aslref Iglhk.asl + +Test Ivylk.asl: + $ aslref Ivylk.asl + File Ivylk.asl, line 3, characters 16 to 17: + ASL Error: Cannot parse. + [1] + +Test Rckgp.asl: + $ aslref Rckgp.asl + +Test Rdjmc.asl: + $ aslref Rdjmc.asl + +Test Rdlxt.asl: + $ aslref Rdlxt.asl + +Test Rfkgp.asl: + $ aslref Rfkgp.asl + Hello + +Test Rfpmt.asl: + $ aslref Rfpmt.asl + 30 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rfpmt.asl + // CHECK: 30 + +Test Rgbnc.asl: + $ aslref Rgbnc.asl + 0 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rgbnc.asl + // CHECK: 0 + +Test Rplyx.asl: + $ aslref Rplyx.asl + +Test Rprzn.asl: + $ aslref Rprzn.asl + Hello + +Test Rrzll.asl: + $ aslref Rrzll.asl + +Test Ivqhq.asl: + $ aslref Ivqhq.asl + +Test Iypxd.asl: + $ aslref Iypxd.asl + File Iypxd.asl, line 3, characters 4 to 5: + ASL Error: Cannot parse. + [1] + +Test Rbhmy.asl: + $ aslref Rbhmy.asl + +Test Rdbzz.asl: + $ aslref Rdbzz.asl + +Test Rksqp_a.asl: + $ aslref Rksqp_a.asl + File Rksqp_a.asl, line 3, characters 14 to 15: + ASL Error: Cannot parse. + [1] + +Test Rksqp_b.asl: + $ aslref Rksqp_b.asl + File Rksqp_b.asl, line 3, characters 19 to 20: + ASL Error: Cannot parse. + [1] + +Test Rksqp_c.asl: + $ aslref Rksqp_c.asl + File Rksqp_c.asl, line 3, characters 17 to 18: + ASL Error: Cannot parse. + [1] + +Test Rpnqj.asl: + $ aslref Rpnqj.asl + +Test Rsblx.asl: + $ aslref Rsblx.asl + +Test Rtrdj.asl: + $ aslref Rtrdj.asl + +Test Rwzjq.asl: + $ aslref Rwzjq.asl + +Test Rznth.asl: + $ aslref Rznth.asl + +Test Dgwwp.asl: + $ aslref Dgwwp.asl + +Test Ibcww.asl: + $ aslref Ibcww.asl + +Test Ifyfn.asl: + $ aslref Ifyfn.asl + +Test Rsfpm.asl: + $ aslref Rsfpm.asl + +Test Rfrdx.asl: + $ aslref Rfrdx.asl + +Test Rjgvx.asl: + $ aslref Rjgvx.asl + +Test Rrxhx.asl: + $ aslref Rrxhx.asl + +Test Dbhpj.asl: + $ aslref Dbhpj.asl + +Test Dmryb.asl: + $ aslref Dmryb.asl + +Test Ifbvh.asl: + $ aslref Ifbvh.asl + +Test Iqjnf.asl: + $ aslref Iqjnf.asl + +Test Iwhlv.asl: + $ aslref Iwhlv.asl + +Test Rlcsz.asl: + $ aslref Rlcsz.asl + +Test Rmbzp.asl: + $ aslref Rmbzp.asl + +Test Rmzjj.asl: + $ aslref Rmzjj.asl + +Test Rnctb.asl: + $ aslref Rnctb.asl + +Test Rqkxv.asl: + $ aslref Rqkxv.asl + +Test Rtjrh.asl: + $ aslref Rtjrh.asl + File Rtjrh.asl, line 3, characters 0 to 16: + ASL Typing error: multiple recursive declarations: "_a", "_a" + [1] + +Test Djwkg.asl: + $ aslref Djwkg.asl + +Test Djwxx.asl: + $ aslref Djwxx.asl + +Test Dqmyp.asl: + $ aslref Dqmyp.asl + +Test Dvftv.asl: + $ aslref Dvftv.asl + +Test Idvsm.asl: + $ aslref Idvsm.asl + +Test Igklw.asl: + $ aslref Igklw.asl + ASL Error: Arity error while calling 'main': + 1 arguments expected and 0 provided + [1] + +Test Ipfng.asl: + $ aslref Ipfng.asl + +Test Itwjf.asl: + $ aslref Itwjf.asl + 5 + 5 + 5 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Itwjf.asl + // CHECK: 5 + // CHECK-NEXT: 5 + // CHECK-NEXT: 5 + +Test Rdfwz.asl: + $ aslref Rdfwz.asl + +Test Rhdgv.asl: + $ aslref Rhdgv.asl + File Rhdgv.asl, line 3, characters 0 to 15: + ASL Typing error: multiple recursive declarations: "a", "a" + [1] + +Test Rjbxs.asl: + $ aslref Rjbxs.asl + +Test Rkcmk.asl: + $ aslref Rkcmk.asl + File Rkcmk.asl, line 8, character 0 to line 11, character 3: + ASL Typing error: cannot declare already declared element "a". + [1] + +Test Rkfgj.asl: + $ aslref Rkfgj.asl + +Test Rptdd.asl: + $ aslref Rptdd.asl + +Test Rqcvm.asl: + $ aslref Rqcvm.asl + +Test Rwkhc_a.asl: + $ aslref Rwkhc_a.asl + +Test Rwkhc_b.asl: + $ aslref Rwkhc_b.asl + File Rwkhc_b.asl, line 6, characters 0 to 3: + ASL Error: Cannot parse. + [1] + +Test Dnmfp.asl: + $ aslref Dnmfp.asl + +Test Itsxl.asl: + $ aslref Itsxl.asl + File Itsxl.asl, line 9, characters 10 to 17: + ASL Typing error: (integer {10}, integer {20}) does not subtype any of: + bits(-), record { }, exception { }. + [1] +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Itsxl.asl + // CHECK: 10 + // CHECK-NEXT: 20 + +Test Ixfpv.asl: + $ aslref Ixfpv.asl + File Ixfpv.asl, line 9, characters 12 to 19: + ASL Typing error: (integer {10}, integer {20}) does not subtype any of: + bits(-), record { }, exception { }. + [1] +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Ixfpv.asl + // CHECK: 10 + // CHECK-NEXT: 20 + +Test Rjpvl.asl: + $ aslref Rjpvl.asl + File Rjpvl.asl, line 13, characters 4 to 5: + ASL Error: Cannot parse. + [1] + +Test Rkvnx.asl: + $ aslref Rkvnx.asl + File Rkvnx.asl, line 7, characters 4 to 5: + ASL Typing error: integer {4} does not subtype any of: bits(-), record { }, + exception { }. + [1] + +Test Isbfk.asl: + $ aslref Isbfk.asl + +Test Rhdds.asl: + $ aslref Rhdds.asl + +Test Rpblf.asl: + $ aslref Rpblf.asl + +Test Igjhs.asl: + $ aslref Igjhs.asl + +Test Rwlch.asl: + $ aslref Rwlch.asl + +Test Rxbmn.asl: + $ aslref Rxbmn.asl + +Test Rycdb.asl: + $ aslref Rycdb.asl + 10 + 5 + 3 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rycdb.asl + // CHECK: 10 + // CHECK-NEXT: 5 + // CHECK-NEXT: 3 + +Test Iwlnm.asl: + $ aslref Iwlnm.asl + File Iwlnm.asl, line 3, characters 8 to 14: + ASL Error: Cannot parse. + [1] + +Test Rzndl.asl: + $ aslref Rzndl.asl + TRUE + TRUE + FALSE + TRUE + FALSE + TRUE + TRUE + TRUE + TRUE + FALSE +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rzndl.asl + // CHECK-: TRUE + // CHECK-NEXT: TRUE + // CHECK-NEXT: FALSE + // CHECK-NEXT: TRUE + // CHECK-NEXT: FALSE + // CHECK-NEXT: TRUE + // CHECK-NEXT: TRUE + // CHECK-NEXT: TRUE + // CHECK-NEXT: TRUE + // CHECK-NEXT: FALSE + +Test Rrcsd.asl: + $ aslref Rrcsd.asl + File Rrcsd.asl, line 12, characters 17 to 18: + ASL Error: Cannot parse. + [1] + +Test Rdyqz.asl: + $ aslref Rdyqz.asl + File Rdyqz.asl, line 10, characters 12 to 24: + ASL Error: Fields mismatch for creating a value of type a + -- Passed fields are: x + [1] + +Test Rwbcq.asl: + $ aslref Rwbcq.asl + +Test Rkcds.asl: + $ aslref Rkcds.asl + File Rkcds.asl, line 10, characters 12 to 24: + ASL Error: Fields mismatch for creating a value of type a + -- Passed fields are: x + [1] + +Test Rzwch.asl: + $ aslref Rzwch.asl + +Test Iqslr.asl: + $ aslref Iqslr.asl + +Test Ivgsp.asl: + $ aslref Ivgsp.asl + File Ivgsp.asl, line 8, character 0 to line 11, character 3: + ASL Typing error: cannot declare already declared element "a". + [1] + +Test Iwdmd.asl: + $ aslref Iwdmd.asl + +Test Rlljz.asl: + $ aslref Rlljz.asl + +Test Rqnqv.asl: + $ aslref Rqnqv.asl + +Test Rsppt.asl: + $ aslref Rsppt.asl + +Test Rytky.asl: + $ aslref Rytky.asl + +Test Rzdsj.asl: + $ aslref Rzdsj.asl + +Test Ijejd.asl: + $ aslref Ijejd.asl + +Test Itfsz.asl: + $ aslref Itfsz.asl + +Test Rktbg.asl: + $ aslref Rktbg.asl + +Test Rnhgp.asl: + $ aslref Rnhgp.asl + ASL Typing error: constrained integer expected, provided integer + [1] + +Test Rsnqj.asl: + $ aslref Rsnqj.asl + +Test Rwzcs.asl: + $ aslref Rwzcs.asl + ASL Typing error: Cannot extract from bitvector of length 0 slices 4+:-2. + [1] + +Test Rdvvq.asl: + $ aslref Rdvvq.asl + 30 + 10 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rdvvq.asl + // CHECK: 30 + // CHECK-NEXT: 10 + +Test Rgxqh.asl: + $ aslref Rgxqh.asl + +Test Rztrr.asl: + $ aslref Rztrr.asl + File Rztrr.asl, line 6, characters 12 to 18: + ASL Typing error: a subtype of integer {0..9} was expected, + provided integer {100}. + [1] + +Test Dkxwt.asl: + $ aslref Dkxwt.asl + +Test Ihsql.asl: + $ aslref Ihsql.asl + +Test Rdgrv.asl: + $ aslref Rdgrv.asl + File Rdgrv.asl, line 9, characters 13 to 20: + ASL Typing error: a subtype of exception { } was expected, provided integer. + [1] +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rdgrv.asl + // CHECK: Hello + // CHECK-NEXT: World + +Test Rgvcc.asl: + $ aslref Rgvcc.asl + Uncaught exception: a {} + [1] + +Test Rtxtc.asl: + $ aslref Rtxtc.asl + Caught correctly + Caught incorrectly +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rtxtc.asl + // CHECK: Caught correctly + // CHECK-NEXT: Caught incorrectly + +Test Dggcq.asl: + $ aslref Dggcq.asl + 10 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Dggcq.asl + // CHECK: 10 + +Test Djtdg.asl: + $ aslref Djtdg.asl + 10 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Djtdg.asl + // CHECK: 10 + +Test Igzvm.asl: + $ aslref Igzvm.asl + 10 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Igzvm.asl + // CHECK: 10 + +Test Rdhkh.asl: + $ aslref Rdhkh.asl + File Rdhkh.asl, line 14, characters 23 to 25: + ASL Typing error: cannot assign to immutable storage "aa". + [1] + +Test Rjzst.asl: + $ aslref Rjzst.asl + aa + bb +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rjzst.asl + // CHECK: aa + // CHECK-NEXT: bb + +Test Rmkgb.asl: + $ aslref Rmkgb.asl + File Rmkgb.asl, line 17, characters 10 to 12: + ASL Error: Undefined identifier: 'aa' + [1] + +Test Rspnm.asl: + $ aslref Rspnm.asl + b + a + other +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rspnm.asl + // CHECK: b + // CHECK-NEXT: a + // CHECK-NEXT: other + +Test Ryvxf.asl: + $ aslref Ryvxf.asl + a +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Ryvxf.asl + // CHECK: a + +Test Rztlb.asl: + $ aslref Rztlb.asl + a +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rztlb.asl + // CHECK: a + +Test Iyklf.asl: + $ aslref Iyklf.asl + a +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Iyklf.asl + // CHECK: a + +Test Rbrcj.asl: + $ aslref Rbrcj.asl + Uncaught exception: implicitely thrown out of a try-catch. + [1] + +Test Rgvks.asl: + $ aslref Rgvks.asl + a +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rgvks.asl + // CHECK: a + +Test Rptng.asl: + $ aslref Rptng.asl + +Test Ikbxm.asl: + $ aslref Ikbxm.asl + File Ikbxm.asl, line 5, characters 12 to 13: + ASL Error: Undefined identifier: 'c' + [1] + +Test Rjfrd.asl: + $ aslref Rjfrd.asl + File Rjfrd.asl, line 9, characters 12 to 13: + ASL Error: Undefined identifier: 'a' + [1] + +Test Rlcfd.asl: + $ aslref Rlcfd.asl + File Rlcfd.asl, line 7, characters 4 to 14: + ASL Typing error: cannot declare already declared element "a". + [1] + +Test Ifkjc.asl: + $ aslref Ifkjc.asl + +Test Rjnmr.asl: + $ aslref Rjnmr.asl + File Rjnmr.asl, line 11, characters 17 to 20: + ASL Error: Unsupported expression a(). + [1] + +Test Rkszm.asl: + $ aslref Rkszm.asl + 0 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rkszm.asl + // CHECK: 0 + +Test Rtzrv.asl: + $ aslref Rtzrv.asl + +Test Rxylp.asl: + $ aslref Rxylp.asl + File Rxylp.asl, line 5, characters 16 to 17: + ASL Error: Cannot parse. + [1] + +Test Rzxhp.asl: + $ aslref Rzxhp.asl + 1 + 2 + 3 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rzxhp.asl + // CHECK: 1 + // CHECK-NEXT: 2 + // CHECK-NEXT: 3 + +Test Rbfwl.asl: + $ aslref Rbfwl.asl + +Test Rclqj.asl: + $ aslref Rclqj.asl + +Test Rfmlk.asl: + $ aslref Rfmlk.asl + +Test Rnxsf.asl: + $ aslref Rnxsf.asl + +Test Rqdqd.asl: + $ aslref Rqdqd.asl + File Rqdqd.asl, line 5, characters 13 to 14: + ASL Error: Cannot parse. + [1] + +Test Rsqjj.asl: + $ aslref Rsqjj.asl + +Test Rtfjz.asl: + $ aslref Rtfjz.asl + +Test Rxhpb.asl: + $ aslref Rxhpb.asl + +Test Rxsdc.asl: + $ aslref Rxsdc.asl + +Test Dkcyt.asl: + $ aslref Dkcyt.asl + File Dkcyt.asl, line 10, characters 4 to 8: + ASL Error: Mismatched use of return value from call to 'a' + [1] + +Test Dhtpl.asl: + $ aslref Dhtpl.asl + +Test Rnywh.asl: + $ aslref Rnywh.asl + File Rnywh.asl, line 5, characters 4 to 14: + ASL Typing error: cannot return something from a procedure. + [1] + +Test Rphnz.asl: + $ aslref Rphnz.asl + +Test Ryyfr.asl: + $ aslref Ryyfr.asl + +Test Rzhyt.asl: + $ aslref Rzhyt.asl + File Rzhyt.asl, line 12, characters 4 to 14: + ASL Typing error: a subtype of bits(-) was expected, provided a. + [1] + +Test Dwsxy.asl: + $ aslref Dwsxy.asl + 1 + 2 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Dwsxy.asl + // CHECK: 1 + // CHECK-NEXT: 2 + +Test Icjvd.asl: + $ aslref Icjvd.asl + +Test Issxj.asl: + $ aslref Issxj.asl + +Test Rzhvh.asl: + $ aslref Rzhvh.asl + File Rzhvh.asl, line 5, characters 4 to 27: + ASL Error: Arity error while calling 'tuple initialization': + 3 arguments expected and 2 provided + [1] + +Test Rydfq.asl: + $ aslref Rydfq.asl + 4 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rydfq.asl + // CHECK: 4 + +Test Dbjny.asl: + $ aslref Dbjny.asl + +Test Dqjyv.asl: + $ aslref Dqjyv.asl + +Test Rwqrn.asl: + $ aslref Rwqrn.asl + +Test Rwzsl.asl: + $ aslref Rwzsl.asl + File Rwzsl.asl, line 5, characters 11 to 16: + ASL Execution error: Assertion failed: FALSE + [1] + +Test Rkztj.asl: + $ aslref Rkztj.asl + 0 + 3 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rkztj.asl + // CHECK: 0 + // CHECK-NEXT: 3 + +Test Rtmys.asl: + $ aslref Rtmys.asl + 3 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rtmys.asl + // CHECK: 3 + +Test Rxssl.asl: + $ aslref Rxssl.asl + 2 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rxssl.asl + // CHECK: 2 + +Test Rcwnt.asl: + $ aslref Rcwnt.asl + 2 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rcwnt.asl + // CHECK: 3 + +Test Rjhst.asl: + $ aslref Rjhst.asl + 3 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rjhst.asl + // CHECK: 3 + +Test Rjvtr.asl: + $ aslref Rjvtr.asl + +Test Rrxqb.asl: + $ aslref Rrxqb.asl + Otherwise + +Test Rzyvw.asl: + $ aslref Rzyvw.asl + Otherwise +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rzyvw.asl + // CHECK: Otherwise + +Test Ikfyg.asl: + $ aslref Ikfyg.asl + File Ikfyg.asl, line 6, characters 13 to 14: + ASL Error: Cannot parse. + [1] + +Test Iydbr.asl: + $ aslref Iydbr.asl +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Iydbr.asl + // CHECK-NOT: 5 + +Test Rjqxc.asl: + $ aslref Rjqxc.asl +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rjqxc.asl + // CHECK-NOT: Run + +Test Rkldr.asl: + $ aslref Rkldr.asl + +Test Rlsvv.asl: + $ aslref Rlsvv.asl + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rlsvv.asl + // CHECK: 1 + // CHECK-NEXT: 2 + // CHECK-NEXT: 3 + // CHECK-NEXT: 4 + // CHECK-NEXT: 5 + // CHECK-NEXT: 6 + // CHECK-NEXT: 7 + // CHECK-NEXT: 8 + // CHECK-NEXT: 9 + // CHECK-NEXT: 10 + +Test Rmhpw.asl: + $ aslref Rmhpw.asl + 1 + 2 + 4 + 8 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rmhpw.asl + // CHECK: 1 + // CHECK_NEXT: 2 + // CHECK_NEXT: 4 + // CHECK_NEXT: 8 + +Test Rnpwr.asl: + $ aslref Rnpwr.asl + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rnpwr.asl + // CHECK: 0 + // CHECK-NEXT: 1 + // CHECK-NEXT: 2 + // CHECK-NEXT: 3 + // CHECK-NEXT: 4 + // CHECK-NEXT: 5 + // CHECK-NEXT: 6 + // CHECK-NEXT: 7 + // CHECK-NEXT: 8 + // CHECK-NEXT: 9 + // CHECK-NEXT: 10 + +Test Rnzgh.asl: + $ aslref Rnzgh.asl + +Test Rrqng.asl: + $ aslref Rrqng.asl + File Rrqng.asl, line 6, characters 8 to 9: + ASL Typing error: cannot assign to immutable storage "x". + [1] + +Test Rssbd.asl: + $ aslref Rssbd.asl + 10 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rssbd.asl + // CHECK: 10 + +Test Rwvqt.asl: + $ aslref Rwvqt.asl + 0 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rwvqt.asl + // CHECK-NOT: 1 + +Test Rytnr.asl: + $ aslref Rytnr.asl + +Test Rzsnd.asl: + $ aslref Rzsnd.asl + File Rzsnd.asl, line 10, characters 22 to 23: + ASL Error: Cannot parse. + [1] + +Test Icgrh.asl: + $ aslref Icgrh.asl + +Test Itcst.asl: + $ aslref Itcst.asl + +Test Iyjbb.asl: + $ aslref Iyjbb.asl + +Test Ivqlx.asl: + $ aslref Ivqlx.asl + +Test Rpzzj.asl: + $ aslref Rpzzj.asl + +Test Rycpx.asl: + $ aslref Rycpx.asl + +Test Ibhln.asl: + $ aslref Ibhln.asl + File Ibhln.asl, line 8, characters 17 to 18: + ASL Error: Cannot parse. + [1] + +Test Igjzq.asl: + $ aslref Igjzq.asl + +Test Igqrd.asl: + $ aslref Igqrd.asl + +Test Imkpr.asl: + $ aslref Imkpr.asl + File Imkpr.asl, line 27, characters 38 to 39: + ASL Error: Cannot parse. + [1] + +Test Iszvf.asl: + $ aslref Iszvf.asl + File Iszvf.asl, line 7, characters 22 to 23: + ASL Error: Cannot parse. + [1] + +Test Ixvbg.asl: + $ aslref Ixvbg.asl + +Test Rgyjz.asl: + $ aslref Rgyjz.asl + File Rgyjz.asl, line 6, characters 22 to 23: + ASL Error: Cannot parse. + [1] + +Test Igqyg.asl: + $ aslref Igqyg.asl + File Igqyg.asl, line 5, characters 27 to 28: + ASL Error: Cannot parse. + [1] + +Test Rxnbn.asl: + $ aslref Rxnbn.asl + +Test Xxswl.asl: + $ aslref Xxswl.asl + +Test Isbck.asl: + $ aslref Isbck.asl + +Test Gmtxx.asl: + $ aslref Gmtxx.asl + File Gmtxx.asl, line 6, characters 4 to 27: + ASL Typing error: a subtype of integer {11} was expected, + provided integer {0..10}. + [1] + +Test Ikjdr.asl: + $ aslref Ikjdr.asl + +Test Dgwxk.asl: + $ aslref Dgwxk.asl + +Test Dvmzx.asl: + $ aslref Dvmzx.asl + +Test Dfxqv.asl: + $ aslref Dfxqv.asl + +Test Dbmgm.asl: + $ aslref Dbmgm.asl + File Dbmgm.asl, line 8, characters 17 to 18: + ASL Error: Cannot parse. + [1] + +Test Ikrll.asl: + $ aslref Ikrll.asl + +Test Rvbll.asl: + $ aslref Rvbll.asl + +Test Rwzvx.asl: + $ aslref Rwzvx.asl + File Rwzvx.asl, line 6, characters 12 to 13: + ASL Execution error: Mismatch type: + value 4 does not belong to type integer {0..3}. + [1] + +Test Igysk.asl: + $ aslref Igysk.asl + File Igysk.asl, line 3, characters 18 to 19: + ASL Error: Cannot parse. + [1] + +Test Ihswr.asl: + $ aslref Ihswr.asl + File Ihswr.asl, line 11, characters 4 to 15: + ASL Typing error: a subtype of bits(4) was expected, provided bits(2). + [1] + +Test Iknxj.asl: + $ aslref Iknxj.asl + File Iknxj.asl, line 3, characters 21 to 22: + ASL Error: Cannot parse. + [1] + +Test Ikxsd.asl: + $ aslref Ikxsd.asl + File Ikxsd.asl, line 3, characters 21 to 22: + ASL Error: Cannot parse. + [1] + +Test Itwtz.asl: + $ aslref Itwtz.asl + File Itwtz.asl, line 6, characters 4 to 23: + ASL Typing error: a subtype of bits(4) was expected, provided bits(2). + [1] + +Test Imhyb.asl: + $ aslref Imhyb.asl + +Test Isjdc.asl: + $ aslref Isjdc.asl + +Test Inlfd.asl: + $ aslref Inlfd.asl + +Test Rfmxk.asl: + $ aslref Rfmxk.asl + +Test Dvpzz.asl: + $ aslref Dvpzz.asl + +Test Ipqct.asl: + $ aslref Ipqct.asl + +Test Iwzkm.asl: + $ aslref Iwzkm.asl + +Test Dbtbr.asl: + $ aslref Dbtbr.asl + File Dbtbr.asl, line 11, character 0 to line 14, character 3: + ASL Typing error: cannot declare already declared element "testa". + [1] + +Test Ifsfq.asl: + $ aslref Ifsfq.asl + File Ifsfq.asl, line 11, character 0 to line 14, character 3: + ASL Typing error: cannot declare already declared element "testa". + [1] + +Test Ipfgq.asl: + $ aslref Ipfgq.asl + File Ipfgq.asl, line 8, character 0 to line 11, character 3: + ASL Typing error: cannot declare already declared element "a". + [1] + +Test Isctb.asl: + $ aslref Isctb.asl + File Isctb.asl, line 19, character 0 to line 22, character 3: + ASL Typing error: cannot declare already declared element "a". + [1] + +Test Rpgfc.asl: + $ aslref Rpgfc.asl + File Rpgfc.asl, line 8, character 0 to line 11, character 3: + ASL Typing error: cannot declare already declared element "a". + [1] + +Test Dhbcp.asl: + $ aslref Dhbcp.asl + +Output is non-deterministic + $ aslref Idfml.asl + File Idfml.asl, line 3, characters 0 to 18: + ASL Error: Undefined identifier: 'a' + [1] + +Test Ismmh.asl: + $ aslref Ismmh.asl + +Test Rfwqm.asl: + $ aslref Rfwqm.asl + File Rfwqm.asl, line 3, characters 18 to 19: + ASL Error: Undefined identifier: 'b' + [1] + +Test Rhwtv.asl: + $ aslref Rhwtv.asl + +Test Rjbxq.asl: + $ aslref Rjbxq.asl + File Rjbxq.asl, line 13, characters 16 to 17: + ASL Error: Undefined identifier: 'b' + [1] + +Test Rschv.asl: + $ aslref Rschv.asl + File Rschv.asl, line 7, characters 4 to 16: + ASL Error: Undefined identifier: 'ty' + [1] + +Test Rvdpc.asl: + $ aslref Rvdpc.asl + +Test Ryspm.asl: + $ aslref Ryspm.asl + +Test Rftpk.asl: + $ aslref Rftpk.asl + +Test Rftvn.asl: + $ aslref Rftvn.asl + File Rftvn.asl, line 7, characters 10 to 12: + ASL Typing error: a subtype of boolean was expected, provided integer {10}. + [1] + +Test Rjqyf.asl: + $ aslref Rjqyf.asl + File Rjqyf.asl, line 5, characters 4 to 15: + ASL Typing error: a subtype of boolean was expected, provided integer {10}. + [1] + +Test Rnbdj.asl: + $ aslref Rnbdj.asl + File Rnbdj.asl, line 5, characters 7 to 9: + ASL Typing error: a subtype of boolean was expected, provided integer {10}. + [1] + +Test Rnxrc.asl: + $ aslref Rnxrc.asl + File Rnxrc.asl, line 5, characters 4 to 13: + ASL Typing error: a subtype of exception { } was expected, + provided integer {10}. + [1] + +Test Rsdjk.asl: + $ aslref Rsdjk.asl + File Rsdjk.asl, line 8, characters 13 to 15: + ASL Error: Cannot parse. + [1] + +Test Rvtjw.asl: + $ aslref Rvtjw.asl + File Rvtjw.asl, line 5, character 4 to line 7, character 7: + ASL Typing error: a subtype of integer was expected, provided real. + [1] + +Test Rwgsy.asl: + $ aslref Rwgsy.asl + +Test Rwvxs.asl: + $ aslref Rwvxs.asl + +Test Idgwj.asl: + $ aslref Idgwj.asl + File Idgwj.asl, line 9, characters 4 to 19: + ASL Typing error: a subtype of b was expected, provided a. + [1] + +Test Ikkcc.asl: + $ aslref Ikkcc.asl + +Test Immkf.asl: + $ aslref Immkf.asl + File Immkf.asl, line 7, characters 4 to 5: + ASL Typing error: a subtype of integer {0..N} was expected, + provided integer {0..M}. + [1] + +Test Iyyqx.asl: + $ aslref Iyyqx.asl + +Test Rgnts.asl: + $ aslref Rgnts.asl + File Rgnts.asl, line 3, characters 18 to 19: + ASL Error: Cannot parse. + [1] + +Test Rlxqz.asl: + $ aslref Rlxqz.asl + File Rlxqz.asl, line 5, characters 4 to 25: + ASL Typing error: a subtype of integer was expected, provided real. + [1] + +Test Rwmfv.asl: + $ aslref Rwmfv.asl + +Test Rzcvd.asl: + $ aslref Rzcvd.asl + File Rzcvd.asl, line 3, characters 18 to 19: + ASL Error: Cannot parse. + [1] + +Test Iryrp.asl: + $ aslref Iryrp.asl + +Test Rzjky.asl: + $ aslref Rzjky.asl + +Test Djrxm.asl: + $ aslref Djrxm.asl + +Test Iztmq.asl: + $ aslref Iztmq.asl + +Test Iblvp.asl: + $ aslref Iblvp.asl + File Iblvp.asl, line 3, character 0 to line 6, character 3: + ASL Typing error: explicit parameter "N" does not have a corresponding + defining argument + [1] + +Test Ibzvb.asl: + $ aslref Ibzvb.asl + +Test Ilfjz.asl: + $ aslref Ilfjz.asl + +Test Ipdkt.asl: + $ aslref Ipdkt.asl + File Ipdkt.asl, line 3, characters 21 to 22: + ASL Error: Cannot parse. + [1] + +Test Irkbv.asl: + $ aslref Irkbv.asl + File Irkbv.asl, line 3, characters 21 to 22: + ASL Error: Cannot parse. + [1] + +Test Irqqb.asl: + $ aslref Irqqb.asl + +Test Itqgh.asl: + $ aslref Itqgh.asl + +Test Izlzc.asl: + $ aslref Izlzc.asl + File Izlzc.asl, line 3, character 0 to line 9, character 3: + ASL Typing error: explicit parameter "N" does not have a corresponding + defining argument + [1] + +Test Rlvth.asl: + $ aslref Rlvth.asl + File Rlvth.asl, line 3, characters 18 to 19: + ASL Error: Cannot parse. + [1] + +Test Rrhtn.asl: + $ aslref Rrhtn.asl + File Rrhtn.asl, line 5, character 0 to line 8, character 3: + ASL Typing error: constrained integer expected, provided integer + [1] + +Test Rtjkq.asl: + $ aslref Rtjkq.asl + File Rtjkq.asl, line 5, characters 4 to 39: + ASL Typing error: a subtype of integer {32, 64} was expected, + provided integer. + [1] + +Test Dcfyp.asl: + $ aslref Dcfyp.asl + +Test Dljlw.asl: + $ aslref Dljlw.asl + +Test Dmfbc.asl: + $ aslref Dmfbc.asl + +Test Dpmbl.asl: + $ aslref Dpmbl.asl + +Test Dtrfw.asl: + $ aslref Dtrfw.asl + +Test Dvxkm.asl: + $ aslref Dvxkm.asl + +Test Ibtmt.asl: + $ aslref Ibtmt.asl + File Ibtmt.asl, line 8, character 0 to line 11, character 3: + ASL Typing error: cannot declare already declared element "test". + [1] + +Test Icmlp.asl: + $ aslref Icmlp.asl + File Icmlp.asl, line 11, characters 4 to 20: + ASL Typing error: constrained integer expected, provided integer + [1] + +Test Iflkf.asl: + $ aslref Iflkf.asl + File Iflkf.asl, line 10, characters 4 to 20: + ASL Typing error: a subtype of bits(2) was expected, provided bits(1). + [1] + +Test Iktjn.asl: + $ aslref Iktjn.asl + File Iktjn.asl, line 21, characters 4 to 6: + ASL Typing error: a subtype of bits(N) was expected, provided bits(wid). + [1] + +Test Isbwr.asl: + $ aslref Isbwr.asl + File Isbwr.asl, line 3, characters 18 to 19: + ASL Error: Cannot parse. + [1] + +Test Ivfdp.asl: + $ aslref Ivfdp.asl + File Ivfdp.asl, line 5, characters 4 to 13: + ASL Typing error: a subtype of integer {N} was expected, + provided integer {5..10}. + [1] + +Test Iymhx.asl: + $ aslref Iymhx.asl + File Iymhx.asl, line 5, characters 4 to 18: + ASL Typing error: a subtype of bits(M) was expected, provided bits((M + 1)). + [1] + +Test Rbqjg.asl: + $ aslref Rbqjg.asl + +Test Rccvd.asl: + $ aslref Rccvd.asl + File Rccvd.asl, line 5, character 0 to line 16, character 3: + ASL Typing error: explicit parameter "parm" does not have a corresponding + defining argument + [1] + +Test Rkmbd.asl: + $ aslref Rkmbd.asl + +Test Rmwbn.asl: + $ aslref Rmwbn.asl + File Rmwbn.asl, line 3, characters 18 to 19: + ASL Error: Cannot parse. + [1] + +Test Rpfwq.asl: + $ aslref Rpfwq.asl + +Test Rqybh.asl: + $ aslref Rqybh.asl + +Test Rrtcf.asl: + $ aslref Rrtcf.asl + File Rrtcf.asl, line 10, characters 4 to 13: + ASL Error: Arity error while calling 'test': + 0 arguments expected and 1 provided + [1] + +Test Rtcdl.asl: + $ aslref Rtcdl.asl + +Test Rtzsp.asl: + $ aslref Rtzsp.asl + File Rtzsp.asl, line 10, characters 4 to 12: + ASL Error: Undefined identifier: 'test2' + [1] + +Test Rzlwd.asl: + $ aslref Rzlwd.asl + +Test Rbknt.asl: + $ aslref Rbknt.asl + +Test Rjgwf.asl: + $ aslref Rjgwf.asl + +Test Rttgq.asl: + $ aslref Rttgq.asl + File Rttgq.asl, line 10, characters 12 to 21: + ASL Typing error: Illegal application of operator || on types a and integer + [1] + +Test Ivmzf.asl: + $ aslref Ivmzf.asl + +Test Iyhml.asl: + $ aslref Iyhml.asl + +Test Iyhrp.asl: + $ aslref Iyhrp.asl + File Iyhrp.asl, line 5, characters 12 to 19: + ASL Typing error: Illegal application of operator DIV on types integer {2, 4} + and integer {(- 1)..1} + [1] + +Test Iyxsy.asl: + $ aslref Iyxsy.asl + +Test Rbzkw.asl: + $ aslref Rbzkw.asl + File Rbzkw.asl, line 3, characters 21 to 22: + ASL Error: Cannot parse. + [1] + +Test Rkfys.asl: + $ aslref Rkfys.asl + +Test Rzywy.asl: + $ aslref Rzywy.asl + +Test Ilghj.asl: + $ aslref Ilghj.asl + +Test Rkxmr.asl: + $ aslref Rkxmr.asl + File Rkxmr.asl, line 6, characters 15 to 21: + ASL Typing error: Illegal application of operator == on types bits(M) + and bits(8) + [1] + +Test Rxzvt.asl: + $ aslref Rxzvt.asl + +Test Rmrht.asl: + $ aslref Rmrht.asl + File Rmrht.asl, line 7, characters 12 to 18: + ASL Typing error: Illegal application of operator == on types bits(1) + and bits(11) + [1] + +Test Rsqxn.asl: + $ aslref Rsqxn.asl + +Test Rkczs.asl: + $ aslref Rkczs.asl + +Test Rnynk.asl: + $ aslref Rnynk.asl + +Test Rfhyz.asl: + $ aslref Rfhyz.asl + File Rfhyz.asl, line 3, characters 21 to 22: + ASL Error: Cannot parse. + [1] + +Test Rvbmx.asl: + $ aslref Rvbmx.asl + +Test Rxvwk.asl: + $ aslref Rxvwk.asl + +Test Imjwm.asl: + $ aslref Imjwm.asl + +Test Ildnp.asl: + $ aslref Ildnp.asl + +Test Dcwvh.asl: + $ aslref Dcwvh.asl + +Test Dhlqc.asl: + $ aslref Dhlqc.asl + +Test Dyydw.asl: + $ aslref Dyydw.asl + +Test Ilzcx.asl: + $ aslref Ilzcx.asl + File Ilzcx.asl, line 4, characters 32 to 37: + ASL Error: Undefined identifier: 'add' + [1] + +Test Ipkxk.asl: + $ aslref Ipkxk.asl + +Test Ilhlr.asl: + $ aslref Ilhlr.asl + +Test Rrfqp.asl: + $ aslref Rrfqp.asl + +Test Rvnkt.asl: + $ aslref Rvnkt.asl + ASL Execution error: Illegal application of operator DIV for values 10 and 4. + [1] + +Test Dfxst.asl: + $ aslref Dfxst.asl + +Test Rwdgq.asl: + $ aslref Rwdgq.asl + File Rwdgq.asl, line 6, characters 4 to 5: + ASL Typing error: cannot assign to immutable storage "x". + [1] + +Test Rzdkc.asl: + $ aslref Rzdkc.asl + File Rzdkc.asl, line 3, characters 15 to 16: + ASL Error: Cannot parse. + [1] + +Test Dccty.asl: + $ aslref Dccty.asl + +Test Dcsft.asl: + $ aslref Dcsft.asl + +Test Ihybt.asl: + $ aslref Ihybt.asl + +Test Ilykd.asl: + $ aslref Ilykd.asl + +Test Inxjr.asl: + $ aslref Inxjr.asl + +Test Dkckx.asl: + $ aslref Dkckx.asl + +Test Dqnhm.asl: + $ aslref Dqnhm.asl + +Test Imszt.asl: + $ aslref Imszt.asl + +Test Intyz.asl: + $ aslref Intyz.asl + +Test Izpwm.asl: + $ aslref Izpwm.asl + +Test Dzpmf.asl: + $ aslref Dzpmf.asl + +Test Ixykc.asl: + $ aslref Ixykc.asl + +Test Dxrbt.asl: + $ aslref Dxrbt.asl + +Test Ixsfy.asl: + $ aslref Ixsfy.asl + +Test Djljd.asl: + $ aslref Djljd.asl + File Djljd.asl, line 3, characters 27 to 28: + ASL Error: Cannot parse. + [1] + +Test Iwvgg.asl: + $ aslref Iwvgg.asl + +Test Dmtqj.asl: + $ aslref Dmtqj.asl + +Test Ikkqy.asl: + $ aslref Ikkqy.asl + +Test Iybgl.asl: + $ aslref Iybgl.asl + +Test Igfzt.asl: + $ aslref Igfzt.asl + TRUE +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Igfzt.asl + // CHECK: TRUE + +Test Iqjtn_a.asl: + $ aslref Iqjtn_a.asl + +Test Iqjtn_b.asl: + $ aslref Iqjtn_b.asl + +Test Iqjtn_c.asl: + $ aslref Iqjtn_c.asl + Uncaught exception: exc {err_code: 0} + [1] +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Iqjtn_c.asl + // CHECK-NOT: Exception + +Test Iqjtn_d.asl: + $ aslref Iqjtn_d.asl + Uncaught exception: exc {err_code: 0} + [1] +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Iqjtn_d.asl + // CHECK-NOT: Exception + +Test Iqrxp.asl: + $ aslref Iqrxp.asl + HELLO + WORLD + HELLO + HELLO + WORLD +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Iqrxp.asl + // CHECK: HELLO + // CHECK-NEXT: WORLD + // CHECK-NEXT: HELLO + // CHECK-NEXT: HELLO + // CHECK-NEXT: WORLD + +Test Rxkgc.asl: + $ aslref Rxkgc.asl + +Test Rgqnl.asl: + $ aslref Rgqnl.asl + TRUE + TRUE + FALSE + TRUE + Hello + World + FALSE + World + TRUE +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rgqnl.asl + // CHECK: TRUE + // CHECK-NEXT: TRUE + // CHECK-NEXT: FALSE + // CHECK-NEXT: TRUE + // CHECK-NEXT: Hello + // CHECK-NEXT: World + // CHECK-NEXT: FALSE + // CHECK-NEXT: World + // CHECK-NEXT: TRUE + +Test Rlrhd.asl: + $ aslref Rlrhd.asl + TRUE + FALSE + FALSE + TRUE +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rlrhd.asl + // CHECK: TRUE + // CHECK-NEXT: FALSE + // CHECK-NEXT: FALSE + // CHECK-NEXT: TRUE + +Test Rbncy.asl: + $ aslref Rbncy.asl + File Rbncy.asl, line 7, characters 10 to 25: + ASL Error: Undefined identifier: 'exp_real' + [1] +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rbncy.asl + // CHECK: 1000 + // CHECK-NEXT: 32 + +Test Inbct.asl: + $ aslref Inbct.asl + +Test Rcrqj.asl: + $ aslref Rcrqj.asl + File Rcrqj.asl, line 6, characters 21 to 35: + ASL Error: Undefined identifier: 'div_int' + [1] + +Test Rghxr_a.asl: + $ aslref Rghxr_a.asl + File Rghxr_a.asl, line 7, characters 10 to 24: + ASL Error: Undefined identifier: 'frem_int' + [1] +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rghxr_a.asl + // CHECK: 0 + // CHECK-NEXT: 1 + +Test Rghxr_b.asl: + $ aslref Rghxr_b.asl + File Rghxr_b.asl, line 5, characters 10 to 25: + ASL Error: Undefined identifier: 'frem_int' + [1] + +Test Rncwm.asl: + $ aslref Rncwm.asl + File Rncwm.asl, line 7, characters 10 to 24: + ASL Error: Undefined identifier: 'exp_int' + [1] +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rncwm.asl + // CHECK: 1000 + // CHECK-NEXT: 32 + +Test Rsvmm.asl: + $ aslref Rsvmm.asl + File Rsvmm.asl, line 7, characters 10 to 24: + ASL Error: Undefined identifier: 'fdiv_int' + [1] +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rsvmm.asl + // CHECK: 2 + // CHECK-NEXT: -2 + +Test Rthsv.asl: + $ aslref Rthsv.asl + File Rthsv.asl, line 6, characters 10 to 32: + ASL Error: Undefined identifier: 'shiftleft_int' + [1] + +Test Rvgzf.asl: + $ aslref Rvgzf.asl + File Rvgzf.asl, line 9, characters 10 to 30: + ASL Error: Undefined identifier: 'shiftleft_int' + [1] +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rvgzf.asl + // CHECK: 80 + // CHECK-NEXT: 96 + // CHECK-NEXT: 3 + // CHECK-NEXT: 6 + +Test Rwwtv_a.asl: + $ aslref Rwwtv_a.asl + File Rwwtv_a.asl, line 5, characters 10 to 24: + ASL Error: Undefined identifier: 'div_int' + [1] + +Test Rwwtv_b.asl: + $ aslref Rwwtv_b.asl + File Rwwtv_b.asl, line 5, characters 10 to 24: + ASL Error: Undefined identifier: 'fdiv_int' + [1] + +Test Rztjn_a.asl: + $ aslref Rztjn_a.asl + File Rztjn_a.asl, line 7, characters 10 to 23: + ASL Error: Undefined identifier: 'div_int' + [1] +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rztjn_a.asl + // CHECK: 2 + // CHECK-NEXT: -2 + +Test Rztjn_b.asl: + $ aslref Rztjn_b.asl + File Rztjn_b.asl, line 5, characters 10 to 23: + ASL Error: Undefined identifier: 'div_int' + [1] + +Test Rbrcm.asl: + $ aslref Rbrcm.asl + TRUE +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rbrcm.asl + // CHECK: TRUE + +Test Rrxyn.asl: + $ aslref Rrxyn.asl + 240 + -16 +For reference, the test writter intention was that this output matched: + $ grep '^// CHECK' Rrxyn.asl + // CHECK: 240 + // CHECK-NEXT: -16 + +Test Rdgbm.asl: + $ aslref Rdgbm.asl +