documented postpone and updated README and added a simple script to do the build

parent 7ddc0be3
This is a draft for guile-2.0.6 and later and works for linux.
We assume guile-2.0 is buildable and that the system is linux in order for the
below to work.
Add this directory to guiles load-path
Go to logic/guile-log/src/
Now you are ready to use it from guile through,
> (use-modules (logic guile-log))
Html Docs: point a browser at doc/guile-log/index.html
Have fun!
......@@ -22,13 +22,14 @@ Copyright @copyright{} 2012 Staefan Israelsson tampe
@node Top
@top Guile Log
Documentation for the Guile Log Logic Programming Environment for Guile 2.0
Documentation for the Guile-Log Logic Programming Environment for Guile 2.0 v0.1
@end ifnottex
* umatch:: low level infrastructure for unify variables and stack management
* guile-log:: This is the guile-log basic macro environment
* Index:: Complete index.
* postpone:: To postpone a search.
* Index:: Complete index.
@end menu
......@@ -555,7 +556,21 @@ G.L. (if S X Y)
@code{(log-code-macro x)}, marks x as a log-code macro e.g. it will inline it's code into the continuation in an and sequence hence reduce the number of needed closures.
@code{(log-code-macro? x)}, check to see if @code{x} is a macro.
@node postpone
@chapter postpone, a framework for postponing evaluations.
This code is available from @code{(logic guile-log postpone)} You may have noticed that guile log is a framework to do tree searches to meet a certain criteria and during the path in the tree create datastructures that are able to undo and also redo it's state. Most people when approaching this will sooner or later be bitten by the NP hardness of many interesting problems. The solution might then be to try intelligent guesses in which branch the gold is hiding. What one would like to do is try a set of branches, freeze the different states and at that point create some sort of index that represent the liklihood of the gold lying buried beneath. Then an overall global decition can be taken and only the most promissing paths will be further examined. It is for this use case the following system is constructed.
@chapter Api.
@findex postpone
@findex postpone-frame
G.L. (postpone val power)
G.L. (postpone-frame limit fact maxsize)
@end verbatim
To be able to postpone we must have a baseline from which we will base our restarts e.g. @code{postpone-frame}. The @code{postpone} command will basically evaluate @code{val} and see if it's larger then a certain limit that is governed by an intial value @code{limit} and @code{fact} - a factor that adds to the limit each postpone turn. The @code{power} is used to manage a list of possible restarts for and this list is sorted so that we at restarts will try to use @code{maxsize} first elements of the list. The list is never larger then @code{10 * maxsize}.
@node Index
@unnumbered Index
cd doc
makeinfo --html guile-log.texi
cd ..
cd logic/guile-log/src/
cd ../../../
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment