improved parser documentation

parent fdb4f13a
......@@ -1401,6 +1401,8 @@ The parsing lib is structured in subnodes according to,
* stream ideom:: How to create arbritrary streams in generality
* parser combinators:: Constructing parser using higher order functions
* expressions:: Configurable Expression Parser
* parser tooling:: How to setup a parser generating tool.
* parser debugging:: How to trace the parser.
@end menu
@node stream ideom
......@@ -1437,7 +1439,9 @@ in practice one keeps the numbers of needed uses of all of the above framework b
@section Parser Combinators
The combinators are basic elements that you get from the module @code{(logic guile-log parser)}. To note here is with these we define elements to do parsing in a ``functional'' way together with som utilities to memoize sections and produce tokens. Tokens are more interned scheme data then the standard way of matching that is lightweight and just represent sequences of the incoming chars. They are also cheap to backtrack over but will put a demand on the supply of prolog variables.
@subsection higher order elements
@subsection higher order elements,
In the arguments to the combinators below a string will be automatically converted to @code{(f-tag "string")}.
@findex f-and
@findex f-and!
@findex f-and!!
......@@ -1455,8 +1459,11 @@ The combinators are basic elements that you get from the module @code{(logic gui
@findex f-not
@findex f-not!
@findex f-not-pr
@findex f-not*
@code{(f-not f)}, higher order function. matches one char if not @code{f} maches. Similarly @code{f-not!} stores and returns the matched character in the match standard way of storing data and @code{f-not-pr} prints the character on standard output.
@code{(f-not* f)}, this will not consume any characters and fail if @code{f} is true.
@findex f*
@code{(f* f)}, higher order function, matches @code{f} 0 or more times.
......@@ -1467,6 +1474,7 @@ The combinators are basic elements that you get from the module @code{(logic gui
@code{(fn f n m)}, matches @code{f} n to m times
@subsection Basic parser functions
@findex f-id
@findex f-tag
@findex f-tag!
@findex f-tag-pr
......@@ -1492,6 +1500,35 @@ The combinators are basic elements that you get from the module @code{(logic gui
@findex tok-ws+
@code{tok-ws*, tok-ws+}, this is an non token generator token e.g. it returns the input state of the out stream. But it does tokenizing by issuing a freeze so it memoizes and will not reparse whitespace. the * version is for 0 or more whitespaces and + for one or more whitespaces. A whitespace is here defined as 'space' 'tab' and 'newline'.
@subsection constructor combinators,
The argument to these functions will auto output keyword arguments e.g. it does an automatic @code{(f-out #:keyword)} in the place.
@findex f-cons
@findex f-list
@findex f-append
@findex f-cons*
@findex ff?
@findex ff*
@findex ff+
@findex f-out
@code{(f-cons f1 f2)}, as @code{(f-seq f1 f2)}, but the output is consed.
@code{(f-list f ...)}, as @code{(f-seq f ...)}, but the outut is combined in a list.
@code{(f-cons* f ...)}, similarly as @code{f-list} above.
@code{(f-out tag)}, will produce a matcher that conses @code{tag}
to the output at the end of a matching.
@code{(ff* f)}, as @code{(f* f)}, but makes a list of the output.
@code{(ff* f tag)}, as aboove but prepends the list with @code{tag}.
@code{(ff+ f), (ff+ f tag)}, as for @code{ff*} above but matches one or more elements.
@code{(ff? f)}, Matches one or if zero matches outputs @code{#f}.
@code{(ff? f default)}, Matches one or if zero matches outputs @code{default}.
@subsection utilities
......@@ -1547,6 +1584,44 @@ That is a binary oparator is of the form,
And a unary operator is matched by
@code{((type operator-name level _) term column line)}.
@node parser tooling
@section Tooling a parser,
It is possible to change the fundamental behavior of the parser and for that function define all the parser combinators and tools needed to effectively generat AST or just parse out information. The tool is in @code{(logic guile-log parser)}. Use it as
@findex setup-parser
@verbatim
(setup-parser <p-define> <p-lambda> <fail> <p-cc> <succeds> .. xx
X XL ((N 0) (M 0))
s-false s-true s-mk-seq s-mk-and s-mk-or)
@end verbatim
The first row points to the basic parser framework. The second line defines the name of @code{X and XL}, that is standard on all parsers. But then rhe second two syntax parameters @code{N,M} has also initial values. The last line need also to have been defined before and is usually made by @code{make-guile-log.scanner -tools}. As an example this is a basic parser tool for python,
@verbatim
(begin
(define-guile-log-parser-tool (<p-lambda> (X XL N M INDENT)) <p-define> ..
xx <p-cc>)
(make-guile-log-scanner-tools <p-lambda> <fail> <p-cc> <succeds> ..
(X XL N M INDENT)
(c) (d)
s-false s-true s-mk-seq s-mk-and s-mk-or)
;; Sets up a standar parser functionals with INDENT field added
(setup-parser
<p-define> <p-lambda> <fail> <p-cc> <succeds> .. xx
X XL ((N 0) (M 0) (INDENT (list 0)))
s-false s-true s-mk-seq s-mk-and s-mk-or))
@end verbatim
And then you can create your parser to AST, by simply translating the grammar in the python docs. Happy Parsing!!
@node parser debugging
@section Debugging,
It's possible to get an trace from the output of the parser. In all higher order constructors, if the first element is a symbol that will tag the trace output of that ideom. Then to enable parsing use the boolean variable @code{do-print}, that is located in @code{(logic guile-log parser)}. If that variable is true then you will get a parse trace of the parser. To note is that parsing is both traced at success and when the logic leaves that state in e.g. backtracking.
@node sed/grep
@chapter Sed/grep overview
......@@ -2132,7 +2207,7 @@ To note is that currently we have no way of protecting code that are read by e.g
Also you @code{#t,#f} can be used as literals as well as keywords like @code{#:keyword}. The reason for this is to be able to interoperate with scheme and kanren as well as be able you ues goal functions that have keyword argument(s).
@node functors
@section Functors modifiers
@section Functor modifiers
Scheme it's strength in it's strong foundation of theory and most things are composable in a general and sound way. For example the ability to take a function goal and output a new function goal to attach properties to that function is a bit clumsy in prolog. Therefore if you prepend a functor that map functions to functions you may get a nice an tidy syntax. The rule is
......@@ -2151,15 +2226,15 @@ h(X) :- ...
@end verbatim
We see two ways of entering a functor, the first one is
@code{prolog -functor(arg1, ..., argn)}. This is assuming that functor is a scheme funciton defined as
@code{prolog -functor(arg1, ..., argn)}. This is assuming that functor is a scheme function defined as
@code{Scm (functor f arg1 arg2 ... argn)}. @code{f} is the lambda that is defined by all the functors below and the actual function definition.
The othe uses the meta functor @code{functorize}, the signature is
@code{prolog functorize(goal, arg , ...)} Here goal would be something like
@code{G.L. (goal f arg ... x ...)} e.g. goal will be as executeing @code{G.L. (f x ...)} but with the new propertis added. The reason for this complexity are that normal functors are not goals, but goal functions that maps goal functions, in it's first argument, need to be wraped with @code{functorize}.
@code{G.L. (goal f arg ... x ...)} e.g. goal will be as executeing @code{G.L. (f x ...)} but with the new properties added. The reason for this complexity are that normal functors are not goals, but goal functions that maps goal functions, in it's first argument, need to be wraped with @code{functorize}.
Examples of functors and goal functors to use are @code{recursive}, @code{memo}, @code{rec}, @code{tabling} etc found in @code{(logic guile-log memoize)}, and also @code{adaptable_vars} that tells that all variables created in the function should use a default attribute constructor if defined, defiend in @code{(logic guile-log)}.
Examples of functors and goal functors to use are @code{recursive}, @code{memo}, @code{rec}, @code{tabling} etc found in @code{(logic guile-log memoize)}, and also @code{adaptable_vars} that tells that all variables created in the function should use a default attribute constructor if defined, this defined in @code{(logic guile-log)}.
@node closures
......@@ -2605,7 +2680,7 @@ In especially tablating, but also in other recursive datastructures like printin
@findex Level
@findex trace
@findex trace-level
There is a simple tracing framework that can be used. If one are using @code{compile-prolog-string} use syntax parameters @code{Trace = #f/#t} to make all function goals defined to be under tracing supervision and use the syntax parameter @code{Level} do define the default level. It is possible to force a single defineition of a goal functions to be traced by using the prolog functor
There is a simple tracing framework that can be used. If one are using @code{compile-prolog-string} use syntax parameters @code{Trace = #f/#t} to make all function goals defined to be under tracing supervision and use the syntax parameter @code{Level} do define the default level. It is possible to force a single defination of a goal functions to be traced by using the prolog functor
@code{prolog -trace}.
......@@ -2616,7 +2691,7 @@ When running the level of the run is controled by @code{trace-level} and all def
@code{Level <= trace-level}
The simplest way to use this feature is to just use the functot @code{-trace} on the functions that needs to be traced.
The simplest way to use this feature is to just use the functor @code{-trace} on the goal functions that needs to be traced.
@node garbage-collect
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This is a preliminary manual of guile-log package for guile-2.0
Copyright (C) 2012 Stefan Israelsson Tampe -->
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
<html lang="en">
<head>
<title>Preliminary Manual: expressions</title>
<meta name="description" content="Preliminary Manual: expressions">
<meta name="keywords" content="Preliminary Manual: expressions">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Index.html#Index" rel="index" title="Index">
<link href="parsing.html#parsing" rel="up" title="parsing">
<link href="sed_002fgrep.html#sed_002fgrep" rel="next" title="sed/grep">
<link href="parser-combinators.html#parser-combinators" rel="prev" title="parser combinators">
<style type="text/css">
<title>expressions - Preliminary Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Preliminary Manual">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="parsing.html#parsing" title="parsing">
<link rel="prev" href="parser-combinators.html#parser-combinators" title="parser combinators">
<link rel="next" href="parser-tooling.html#parser-tooling" title="parser tooling">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>
This is a preliminary manual of guile-log package for guile-2.0
Copyright (C) 2012 Stefan Israelsson Tampe-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<body>
<div class="node">
<a name="expressions"></a>
<div class="header">
<p>
Previous: <a href="parser-combinators.html#parser-combinators" accesskey="p" rel="prev">parser combinators</a>, Up: <a href="parsing.html#parsing" accesskey="u" rel="up">parsing</a> &nbsp; [<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p>
</div>
Next:&nbsp;<a rel="next" accesskey="n" href="parser-tooling.html#parser-tooling">parser tooling</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="parser-combinators.html#parser-combinators">parser combinators</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="parsing.html#parsing">parsing</a>
<hr>
<a name="Expressions"></a>
</div>
<h3 class="section">10.3 Expressions</h3>
<p>This is a configureable expression parser that can be used for prolog parsing as well as parsing C and C++ expressions. To note is that the data is functionally updated and hence one can store the state at will and later reinstate the parser. The parser ideom is a direct translation of the commonly described prolog parser written in prolog to guile-log. It is then extended to allow ternial operators like <code>?</code> in c as well. To use it load the module <code>(logic guile-log parsing operator-parser)</code>
</p>
<a name="Api-2"></a>
<h4 class="subsection">10.3.1 Api</h4>
<a name="index-make_002dopdata"></a>
<p><code>(make-opdata)</code>, initiates a datastructure to containe needed operator data. The result is a fluid pointing to a functional datastructure.
</p>
<a name="index-add_002doperator"></a>
<p><code>(add-operator data type name level lf)</code>, This will add operator data to the opdata fluid <code>data</code>. <code>type</code> is the type of operator e.g. any of <code>xf,yf,fx,fy,xfx,xfy,yfx</code>, as of the standard meaning of these operators in prolog. <code>name</code> is a string or symbol representing the name of the operator and <code>level</code> is the anti binding strength of the operator e.g. higher value bind less. <code>lf</code> is a parser function that represents possible values to the right of the op-symbol matched, typically this will be <code>tok-ws</code>, but also for e.g. <code>?</code> it can be a parser function matching the middle part of in this operayor which ends with <code>:</code>.
</p>
<a name="index-rem_002doperator"></a>
<p><code>(rem-operator data type name)</code>, removes from the opdata fluid <code>data</code>, the slot represented by the type <code>type</code> and the operator name <code>name</code>.
</p>
<a name="index-mk_002doperator_002dexpression"></a>
<p><code>(mk-operator-expression atom rest-atom data)</code>, will return a parser meta function representing the operator configuration in <code>data</code>, with atom parser function <code>atom</code> and a secondary choised atom if that fails in <code>rest-atom</code>. The returned meta parser function, say <code>ff</code> is typically turned into a parser function for the expression through:
</p>
<p><code>(ff high-level)</code>, with <code>high-level</code>, the highes level found in the table.
</p>
<p>The generator parser <code>f</code> can then be used to match an expression and outpits a syntactic tree with nodes according to e.g.
</p><pre class="verbatim">(parse ``1 + -2'' f)
--&gt;
<p><a name="index-make_002dopdata-246"></a><code>(make-opdata)</code>, initiates a datastructure to containe needed operator data. The result is a fluid pointing to a functional datastructure.
<p><a name="index-add_002doperator-247"></a><code>(add-operator data type name level lf)</code>, This will add operator data to the opdata fluid <code>data</code>. <code>type</code> is the type of operator e.g. any of <code>xf,yf,fx,fy,xfx,xfy,yfx</code>, as of the standard meaning of these operators in prolog. <code>name</code> is a string or symbol representing the name of the operator and <code>level</code> is the anti binding strength of the operator e.g. higher value bind less. <code>lf</code> is a parser function that represents possible values to the right of the op-symbol matched, typically this will be <code>tok-ws</code>, but also for e.g. <code>?</code> it can be a parser function matching the middle part of in this operayor which ends with <code>:</code>.
<p><a name="index-rem_002doperator-248"></a><code>(rem-operator data type name)</code>, removes from the opdata fluid <code>data</code>, the slot represented by the type <code>type</code> and the operator name <code>name</code>.
<p><a name="index-mk_002doperator_002dexpression-249"></a><code>(mk-operator-expression atom rest-atom data)</code>, will return a parser meta function representing the operator configuration in <code>data</code>, with atom parser function <code>atom</code> and a secondary choised atom if that fails in <code>rest-atom</code>. The returned meta parser function, say <code>ff</code> is typically turned into a parser function for the expression through:
<p><code>(ff high-level)</code>, with <code>high-level</code>, the highes level found in the table.
<p>The generator parser <code>f</code> can then be used to match an expression and outpits a syntactic tree with nodes according to e.g.
<pre class="verbatim">(parse ``1 + -2'' f)
-->
(('xfy ``+'' _ _) (#:number 1) (('yf ``-'' _ _) (#:number 2) 4 0) 2 0)
</pre>
<p>That is a binary oparator is of the form,
</p>
<p><code>((type operator-name level _) term-left term-right column line)</code>
</p>
<p>And a unary operator is matched by
</p>
<p><code>((type operator-name level _) term column line)</code>.
</p>
<hr>
<div class="header">
<p>
Previous: <a href="parser-combinators.html#parser-combinators" accesskey="p" rel="prev">parser combinators</a>, Up: <a href="parsing.html#parsing" accesskey="u" rel="up">parsing</a> &nbsp; [<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p>
</div>
<p>That is a binary oparator is of the form,
<p><code>((type operator-name level _) term-left term-right column line)</code>
<p>And a unary operator is matched by
<p><code>((type operator-name level _) term column line)</code>.
</body></html>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This is a preliminary manual of guile-log package for guile-2.0
Copyright (C) 2012 Stefan Israelsson Tampe -->
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
<html lang="en">
<head>
<title>Preliminary Manual: garbage-collect</title>
<meta name="description" content="Preliminary Manual: garbage-collect">
<meta name="keywords" content="Preliminary Manual: garbage-collect">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Index.html#Index" rel="index" title="Index">
<link href="index.html#Top" rel="up" title="Top">
<link href="Index.html#Index" rel="next" title="Index">
<link href="debugging.html#debugging" rel="prev" title="debugging">
<style type="text/css">
<title>garbage-collect - Preliminary Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Preliminary Manual">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="prolog.html#prolog" title="prolog">
<link rel="next" href="Index.html#Index" title="Index">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>
This is a preliminary manual of guile-log package for guile-2.0
Copyright (C) 2012 Stefan Israelsson Tampe-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<body>
<div class="node">
<a name="garbage-collect"></a>
<a name="garbage_002dcollect"></a>
<div class="header">
<p>
Next: <a href="Index.html#Index" accesskey="n" rel="next">Index</a>, Previous: <a href="prolog.html#prolog" accesskey="p" rel="prev">prolog</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p>
</div>
Next:&nbsp;<a rel="next" accesskey="n" href="Index.html#Index">Index</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="prolog.html#prolog">prolog</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
<a name="Garbage-Collection"></a>
</div>
<h2 class="chapter">14 Garbage Collection</h2>
<p>Guile log sports full garbage collection of logical variables which makes it suitable to run server like prolog code. It is experimental but working. Unfourtunately the bdw-gc that guile uses does not allow this to work effectively and hence you need to download and replace the standard bdw-gc with a modified version of it. You may find it at
</p>
<p><code>https://gitorious.org/bdw-gc-logical-mod</code>
</p>
<p>Now you typically build this and make sure to save the old gc.so that guile is using (you can google how to find which shared libraries guile is using) and then clobber the bdw-gc .so file with the newly created one (sic). This is of cause not a simple thing to do, but until we can get some comparable feature in bdw-gc this is what you need to do. Then finally when configureing guile log do something like
</p>
<p><code>./configure --with-logical-gc</code>
</p>
<p>And then make, make install and you will run guile-log with garbage collection on. Then on to happy hacking!.
</p>
<p>To note is that only variables and cons cells allocated from stacks will support garbage collecting. Knaren style variables is fundamentally broken with respect to this and one need for that style use other techniques like making use of return variables in functions and the small but potent hacks you may find in the kanren sources. Another option is to make use of guile-log&rsquo;s <code>&lt;call&gt;</code> that will basically only transfer the set of variables in the result essentially skiping all intermediate allocations.
</p>
<p><code>https://gitorious.org/bdw-gc-logical-mod</code>
<p>Now you typically build this and make sure to save the old gc.so that guile is using (you can google how to find which shared libraries guile is using) and then clobber the bdw-gc .so file with the newly created one (sic). This is of cause not a simple thing to do, but until we can get some comparable feature in bdw-gc this is what you need to do. Then finally when configureing guile log do something like
<p><code>./configure --with-logical-gc</code>
<p>And then make, make install and you will run guile-log with garbage collection on. Then on to happy hacking!.
<p>To note is that only variables and cons cells allocated from stacks will support garbage collecting. Knaren style variables is fundamentally broken with respect to this and one need for that style use other techniques like making use of return variables in functions and the small but potent hacks you may find in the kanren sources. Another option is to make use of guile-log's <code>&lt;call&gt;</code> that will basically only transfer the set of variables in the result essentially skiping all intermediate allocations.
</body></html>
</body>
</html>
This diff is collapsed.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This is a preliminary manual of guile-log package for guile-2.0
Copyright (C) 2012 Stefan Israelsson Tampe -->
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
<html lang="en">
<head>
<title>Preliminary Manual: Top</title>
<meta name="description" content="Preliminary Manual: Top">
<meta name="keywords" content="Preliminary Manual: Top">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="#Top" rel="start" title="Top">
<link href="Index.html#Index" rel="index" title="Index">
<link href="../dir/index.html" rel="up" title="(dir)">
<link href="umatch.html#umatch" rel="next" title="umatch">
<style type="text/css">
<title>Preliminary Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Preliminary Manual">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="../index.html#dir" title="(dir)">
<link rel="next" href="umatch.html#umatch" title="umatch">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>
This is a preliminary manual of guile-log package for guile-2.0
Copyright (C) 2012 Stefan Israelsson Tampe-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<h1 class="settitle" align="center">Preliminary Manual</h1>
<body>
<h1 class="settitle">Preliminary Manual</h1>
<div class="node">
<a name="Top"></a>
<div class="header">
<p>
Next: <a href="umatch.html#umatch" accesskey="n" rel="next">umatch</a>, Up: <a href="../dir/index.html" accesskey="u" rel="up">(dir)</a> &nbsp; [<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p>
</div>
Next:&nbsp;<a rel="next" accesskey="n" href="umatch.html#umatch">umatch</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="../index.html#dir">(dir)</a>
<hr>
<a name="Guile-Log"></a>
<h1 class="top">Guile Log</h1>
<p>Documentation for the Guile-Log Logic Programming Environment for Guile 2.0 v0.4
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="umatch.html#umatch" accesskey="1">umatch</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">low level infrastructure.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="guile_002dlog.html#guile_002dlog" accesskey="2">guile-log</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">This is the guile-log basic macro environment
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="acumulators_002fgenerators.html#acumulators_002fgenerators" accesskey="3">acumulators/generators</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Hot to collect and generate sequences of solutions.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="postpone.html#postpone" accesskey="4">postpone</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">To postpone a search.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="dynamics.html#dynamics" accesskey="5">dynamics</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">catch prompt abort
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="dynamic_002dfunctions.html#dynamic_002dfunctions" accesskey="6">dynamic-functions</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Dynamicaly add, remove and execute clauses
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="rational-data.html#rational-data" accesskey="7">rational data</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Being able to use self referentional datastructures
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="memoizing.html#memoizing" accesskey="8">memoizing</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Memoizing and tablating and recursiviness
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="attributes.html#attributes" accesskey="9">attributes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">meta programming and customized unification
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="parsing.html#parsing">parsing</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">A parsing framework.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="sed_002fgrep.html#sed_002fgrep">sed/grep</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Sed and grep functionalities for scheme
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="kanren.html#kanren">kanren</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Kanren implemented ontop of guile-log
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="prolog.html#prolog">prolog</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">iso-prolog
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="garbage_002dcollect.html#garbage_002dcollect">garbage-collect</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to enable full garbage colection of logical variables
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Index.html#Index">Index</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Complete index.
</td></tr>
</table>
<hr>
<div class="header">
<p>
Next: <a href="umatch.html#umatch" accesskey="n" rel="next">umatch</a>, Up: <a href="../dir/index.html" accesskey="u" rel="up">(dir)</a> &nbsp; [<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h2 class="unnumbered">Guile Log</h2>
<p>Documentation for the Guile-Log Logic Programming Environment for Guile 2.0 v0.4
<ul class="menu">
<li><a accesskey="1" href="umatch.html#umatch">umatch</a>: low level infrastructure.
<li><a accesskey="2" href="guile_002dlog.html#guile_002dlog">guile-log</a>: This is the guile-log basic macro environment
<li><a accesskey="3" href="acumulators_002fgenerators.html#acumulators_002fgenerators">acumulators/generators</a>: Hot to collect and generate sequences of solutions.
<li><a accesskey="4" href="postpone.html#postpone">postpone</a>: To postpone a search.
<li><a accesskey="5" href="dynamics.html#dynamics">dynamics</a>: catch prompt abort
<li><a accesskey="6" href="dynamic_002dfunctions.html#dynamic_002dfunctions">dynamic-functions</a>: Dynamicaly add, remove and execute clauses
<li><a accesskey="7" href="rational-data.html#rational-data">rational data</a>: Being able to use self referentional datastructures
<li><a accesskey="8" href="memoizing.html#memoizing">memoizing</a>: Memoizing and tablating and recursiviness
<li><a accesskey="9" href="attributes.html#attributes">attributes</a>: meta programming and customized unification
<li><a href="parsing.html#parsing">parsing</a>: A parsing framework.
<li><a href="sed_002fgrep.html#sed_002fgrep">sed/grep</a>: Sed and grep functionalities for scheme
<li><a href="kanren.html#kanren">kanren</a>: Kanren implemented ontop of guile-log
<li><a href="prolog.html#prolog">prolog</a>: iso-prolog
<li><a href="garbage_002dcollect.html#garbage_002dcollect">garbage-collect</a>: How to enable full garbage colection of logical variables
<li><a href="Index.html#Index">Index</a>: Complete index.
</ul>
</body></html>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This is a preliminary manual of guile-log package for guile-2.0
Copyright (C) 2012 Stefan Israelsson Tampe -->
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
<html lang="en">
<head>
<title>Preliminary Manual: postpone</title>
<meta name="description" content="Preliminary Manual: postpone">
<meta name="keywords" content="Preliminary Manual: postpone">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Index.html#Index" rel="index" title="Index">
<link href="index.html#Top" rel="up" title="Top">
<link href="dynamics.html#dynamics" rel="next" title="dynamics">
<link href="acumulators_002fgenerators.html#acumulators_002fgenerators" rel="prev" title="acumulators/generators">
<style type="text/css">
<title>postpone - Preliminary Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Preliminary Manual">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="acumulators_002fgenerators.html#acumulators_002fgenerators" title="acumulators/generators">
<link rel="next" href="dynamics.html#dynamics" title="dynamics">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>
This is a preliminary manual of guile-log package for guile-2.0
Copyright (C) 2012 Stefan Israelsson Tampe-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<body>
<div class="node">
<a name="postpone"></a>
<div class="header">