]> hydra-www.ietfng.org Git - dyna2/commitdiff
updated expected output for end-to-end tests.
authortimv <tim.f.vieira@gmail.com>
Fri, 7 Jun 2013 03:53:01 +0000 (23:53 -0400)
committertimv <tim.f.vieira@gmail.com>
Fri, 7 Jun 2013 03:53:01 +0000 (23:53 -0400)
examples/expected/dijkstra.py.out
examples/expected/matrixops.py.out
examples/expected/papa2.py.out
examples/expected/simple.py.out
src/Dyna/Backend/Python/debug.py

index 562a7a8d7c7527465e2d58ca1826b4318a317ffb..4fcbb540eab4831b66d466950442e72693e8ab75 100644 (file)
@@ -3,23 +3,23 @@ Charts
 ============
 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
 
 end/0
 =================
-end                            := 'MyHouse'
+end                            := "MyHouse"
 
 goal/0
 =================
@@ -27,17 +27,17 @@ goal                           := 2410
 
 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
 
 start/0
 =================
-start                          := 'FriendHouse'
+start                          := "FriendHouse"
 
index 434aef483bec39b77b5d0f5bf71f648c5d48843e..76ff74304137826cd6254b16fd2cb52b76872386 100644 (file)
@@ -50,9 +50,9 @@ 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
 =================
index e616c050149abc8171a52505ea27a722784fe98a..3ec66f33fa8155a23a43c1940013bee1e385df58 100644 (file)
@@ -3,11 +3,11 @@ Charts
 ============
 best/0
 =================
-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'))))),'.'))
+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/0
 =================
-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'))))),'.')
+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/0
 =================
@@ -15,8 +15,8 @@ bestScore                      := 1
 
 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
 
 length/0
 =================
@@ -28,53 +28,53 @@ pair/2
 
 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
 
 t/2
 =================
@@ -86,12 +86,12 @@ t/3
 
 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
 
index b8b99a99bb9521161c925f8919fe561c86a8b649..bd2f72ce9659b4ef6f45c4df2375b2813ba666d1 100644 (file)
@@ -3,13 +3,13 @@ Charts
 ============
 a/0
 =================
-a                              := True
+a                              := true
 
 b/0
 =================
-b                              := True
+b                              := true
 
 c/0
 =================
-c                              := True
+c                              := true
 
index 1d69906541edae33ccdb6c4ef442fbd662fd4136..96f816a82be7739efa9233d05cfd298ad4366889 100644 (file)
@@ -146,10 +146,6 @@ class Hypergraph(object):
         return t(root)
 
 
-#def show_slice(e, M):
-#    return [(b if bind else ':') for b, bind in zip(e.body, M)]
-
-
 def isvar(x):
     return isinstance(x,str) and (x.isupper() or x.startswith('_$'))