]> hydra-www.ietfng.org Git - dyna2/commitdiff
changed repl prompt
authorTim Vieira <tim.f.vieira@gmail.com>
Mon, 1 Jul 2013 04:38:27 +0000 (00:38 -0400)
committerTim Vieira <tim.f.vieira@gmail.com>
Mon, 1 Jul 2013 04:38:27 +0000 (00:38 -0400)
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.

examples/fib-bc.dyna [new file with mode: 0644]
examples/peano.dyna [new file with mode: 0644]

diff --git a/examples/fib-bc.dyna b/examples/fib-bc.dyna
new file mode 100644 (file)
index 0000000..a4d7738
--- /dev/null
@@ -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 (file)
index 0000000..6e0650d
--- /dev/null
@@ -0,0 +1,2 @@
+value(&z) := 0.
+value(&s(X)) := 1+value(X) for value(X) < 10.