Diff of /doc/html/knowledge_bases/special.html [5cabfd] .. [4dca5a] Maximize Restore

  Switch to side-by-side view

--- a/doc/html/knowledge_bases/special.html
+++ b/doc/html/knowledge_bases/special.html
@@ -45,7 +45,7 @@
 <div class="normal-nav"><a href="special.html">Special</a></div>
 </div>
 <div class="normal-nav"><a href="../pyke_syntax/index.html">Pyke Syntax</a></div>
-<div class="normal-nav"><a href="../using_pyke.html">Using Pyke</a></div>
+<div class="normal-nav"><a href="../using_pyke/index.html">Using Pyke</a></div>
 <div class="normal-nav"><a href="../examples.html">Examples</a></div>
 <div class="normal-nav"><a href="../PyCon2008-paper.html">PyCon 2008 Paper</a></div>
 </div>
@@ -95,7 +95,7 @@
 special.claim_goal()
 </pre>
 <p>This acts like the <a class="reference external" href="http://en.wikipedia.org/wiki/Prolog">Prolog</a> <a class="reference external" href="http://en.wikipedia.org/wiki/Cut_%28logic_programming%29">cut operator</a>.</p>
-<p>In general there are multiple <a class="reference external" href="../logic_programming/rules/index.html">rules</a> that might be used to try to <a class="reference external" href="../using_pyke.html#proving-goals">prove</a> any
+<p>In general there are multiple <a class="reference external" href="../logic_programming/rules/index.html">rules</a> that might be used to try to <a class="reference external" href="../using_pyke/proving_goals.html">prove</a> any
 <a class="reference external" href="../pyke_syntax/krb_syntax/bc_rule.html#use-clause">goal</a>.  They are each tried in the order that they appear in the <a class="reference external" href="../pyke_syntax/krb_syntax/index.html">.krb file</a>.
 If one rule fails, the next rule is tried.  The goal itself doesn't fail
 until all of the rules for it have failed.</p>
@@ -202,9 +202,9 @@
 <pre class="doctest-block">
 &gt;&gt;&gt; from pyke import knowledge_engine
 &gt;&gt;&gt; engine = knowledge_engine.engine()
-&gt;&gt;&gt; engine.prove_1('special', 'check_command', (('true',),), 0)
-((), None)
-&gt;&gt;&gt; engine.prove_1('special', 'check_command', (('false',),), 0)
+&gt;&gt;&gt; engine.prove_1_goal('special.check_command((true))')
+({}, None)
+&gt;&gt;&gt; engine.prove_1_goal('special.check_command((false))')
 Traceback (most recent call last):
     ...
 pyke.knowledge_engine.CanNotProve: Can not prove special.check_command((false))
@@ -226,16 +226,14 @@
 &gt;&gt;&gt; from __future__ import with_statement
 &gt;&gt;&gt; from pyke import pattern, contexts
 &gt;&gt;&gt; def run_command(entity, command, cwd=None, stdin=None):
-...     my_context = contexts.simple_context()
-...     output = contexts.variable('output')
-...     with engine.prove('special', entity, my_context,
-...                       (output,
-...                        pattern.pattern_literal(command),
-...                        pattern.pattern_literal(cwd),
-...                        pattern.pattern_literal(stdin))) \
+...     with engine.prove_goal(
+...            'special.%s($output, $command, $cwd, $stdin)' % entity,
+...            command=command,
+...            cwd=cwd,
+...            stdin=stdin) \
 ...       as gen:
-...         for no_plan in gen:
-...             print(output.as_data(my_context))
+...         for vars, no_plan in gen:
+...             print(vars['output'])
 &gt;&gt;&gt; run_command('command', ('echo', 'hi', 'mom'))
 ('hi mom',)
 &gt;&gt;&gt; run_command('command', ('ls',))   # doctest: +NORMALIZE_WHITESPACE
@@ -327,7 +325,7 @@
 
   <div id="last-modified">
     Page last modified
-    Wed, Oct 28 2009.
+    Fri, Mar 05 2010.
 
   </div>