]> hydra-www.ietfng.org Git - dyna2/commitdiff
Issue #15: updated Jason's Dijkstra backpointer example to use which doesn't quote...
authorTim Vieira <tim.f.vieira@gmail.com>
Wed, 10 Jul 2013 19:34:16 +0000 (15:34 -0400)
committerTim Vieira <tim.f.vieira@gmail.com>
Wed, 10 Jul 2013 19:34:16 +0000 (15:34 -0400)
examples/dijkstra-backpointers2.dyna
examples/expected/dijkstra-backpointers.py.out

index bb7948ecea9813385197e4b0e83dae7f0a76f559..f7c8f5f1db7b3b70aa0d21a26dc579eab9a98b83 100644 (file)
@@ -4,7 +4,7 @@
 % Cost of the optimal path from start to each node.  
 % In each case, the associated key is a reversed version of the path itself.
 path(start) min= 0                   with_key [start].
-path(B)     min= path(A) + edge(A,B) with_key P for P is append($key(path(A)),B).
+path(B)     min= path(A) + edge(A,B) with_key append($key(path(A)),B).
 
 % The cost of the optimal path to the end node, and that path itself.
 goal        = path(end).
index f3bbf45c9238d3d2d92770d6dd958a61f9bc4aa9..cc9e93a39e3a8be8cf21b0247c48cfab9f3fc292 100644 (file)
@@ -8,8 +8,7 @@ start = "a".
 
 $key/1
 ======
-$key(goal)      = "d".
-$key(path("a")) = "a".
+$key(path("a")) = [].
 $key(path("b")) = "a".
 $key(path("c")) = "b".
 $key(path("d")) = "e".