From 6457d1414c6f0da7dd79a96a31c7966d67bf2a28 Mon Sep 17 00:00:00 2001 From: Tim Vieira Date: Mon, 1 Jul 2013 15:35:56 -0400 Subject: [PATCH] update tests to reflect new output format. --- examples/expected/dijkstra.py.out | 50 ++++----- examples/expected/equalities.py.out | 14 +-- examples/expected/fib-limit.py.out | 20 ++-- examples/expected/geom.py.out | 2 +- examples/expected/lists.py.out | 6 +- examples/expected/matrixops.py.out | 64 ++++++------ examples/expected/papa2.py.out | 110 ++++++++++---------- examples/expected/simple.py.out | 6 +- test/repl/aggregator-conflict.expect | 6 +- test/repl/late-aggregator-assignment.expect | 6 +- test/repl/retract-rule.expect | 12 +-- 11 files changed, 148 insertions(+), 148 deletions(-) diff --git a/examples/expected/dijkstra.py.out b/examples/expected/dijkstra.py.out index 3199aca..d0e62b5 100644 --- a/examples/expected/dijkstra.py.out +++ b/examples/expected/dijkstra.py.out @@ -1,35 +1,35 @@ Solution ======== -end => "MyHouse". -goal => 2410. -start => "FriendHouse". +end = "MyHouse". +goal = 2410. +start = "FriendHouse". edge/2 ====== -edge("BOS","JFK") => 187. -edge("BOS","MIA") => 1258. -edge("DFW","LAX") => 1235. -edge("DFW","ORD") => 802. -edge("FriendHouse","BOS") => 10. -edge("JFK","DFW") => 1391. -edge("JFK","MIA") => 1090. -edge("JFK","SFO") => 2582. -edge("LAX","ORD") => 1749. -edge("MIA","DFW") => 1121. -edge("MIA","LAX") => 2342. -edge("ORD","DFW") => 802. -edge("ORD","MyHouse") => 20. +edge("BOS","JFK") = 187. +edge("BOS","MIA") = 1258. +edge("DFW","LAX") = 1235. +edge("DFW","ORD") = 802. +edge("FriendHouse","BOS") = 10. +edge("JFK","DFW") = 1391. +edge("JFK","MIA") = 1090. +edge("JFK","SFO") = 2582. +edge("LAX","ORD") = 1749. +edge("MIA","DFW") = 1121. +edge("MIA","LAX") = 2342. +edge("ORD","DFW") = 802. +edge("ORD","MyHouse") = 20. path/1 ====== -path("BOS") => 10. -path("DFW") => 1588. -path("FriendHouse") => 0. -path("JFK") => 197. -path("LAX") => 2823. -path("MIA") => 1268. -path("MyHouse") => 2410. -path("ORD") => 2390. -path("SFO") => 2779. +path("BOS") = 10. +path("DFW") = 1588. +path("FriendHouse") = 0. +path("JFK") = 197. +path("LAX") = 2823. +path("MIA") = 1268. +path("MyHouse") = 2410. +path("ORD") = 2390. +path("SFO") = 2779. diff --git a/examples/expected/equalities.py.out b/examples/expected/equalities.py.out index a9e2991..137d94f 100644 --- a/examples/expected/equalities.py.out +++ b/examples/expected/equalities.py.out @@ -1,11 +1,11 @@ Solution ======== -a => 0. -b => 0. -by_evl_cross => true. -by_evl_refl => true. -by_is_0a => true. -by_syn_cross => false. -by_syn_refl => true. +a = 0. +b = 0. +by_evl_cross = true. +by_evl_refl = true. +by_is_0a = true. +by_syn_cross = false. +by_syn_refl = true. diff --git a/examples/expected/fib-limit.py.out b/examples/expected/fib-limit.py.out index dddc39e..436d23a 100644 --- a/examples/expected/fib-limit.py.out +++ b/examples/expected/fib-limit.py.out @@ -1,17 +1,17 @@ Solution ======== -lim => 10. +lim = 10. f/1 === -f(1) => 1. -f(2) => 1. -f(3) => 2. -f(4) => 3. -f(5) => 5. -f(6) => 8. -f(7) => 13. -f(8) => 21. -f(9) => 34. +f(1) = 1. +f(2) = 1. +f(3) = 2. +f(4) = 3. +f(5) = 5. +f(6) = 8. +f(7) = 13. +f(8) = 21. +f(9) = 34. diff --git a/examples/expected/geom.py.out b/examples/expected/geom.py.out index d8c8ed2..530c0ee 100644 --- a/examples/expected/geom.py.out +++ b/examples/expected/geom.py.out @@ -1,5 +1,5 @@ Solution ======== -a => 2.0. +a = 2.0. diff --git a/examples/expected/lists.py.out b/examples/expected/lists.py.out index e5a6168..a11297d 100644 --- a/examples/expected/lists.py.out +++ b/examples/expected/lists.py.out @@ -1,13 +1,13 @@ Solution ======== -a => [1, 2]. +a = [1, 2]. f/1 === -f([1, 2]) => true. +f([1, 2]) = true. goal/1 ====== -goal([2]) => true. +goal([2]) = true. diff --git a/examples/expected/matrixops.py.out b/examples/expected/matrixops.py.out index 5060a88..83e757e 100644 --- a/examples/expected/matrixops.py.out +++ b/examples/expected/matrixops.py.out @@ -4,51 +4,51 @@ Solution cols/1 ====== -cols(a) => 2. -cols(b) => 3. -cols(c) => 3. +cols(a) = 2. +cols(b) = 3. +cols(c) = 3. m/3 === -m(a,1,1) => 1. -m(a,1,2) => 0. -m(a,2,1) => 0. -m(a,2,2) => 1. -m(b,1,1) => 3. -m(b,1,2) => 0. -m(b,1,3) => 1. -m(b,2,1) => 0. -m(b,2,2) => 2. -m(b,2,3) => 0. -m(c,1,1) => 3. -m(c,1,2) => 0. -m(c,1,3) => 1. -m(c,2,1) => 0. -m(c,2,2) => 2. -m(c,2,3) => 0. +m(a,1,1) = 1. +m(a,1,2) = 0. +m(a,2,1) = 0. +m(a,2,2) = 1. +m(b,1,1) = 3. +m(b,1,2) = 0. +m(b,1,3) = 1. +m(b,2,1) = 0. +m(b,2,2) = 2. +m(b,2,3) = 0. +m(c,1,1) = 3. +m(c,1,2) = 0. +m(c,1,3) = 1. +m(c,2,1) = 0. +m(c,2,2) = 2. +m(c,2,3) = 0. product/2 ========= -product(a,b) => c. +product(a,b) = c. rows/1 ====== -rows(a) => 2. -rows(b) => 2. -rows(c) => 2. +rows(a) = 2. +rows(b) = 2. +rows(c) = 2. shape/3 ======= -shape(a,2,2) => true. -shape(b,2,3) => true. -shape(c,2,3) => true. +shape(a,2,2) = true. +shape(b,2,3) = true. +shape(c,2,3) = true. times/4 ======= -times(a,b,1,1) => 3. -times(a,b,1,2) => 0. -times(a,b,1,3) => 1. -times(a,b,2,1) => 0. -times(a,b,2,2) => 2. -times(a,b,2,3) => 0. +times(a,b,1,1) = 3. +times(a,b,1,2) = 0. +times(a,b,1,3) = 1. +times(a,b,2,1) = 0. +times(a,b,2,2) = 2. +times(a,b,2,3) = 0. diff --git a/examples/expected/papa2.py.out b/examples/expected/papa2.py.out index 6a6f3ce..2578b6b 100644 --- a/examples/expected/papa2.py.out +++ b/examples/expected/papa2.py.out @@ -1,74 +1,74 @@ Solution ======== -best => pair(1,t("S",t("S",t("NP","Papa"),t("VP",t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar"))),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon"))))),".")). -bestParse => t("S",t("S",t("NP","Papa"),t("VP",t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar"))),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon"))))),"."). -bestScore => 1. -length => 8. +best = pair(1,t("S",t("S",t("NP","Papa"),t("VP",t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar"))),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon"))))),".")). +bestParse = t("S",t("S",t("NP","Papa"),t("VP",t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar"))),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon"))))),"."). +bestScore = 1. +length = 8. goal/1 ====== -goal(t("S",t("S",t("NP","Papa"),t("VP",t("V","ate"),t("NP",t("NP",t("Det","the"),t("N","caviar")),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon")))))),".")) => 1. -goal(t("S",t("S",t("NP","Papa"),t("VP",t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar"))),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon"))))),".")) => 1. +goal(t("S",t("S",t("NP","Papa"),t("VP",t("V","ate"),t("NP",t("NP",t("Det","the"),t("N","caviar")),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon")))))),".")) = 1. +goal(t("S",t("S",t("NP","Papa"),t("VP",t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar"))),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon"))))),".")) = 1. phrase/4 ======== -phrase(".",7,8,".") => 1. -phrase("Det",2,3,t("Det","the")) => 1. -phrase("Det",5,6,t("Det","a")) => 1. -phrase("N",3,4,t("N","caviar")) => 1. -phrase("N",6,7,t("N","spoon")) => 1. -phrase("NP",0,1,t("NP","Papa")) => 1. -phrase("NP",2,4,t("NP",t("Det","the"),t("N","caviar"))) => 1. -phrase("NP",2,7,t("NP",t("NP",t("Det","the"),t("N","caviar")),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon"))))) => 1. -phrase("NP",5,7,t("NP",t("Det","a"),t("N","spoon"))) => 1. -phrase("P",4,5,t("P","with")) => 1. -phrase("PP",4,7,t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon")))) => 1. -phrase("Papa",0,1,"Papa") => 1. -phrase("S",0,4,t("S",t("NP","Papa"),t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar"))))) => 1. -phrase("S",0,7,t("S",t("NP","Papa"),t("VP",t("V","ate"),t("NP",t("NP",t("Det","the"),t("N","caviar")),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon"))))))) => 1. -phrase("S",0,7,t("S",t("NP","Papa"),t("VP",t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar"))),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon")))))) => 1. -phrase("S",0,8,t("S",t("S",t("NP","Papa"),t("VP",t("V","ate"),t("NP",t("NP",t("Det","the"),t("N","caviar")),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon")))))),".")) => 1. -phrase("S",0,8,t("S",t("S",t("NP","Papa"),t("VP",t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar"))),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon"))))),".")) => 1. -phrase("V",1,2,t("V","ate")) => 1. -phrase("VP",1,4,t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar")))) => 1. -phrase("VP",1,7,t("VP",t("V","ate"),t("NP",t("NP",t("Det","the"),t("N","caviar")),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon")))))) => 1. -phrase("VP",1,7,t("VP",t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar"))),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon"))))) => 1. -phrase("a",5,6,"a") => 1. -phrase("ate",1,2,"ate") => 1. -phrase("caviar",3,4,"caviar") => 1. -phrase("spoon",6,7,"spoon") => 1. -phrase("the",2,3,"the") => 1. -phrase("with",4,5,"with") => 1. +phrase(".",7,8,".") = 1. +phrase("Det",2,3,t("Det","the")) = 1. +phrase("Det",5,6,t("Det","a")) = 1. +phrase("N",3,4,t("N","caviar")) = 1. +phrase("N",6,7,t("N","spoon")) = 1. +phrase("NP",0,1,t("NP","Papa")) = 1. +phrase("NP",2,4,t("NP",t("Det","the"),t("N","caviar"))) = 1. +phrase("NP",2,7,t("NP",t("NP",t("Det","the"),t("N","caviar")),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon"))))) = 1. +phrase("NP",5,7,t("NP",t("Det","a"),t("N","spoon"))) = 1. +phrase("P",4,5,t("P","with")) = 1. +phrase("PP",4,7,t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon")))) = 1. +phrase("Papa",0,1,"Papa") = 1. +phrase("S",0,4,t("S",t("NP","Papa"),t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar"))))) = 1. +phrase("S",0,7,t("S",t("NP","Papa"),t("VP",t("V","ate"),t("NP",t("NP",t("Det","the"),t("N","caviar")),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon"))))))) = 1. +phrase("S",0,7,t("S",t("NP","Papa"),t("VP",t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar"))),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon")))))) = 1. +phrase("S",0,8,t("S",t("S",t("NP","Papa"),t("VP",t("V","ate"),t("NP",t("NP",t("Det","the"),t("N","caviar")),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon")))))),".")) = 1. +phrase("S",0,8,t("S",t("S",t("NP","Papa"),t("VP",t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar"))),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon"))))),".")) = 1. +phrase("V",1,2,t("V","ate")) = 1. +phrase("VP",1,4,t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar")))) = 1. +phrase("VP",1,7,t("VP",t("V","ate"),t("NP",t("NP",t("Det","the"),t("N","caviar")),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon")))))) = 1. +phrase("VP",1,7,t("VP",t("VP",t("V","ate"),t("NP",t("Det","the"),t("N","caviar"))),t("PP",t("P","with"),t("NP",t("Det","a"),t("N","spoon"))))) = 1. +phrase("a",5,6,"a") = 1. +phrase("ate",1,2,"ate") = 1. +phrase("caviar",3,4,"caviar") = 1. +phrase("spoon",6,7,"spoon") = 1. +phrase("the",2,3,"the") = 1. +phrase("with",4,5,"with") = 1. rewrite/2 ========= -rewrite("Det","a") => 1. -rewrite("Det","the") => 1. -rewrite("N","caviar") => 1. -rewrite("N","spoon") => 1. -rewrite("NP","Papa") => 1. -rewrite("P","with") => 1. -rewrite("V","ate") => 1. +rewrite("Det","a") = 1. +rewrite("Det","the") = 1. +rewrite("N","caviar") = 1. +rewrite("N","spoon") = 1. +rewrite("NP","Papa") = 1. +rewrite("P","with") = 1. +rewrite("V","ate") = 1. rewrite/3 ========= -rewrite("NP","Det","N") => 1. -rewrite("NP","NP","PP") => 1. -rewrite("PP","P","NP") => 1. -rewrite("S","NP","VP") => 1. -rewrite("S","S",".") => 1. -rewrite("VP","V","NP") => 1. -rewrite("VP","VP","PP") => 1. +rewrite("NP","Det","N") = 1. +rewrite("NP","NP","PP") = 1. +rewrite("PP","P","NP") = 1. +rewrite("S","NP","VP") = 1. +rewrite("S","S",".") = 1. +rewrite("VP","V","NP") = 1. +rewrite("VP","VP","PP") = 1. word/2 ====== -word(".",7) => true. -word("Papa",0) => true. -word("a",5) => true. -word("ate",1) => true. -word("caviar",3) => true. -word("spoon",6) => true. -word("the",2) => true. -word("with",4) => true. +word(".",7) = true. +word("Papa",0) = true. +word("a",5) = true. +word("ate",1) = true. +word("caviar",3) = true. +word("spoon",6) = true. +word("the",2) = true. +word("with",4) = true. diff --git a/examples/expected/simple.py.out b/examples/expected/simple.py.out index f1139b5..4217593 100644 --- a/examples/expected/simple.py.out +++ b/examples/expected/simple.py.out @@ -1,7 +1,7 @@ Solution ======== -a => true. -b => true. -c => true. +a = true. +b = true. +c = true. diff --git a/test/repl/aggregator-conflict.expect b/test/repl/aggregator-conflict.expect index 6b34765..cebfc6e 100644 --- a/test/repl/aggregator-conflict.expect +++ b/test/repl/aggregator-conflict.expect @@ -1,12 +1,12 @@ > > ============= -a => 1. +a = 1. > DynaCompilerError: Encountered error in input program: - Conflicting aggregators; rule + Conflicting aggregators; rule uses '|=' for a/0 but I had been lead to expect '+='. Everything was syntactically valid, but we could not see it through. -> new rule(s) were not added to program. +new rule(s) were not added to program. > exit diff --git a/test/repl/late-aggregator-assignment.expect b/test/repl/late-aggregator-assignment.expect index 9f9f921..7f69603 100644 --- a/test/repl/late-aggregator-assignment.expect +++ b/test/repl/late-aggregator-assignment.expect @@ -4,7 +4,7 @@ Rules 0: a += b * c. > ============= -b => 2. +b = 2. > Rules ===== @@ -12,8 +12,8 @@ Rules 1: b := 2. > ============= -a => 6. -c => 3. +a = 6. +c = 3. > Rules ===== diff --git a/test/repl/retract-rule.expect b/test/repl/retract-rule.expect index ac656c6..abb16d1 100644 --- a/test/repl/retract-rule.expect +++ b/test/repl/retract-rule.expect @@ -1,9 +1,9 @@ > > ============= -a => 1. +a = 1. > ============= -b => 1. +b = 1. > ============= -a => 2. +a = 2. > Rules ===== @@ -14,12 +14,12 @@ Rules > Solution ======== -a => 2. -b => 1. +a = 2. +b = 1. > > > Solution ======== -a => 1. +a = 1. > exit -- 2.50.1