diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/Course-2002-04.check | 74 | ||||
-rw-r--r-- | test/files/run/Course-2002-04.scala | 12 | ||||
-rw-r--r-- | test/files/run/Course-2002-07.check | 134 | ||||
-rw-r--r-- | test/files/run/Course-2002-08.check | 2 | ||||
-rw-r--r-- | test/files/run/Course-2002-13.check | 16 | ||||
-rw-r--r-- | test/files/run/queens.check | 8 |
6 files changed, 123 insertions, 123 deletions
diff --git a/test/files/run/Course-2002-04.check b/test/files/run/Course-2002-04.check index 7ea635f478..876643cda7 100644 --- a/test/files/run/Course-2002-04.check +++ b/test/files/run/Course-2002-04.check @@ -1,10 +1,10 @@ -list0 = [6,3,1,8,7,1,2,5,8,4,3,4,8] -list1 = [1,1,2,3,3,4,4,5,6,7,8,8,8] -list2 = [1,1,2,3,3,4,4,5,6,7,8,8,8] -list3 = [1,1,2,3,3,4,4,5,6,7,8,8,8] -list4 = [1,1,2,3,3,4,4,5,6,7,8,8,8] -list5 = [8,8,8,7,6,5,4,4,3,3,2,1,1] -list6 = [8,8,8,7,6,5,4,4,3,3,2,1,1] +list0 = List(6,3,1,8,7,1,2,5,8,4,3,4,8) +list1 = List(1,1,2,3,3,4,4,5,6,7,8,8,8) +list2 = List(1,1,2,3,3,4,4,5,6,7,8,8,8) +list3 = List(1,1,2,3,3,4,4,5,6,7,8,8,8) +list4 = List(1,1,2,3,3,4,4,5,6,7,8,8,8) +list5 = List(8,8,8,7,6,5,4,4,3,3,2,1,1) +list6 = List(8,8,8,7,6,5,4,4,3,3,2,1,1) f(x) = 5x^3+7x^2+5x+9 f(0) = 9.0 @@ -12,41 +12,41 @@ f(1) = 26.0 f(2) = 87.0 f(3) = 222.0 -v1 = [2.0,3.0,4.0] -v2 = [6.0,7.0,8.0] +v1 = List(2.0,3.0,4.0) +v2 = List(6.0,7.0,8.0) -id = [[1.0,0.0,0.0],[0.0,1.0,0.0],[0.0,0.0,1.0]] -m1 = [[2.0,0.0,0.0],[0.0,2.0,0.0],[0.0,0.0,2.0]] -m2 = [[1.0,2.0,3.0],[4.0,5.0,6.0],[7.0,8.0,9.0]] +id = List(List(1.0,0.0,0.0),List(0.0,1.0,0.0),List(0.0,0.0,1.0)) +m1 = List(List(2.0,0.0,0.0),List(0.0,2.0,0.0),List(0.0,0.0,2.0)) +m2 = List(List(1.0,2.0,3.0),List(4.0,5.0,6.0),List(7.0,8.0,9.0)) v1 * v1 = 29.0 v1 * v2 = 65.0 v2 * v1 = 65.0 v1 * v2 = 65.0 -id * v1 = [2.0,3.0,4.0] -m1 * v1 = [4.0,6.0,8.0] -m2 * v1 = [20.0,47.0,74.0] - -trn(id) = [[1.0,0.0,0.0],[0.0,1.0,0.0],[0.0,0.0,1.0]] -trn(m1) = [[2.0,0.0,0.0],[0.0,2.0,0.0],[0.0,0.0,2.0]] -trn(m2) = [[1.0,4.0,7.0],[2.0,5.0,8.0],[3.0,6.0,9.0]] - -[v1] * id = [[2.0,3.0,4.0]] -[v1] * m1 = [[4.0,6.0,8.0]] -[v1] * m2 = [[42.0,51.0,60.0]] - -id * [v1] = [[2.0,3.0,4.0],[0.0,0.0,0.0],[0.0,0.0,0.0]] -m1 * [v1] = [[4.0,6.0,8.0],[0.0,0.0,0.0],[0.0,0.0,0.0]] -m2 * [v1] = [[2.0,3.0,4.0],[8.0,12.0,16.0],[14.0,21.0,28.0]] - -id * id = [[1.0,0.0,0.0],[0.0,1.0,0.0],[0.0,0.0,1.0]] -id * m1 = [[2.0,0.0,0.0],[0.0,2.0,0.0],[0.0,0.0,2.0]] -m1 * id = [[2.0,0.0,0.0],[0.0,2.0,0.0],[0.0,0.0,2.0]] -m1 * m1 = [[4.0,0.0,0.0],[0.0,4.0,0.0],[0.0,0.0,4.0]] -id * m2 = [[1.0,2.0,3.0],[4.0,5.0,6.0],[7.0,8.0,9.0]] -m2 * id = [[1.0,2.0,3.0],[4.0,5.0,6.0],[7.0,8.0,9.0]] -m1 * m2 = [[2.0,4.0,6.0],[8.0,10.0,12.0],[14.0,16.0,18.0]] -m2 * m1 = [[2.0,4.0,6.0],[8.0,10.0,12.0],[14.0,16.0,18.0]] -m2 * m2 = [[30.0,36.0,42.0],[66.0,81.0,96.0],[102.0,126.0,150.0]] +id * v1 = List(2.0,3.0,4.0) +m1 * v1 = List(4.0,6.0,8.0) +m2 * v1 = List(20.0,47.0,74.0) + +trn(id) = List(List(1.0,0.0,0.0),List(0.0,1.0,0.0),List(0.0,0.0,1.0)) +trn(m1) = List(List(2.0,0.0,0.0),List(0.0,2.0,0.0),List(0.0,0.0,2.0)) +trn(m2) = List(List(1.0,4.0,7.0),List(2.0,5.0,8.0),List(3.0,6.0,9.0)) + +List(v1) * id = List(List(2.0,3.0,4.0)) +List(v1) * m1 = List(List(4.0,6.0,8.0)) +List(v1) * m2 = List(List(42.0,51.0,60.0)) + +id * List(v1) = List(List(2.0,3.0,4.0),List(0.0,0.0,0.0),List(0.0,0.0,0.0)) +m1 * List(v1) = List(List(4.0,6.0,8.0),List(0.0,0.0,0.0),List(0.0,0.0,0.0)) +m2 * List(v1) = List(List(2.0,3.0,4.0),List(8.0,12.0,16.0),List(14.0,21.0,28.0)) + +id * id = List(List(1.0,0.0,0.0),List(0.0,1.0,0.0),List(0.0,0.0,1.0)) +id * m1 = List(List(2.0,0.0,0.0),List(0.0,2.0,0.0),List(0.0,0.0,2.0)) +m1 * id = List(List(2.0,0.0,0.0),List(0.0,2.0,0.0),List(0.0,0.0,2.0)) +m1 * m1 = List(List(4.0,0.0,0.0),List(0.0,4.0,0.0),List(0.0,0.0,4.0)) +id * m2 = List(List(1.0,2.0,3.0),List(4.0,5.0,6.0),List(7.0,8.0,9.0)) +m2 * id = List(List(1.0,2.0,3.0),List(4.0,5.0,6.0),List(7.0,8.0,9.0)) +m1 * m2 = List(List(2.0,4.0,6.0),List(8.0,10.0,12.0),List(14.0,16.0,18.0)) +m2 * m1 = List(List(2.0,4.0,6.0),List(8.0,10.0,12.0),List(14.0,16.0,18.0)) +m2 * m2 = List(List(30.0,36.0,42.0),List(66.0,81.0,96.0),List(102.0,126.0,150.0)) diff --git a/test/files/run/Course-2002-04.scala b/test/files/run/Course-2002-04.scala index 61deb96a11..7370b9150c 100644 --- a/test/files/run/Course-2002-04.scala +++ b/test/files/run/Course-2002-04.scala @@ -124,14 +124,14 @@ object M2 { System.out.println("trn(m2) = " + transpose(m2)); System.out.println(); - System.out.println("[v1] * id = " + matrixTimesMatrix(List(v1),id)); - System.out.println("[v1] * m1 = " + matrixTimesMatrix(List(v1),m1)); - System.out.println("[v1] * m2 = " + matrixTimesMatrix(List(v1),m2)); + System.out.println("List(v1) * id = " + matrixTimesMatrix(List(v1),id)); + System.out.println("List(v1) * m1 = " + matrixTimesMatrix(List(v1),m1)); + System.out.println("List(v1) * m2 = " + matrixTimesMatrix(List(v1),m2)); System.out.println(); - System.out.println("id * [v1] = " + matrixTimesMatrix(id,List(v1))); - System.out.println("m1 * [v1] = " + matrixTimesMatrix(m1,List(v1))); - System.out.println("m2 * [v1] = " + matrixTimesMatrix(m2,List(v1))); + System.out.println("id * List(v1) = " + matrixTimesMatrix(id,List(v1))); + System.out.println("m1 * List(v1) = " + matrixTimesMatrix(m1,List(v1))); + System.out.println("m2 * List(v1) = " + matrixTimesMatrix(m2,List(v1))); System.out.println(); System.out.println("id * id = " + matrixTimesMatrix(id,id)); diff --git a/test/files/run/Course-2002-07.check b/test/files/run/Course-2002-07.check index bb69b26734..0a378e6d20 100644 --- a/test/files/run/Course-2002-07.check +++ b/test/files/run/Course-2002-07.check @@ -22,73 +22,73 @@ 1 + 2 = 3 2 + 3 + 4 = 9 -[] = concat([]) -[] = concat([[]]) -[] = concat([[],[]]) -[] = concat([[],[],[]]) -[1,2,3,4,5,6] = concat([[1,2,3,4,5,6]]) -[1,2,3,4,5,6] = concat([[1,2,3,4,5,6],[]]) -[1,2,3,4,5,6] = concat([[1,2,3],[4,5,6]]) -[1,2,3,4,5,6] = concat([[],[1,2,3,4,5,6]]) -[1,2,3,4,5,6] = concat([[1,2,3,4,5,6],[],[]]) -[1,2,3,4,5,6] = concat([[1,2,3,4,5],[6],[]]) -[1,2,3,4,5,6] = concat([[1,2,3],[4,5,6],[]]) -[1,2,3,4,5,6] = concat([[1],[2,3,4,5,6],[]]) -[1,2,3,4,5,6] = concat([[],[1,2,3,4,5,6],[]]) -[1,2,3,4,5,6] = concat([[],[1,2,3,4,5],[6]]) -[1,2,3,4,5,6] = concat([[],[1,2,3],[4,5,6]]) -[1,2,3,4,5,6] = concat([[],[1],[2,3,4,5,6]]) -[1,2,3,4,5,6] = concat([[],[],[1,2,3,4,5,6]]) -[1,2,3,4,5,6] = concat([[1,2],[3,4],[5,6]]) - -[] = zipFun([],[]) -[] = zipFun([],[a,b,c]) -[] = zipFun([1,2,3],[]) -[(1,a)] = zipFun([1],[a]) -[(1,a)] = zipFun([1],[a,b,c]) -[(1,a)] = zipFun([1,2,3],[a]) -[(1,a),(2,b)] = zipFun([1,2],[a,b]) -[(1,a),(2,b)] = zipFun([1,2],[a,b,c]) -[(1,a),(2,b)] = zipFun([1,2,3],[a,b]) -[(1,a),(2,b),(3,c)] = zipFun([1,2,3],[a,b,c]) - -[] = heads([]) -[] = heads([[]]) -[] = heads([[],[]]) -[] = heads([[],[],[]]) -[1] = heads([[1,2,3,4,5,6]]) -[1] = heads([[1,2,3,4,5,6],[]]) -[1] = heads([[],[1,2,3,4,5,6]]) -[1] = heads([[1,2,3,4,5,6],[],[]]) -[1] = heads([[],[1,2,3,4,5,6],[]]) -[1] = heads([[],[],[1,2,3,4,5,6]]) -[1,2] = heads([[1],[2,3,4,5,6],[]]) -[1,2] = heads([[],[1],[2,3,4,5,6]]) -[1,4] = heads([[1,2,3],[4,5,6]]) -[1,4] = heads([[1,2,3],[4,5,6],[]]) -[1,4] = heads([[],[1,2,3],[4,5,6]]) -[1,6] = heads([[1,2,3,4,5],[6],[]]) -[1,6] = heads([[],[1,2,3,4,5],[6]]) -[1,3,5] = heads([[1,2],[3,4],[5,6]]) - -[] = heads([]) -[] = heads([[]]) -[] = heads([[],[]]) -[] = heads([[],[],[]]) -[1] = heads([[1,2,3,4,5,6]]) -[1] = heads([[1,2,3,4,5,6],[]]) -[1] = heads([[],[1,2,3,4,5,6]]) -[1] = heads([[1,2,3,4,5,6],[],[]]) -[1] = heads([[],[1,2,3,4,5,6],[]]) -[1] = heads([[],[],[1,2,3,4,5,6]]) -[1,2] = heads([[1],[2,3,4,5,6],[]]) -[1,2] = heads([[],[1],[2,3,4,5,6]]) -[1,4] = heads([[1,2,3],[4,5,6]]) -[1,4] = heads([[1,2,3],[4,5,6],[]]) -[1,4] = heads([[],[1,2,3],[4,5,6]]) -[1,6] = heads([[1,2,3,4,5],[6],[]]) -[1,6] = heads([[],[1,2,3,4,5],[6]]) -[1,3,5] = heads([[1,2],[3,4],[5,6]]) +List() = concat(List()) +List() = concat(List(List())) +List() = concat(List(List(),List())) +List() = concat(List(List(),List(),List())) +List(1,2,3,4,5,6) = concat(List(List(1,2,3,4,5,6))) +List(1,2,3,4,5,6) = concat(List(List(1,2,3,4,5,6),List())) +List(1,2,3,4,5,6) = concat(List(List(1,2,3),List(4,5,6))) +List(1,2,3,4,5,6) = concat(List(List(),List(1,2,3,4,5,6))) +List(1,2,3,4,5,6) = concat(List(List(1,2,3,4,5,6),List(),List())) +List(1,2,3,4,5,6) = concat(List(List(1,2,3,4,5),List(6),List())) +List(1,2,3,4,5,6) = concat(List(List(1,2,3),List(4,5,6),List())) +List(1,2,3,4,5,6) = concat(List(List(1),List(2,3,4,5,6),List())) +List(1,2,3,4,5,6) = concat(List(List(),List(1,2,3,4,5,6),List())) +List(1,2,3,4,5,6) = concat(List(List(),List(1,2,3,4,5),List(6))) +List(1,2,3,4,5,6) = concat(List(List(),List(1,2,3),List(4,5,6))) +List(1,2,3,4,5,6) = concat(List(List(),List(1),List(2,3,4,5,6))) +List(1,2,3,4,5,6) = concat(List(List(),List(),List(1,2,3,4,5,6))) +List(1,2,3,4,5,6) = concat(List(List(1,2),List(3,4),List(5,6))) + +List() = zipFun(List(),List()) +List() = zipFun(List(),List(a,b,c)) +List() = zipFun(List(1,2,3),List()) +List((1,a)) = zipFun(List(1),List(a)) +List((1,a)) = zipFun(List(1),List(a,b,c)) +List((1,a)) = zipFun(List(1,2,3),List(a)) +List((1,a),(2,b)) = zipFun(List(1,2),List(a,b)) +List((1,a),(2,b)) = zipFun(List(1,2),List(a,b,c)) +List((1,a),(2,b)) = zipFun(List(1,2,3),List(a,b)) +List((1,a),(2,b),(3,c)) = zipFun(List(1,2,3),List(a,b,c)) + +List() = heads(List()) +List() = heads(List(List())) +List() = heads(List(List(),List())) +List() = heads(List(List(),List(),List())) +List(1) = heads(List(List(1,2,3,4,5,6))) +List(1) = heads(List(List(1,2,3,4,5,6),List())) +List(1) = heads(List(List(),List(1,2,3,4,5,6))) +List(1) = heads(List(List(1,2,3,4,5,6),List(),List())) +List(1) = heads(List(List(),List(1,2,3,4,5,6),List())) +List(1) = heads(List(List(),List(),List(1,2,3,4,5,6))) +List(1,2) = heads(List(List(1),List(2,3,4,5,6),List())) +List(1,2) = heads(List(List(),List(1),List(2,3,4,5,6))) +List(1,4) = heads(List(List(1,2,3),List(4,5,6))) +List(1,4) = heads(List(List(1,2,3),List(4,5,6),List())) +List(1,4) = heads(List(List(),List(1,2,3),List(4,5,6))) +List(1,6) = heads(List(List(1,2,3,4,5),List(6),List())) +List(1,6) = heads(List(List(),List(1,2,3,4,5),List(6))) +List(1,3,5) = heads(List(List(1,2),List(3,4),List(5,6))) + +List() = heads(List()) +List() = heads(List(List())) +List() = heads(List(List(),List())) +List() = heads(List(List(),List(),List())) +List(1) = heads(List(List(1,2,3,4,5,6))) +List(1) = heads(List(List(1,2,3,4,5,6),List())) +List(1) = heads(List(List(),List(1,2,3,4,5,6))) +List(1) = heads(List(List(1,2,3,4,5,6),List(),List())) +List(1) = heads(List(List(),List(1,2,3,4,5,6),List())) +List(1) = heads(List(List(),List(),List(1,2,3,4,5,6))) +List(1,2) = heads(List(List(1),List(2,3,4,5,6),List())) +List(1,2) = heads(List(List(),List(1),List(2,3,4,5,6))) +List(1,4) = heads(List(List(1,2,3),List(4,5,6))) +List(1,4) = heads(List(List(1,2,3),List(4,5,6),List())) +List(1,4) = heads(List(List(),List(1,2,3),List(4,5,6))) +List(1,6) = heads(List(List(1,2,3,4,5),List(6),List())) +List(1,6) = heads(List(List(),List(1,2,3,4,5),List(6))) +List(1,3,5) = heads(List(List(1,2),List(3,4),List(5,6))) f (x) = Prod(Var(x), Var(x)) f'(x) = Sum(Prod(Var(x), Number(1)), Prod(Var(x), Number(1))) diff --git a/test/files/run/Course-2002-08.check b/test/files/run/Course-2002-08.check index ed3f6b254d..ec25c77524 100644 --- a/test/files/run/Course-2002-08.check +++ b/test/files/run/Course-2002-08.check @@ -28,7 +28,7 @@ y withdraw 20 -> 10 2^3 = 8.0 1 2 3 -[1,2,3] +List(1,2,3) out 0 new-value = false *** simulation started *** diff --git a/test/files/run/Course-2002-13.check b/test/files/run/Course-2002-13.check index 5e9c706d28..913c4e4edd 100644 --- a/test/files/run/Course-2002-13.check +++ b/test/files/run/Course-2002-13.check @@ -1,13 +1,13 @@ -[S = jean,V = mange,A = le,D = grand,N = table] -[S = jean,V = mange,A = le,D = grand,N = cheval] +List(S = jean,V = mange,A = le,D = grand,N = table) +List(S = jean,V = mange,A = le,D = grand,N = cheval) -[S = jean,V = mange,A = le,D = grand,N = cheval] -[S = jean,V = mange,A = la,D = belle,N = table] +List(S = jean,V = mange,A = le,D = grand,N = cheval) +List(S = jean,V = mange,A = la,D = belle,N = table) -[S = jean,V = mange,A = le,D = nil,N = cheval] -[S = jean,V = mange,A = le,D = cons(grand,nil),N = cheval] -[S = jean,V = mange,A = le,D = cons(grand,cons(grand,nil)),N = cheval] -[S = jean,V = mange,A = la,D = nil,N = table] +List(S = jean,V = mange,A = le,D = nil,N = cheval) +List(S = jean,V = mange,A = le,D = cons(grand,nil),N = cheval) +List(S = jean,V = mange,A = le,D = cons(grand,cons(grand,nil)),N = cheval) +List(S = jean,V = mange,A = la,D = nil,N = table) yes yes no diff --git a/test/files/run/queens.check b/test/files/run/queens.check index d4fcae7ccf..8187f196b8 100644 --- a/test/files/run/queens.check +++ b/test/files/run/queens.check @@ -1,4 +1,4 @@ -Solutions to 1 queens: [[1]] -Solutions to 2 queens: [] -Solutions to 3 queens: [] -Solutions to 4 queens: [[3,1,4,2],[2,4,1,3]] +Solutions to 1 queens: List(List(1)) +Solutions to 2 queens: List() +Solutions to 3 queens: List() +Solutions to 4 queens: List(List(3,1,4,2),List(2,4,1,3)) |