interpreter finnished

parent 764f62b2
......@@ -1701,7 +1701,6 @@ Guile log also sports an iso-prolog interface as a logic programming interface b
* prolog-dynamic-functions:: A discussion of guile log's version of this
* dynamic-features:: Special construct to manage dynamic objects
* prolog-libraries:: Libraries that exposes guile-log features
* internals:: A short discussion of the prolog internals used.
@end menu
@node running
......@@ -1861,16 +1860,24 @@ All such commands has to be the first commands in the input. But there are a set
@verbatim
prolog@(guile-user)> .h
HELP FOR PROLOG COMMANDS
(.n ) try to find n solutions
(.all | .* ) try to find all solutions
(.once | .1 ) try to find one solution
(.mute | .m ) no value output is written.
(.save | .s ) <ref> associate current state with ref
(.load | .l ) <ref> restore associate state with ref
(.cont | .c ) continue the execution from last stall point
(.lold | .lo) load the state from the execution of the last stall command
HELP FOR PROLOG COMMANDS
---------------------------------------------------------------------
(.n ) try to find n solutions
(.all | .* ) try to find all solutions
(.once | .1 ) try to find one solution
(.mute | .m ) no value output is written.
---------------------------------------------------------------------
(.save | .s ) <ref> associate current state with ref
(.load | .l ) <ref> restore associate state with ref
(.cont | .c ) continue the execution from last stall point
(.lold | .lo) restore the last state at a stall
---------------------------------------------------------------------
(.ref ) <ref> get value of reference user variable ref
(.set ) <ref> <val> set user variable ref to value val
---------------------------------------------------------------------
(.clear ) clear the prolog stack and state
---------------------------------------------------------------------
prolog@(guile-user)>
@end verbatim
......@@ -1883,6 +1890,10 @@ prolog@(guile-user)> ,time .1 .m f(X,Y).
prolog@(guile-user)>
@end verbatim
There is an api that can be used with convinience goals to be used in code to talk with the interactive shell, to use them do
@code{scheme (use-modules (logic guile-log guile-prolog interpreter))}
@subsection state
It is possible to store a state interactively and later retrieve the state through a mechansim that brings back control to the interpreter. You do that with
......@@ -1890,7 +1901,12 @@ It is possible to store a state interactively and later retrieve the state throu
in the shell you can store the state, retrieve a state and continue the execution from the actual state. Then by using global variables or user variables (preserved when storing the state) it is possible to create very nice interactive conversations for e.g. proof solvers and such. Also by using the dynamic feature framework one can contoll very fine grained how the state should be stored and restored.
@subsection user variables.
It is possible to use a special global variable in code and in the interactive prolog shell. They differ from global variables in that they are stored and restored relative the state. To use normal global variables just use the scheme globals and the @code{scm[...]} idiom to get the value. Ther is an accompanion
@code{prolog user_ref(name,Var)} To ref a user variable called @code{name} int @code{Var}.
@code{prolog user_set(name,val)} To set a user variable @code{name} to @code{val}
@node deviations
......@@ -2249,16 +2265,7 @@ The main hash datastructure is a vhash datastructure which is a assoc like hash
@node prolog postpone
@subsection Postpone.
@node internals
@section Prolog internals
The basic documentation is tha same as the postpone section for guile-log in the main section. The only addition is that this module exposes @code{postpone_frame} with an underscore.
@node Index
@chapter Index of the guile-log api
......
......@@ -218,16 +218,15 @@ HELP FOR PROLOG COMMANDS
(.once | .1 ) try to find one solution
(.mute | .m ) no value output is written.
---------------------------------------------------------------------
(.save | .s ) <ref> associate current state with ref
(.load | .l ) <ref> restore associate state with ref
(.save | .s ) <ref> associate current state with name ref
(.load | .l ) <ref> restore associate state with name ref
(.cont | .c ) continue the execution from last stall point
(.lold | .lo) restore the last state at a stall
(.clear ) clear the prolog stack and state
---------------------------------------------------------------------
(.ref ) <ref> get value of reference user variable ref
(.set ) <ref> <val> set user variable ref to value val
---------------------------------------------------------------------
(.clear ) clear the prolog stack and state
---------------------------------------------------------------------
")
'(if #f #f))
......
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