From: Tim Vieira Date: Mon, 1 Jul 2013 04:38:27 +0000 (-0400) Subject: changed repl prompt X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=78463cedab54108b39bd16610d32527c54723b3d;p=dyna2 changed repl prompt commented out failed attempt at providing 'for X in [1,2,3]' hid developer tools from repl. trace: - fixed cycle detection - terser information printed for each edge. item => value | += val1 | | instantiated rule with subexpressions and variable values shown | inline. | | RECURSE on items in rule. | | += val2 - changed color coding. - documentation, `> help trace` No more barfing on empty input to trace, query, vquery. --- diff --git a/examples/fib-bc.dyna b/examples/fib-bc.dyna new file mode 100644 index 0000000..a4d7738 --- /dev/null +++ b/examples/fib-bc.dyna @@ -0,0 +1,9 @@ +:- backchain f/1. + +f(X) := f(X-1) + f(X-2) for X > 1. +f(1) := 1. +f(0) := 1. + +a := f(3). +b := f(4). +c := f(5). diff --git a/examples/peano.dyna b/examples/peano.dyna new file mode 100644 index 0000000..6e0650d --- /dev/null +++ b/examples/peano.dyna @@ -0,0 +1,2 @@ +value(&z) := 0. +value(&s(X)) := 1+value(X) for value(X) < 10.