README 2.99 KB
Newer Older
Stefan Israelsson Tampe committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
			        __GUILE_LOG__
What it is:
Guile log is a logic programming framework that has strong continuation 
support meaning that stalling of algorithm is well supported. It also 
sports most of the logic programming features you see in common prolog 
softwares like swi-prolog and guile-log comes with a prolog engine as well as 
a minikanren engine as well as an internal scheme interface to logic 
programming which is the guile-log interface.

What It can do:
It can do whatever a iso-prolog or swi-prolog can do and contains most prolog
constructs from them. If you want to program guile and perhaps guile-emacs in 
prolog this is the main source to go to.

It is good design to base a proof solver on due to the fact that it can save 
the state of the program and return to the base interpreter and you can control
your environment as any scheme or prolog environment without making a special
interpreter.

To generate cases for e.g. optimisation or constraint satisfaction. The power 
of guile-log comes from the seamless intergration of continuations. You can 
postpone a calculation and evaluate all postponed calculations for making a 
set of prommissing continuations and take those one step further. It really is 
a great tool for all kinds of local searches.

And much much more.

28 29
Prerequisits

30
A 64 bit system
Stefan Israelsson Tampe committed
31 32
This is a draft for guile-2.0.6 and later and works for linux.

33
You need to have guile-syntax-parse installed into the system
Stefan Israelsson Tampe committed
34 35 36 37 38 39 40 41 42 43
    http://gitorious.org/guile-syntax-parse/guile-syntax-parse

For fibers you need to have wingo's fibers library
    https://github.com/wingo/fibers/wiki/Manual

For correct garbage collection , engines and fibers you need
    https://gitlab.com/bdw-gc-logical-mod/bdw-gc-logical-mod

If you want to hack the prolog VM (it is written in compiled scheme) you need
   https://gitlab.com/clambda/clambda
44

45
You need autotools, texinfo, gcc, make, guile >= 2.0
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
Either do a system install:
============
autoreconfig
configure
make
make install

Or do a local install by:
============
autoreconfig
configure
make
add the repo directory to guile's load path

------------------------------------------------
Stefan Israelsson Tampe committed
61 62 63 64
Now you are ready to use it from guile through,

> (use-modules (logic guile-log))

65 66 67 68
Or using the kanren interface

> (use-modules (logic guile-log kanren))

69 70 71 72 73 74 75
Or iso-prolog,

> (use-modules (logic guile-log iso-prolog))

For documentation, 
info guile-log at a system install.

76 77 78
For an Interactive prolog shell use
,L prolog

Stefan Israelsson Tampe committed
79 80
Else in doc/guile-log the documentation in html is available or at
     http://c-lambda.se/guile-log/
Stefan Israelsson Tampe committed
81

Stefan Israelsson Tampe committed
82 83
Also check out the blocg at
     http://c-lambda.se/
Stefan Israelsson Tampe committed
84

Stefan Israelsson Tampe committed
85
There are a lot of material not included in the docs there
Stefan Israelsson Tampe committed
86

Stefan Israelsson Tampe committed
87
To enable proper gc and engine support se the installatoin instructions in the manual. That is difficult though, you need to compile the repository refferenced above and make sure that guile is using it. I ended up replacing the original so library with the new one (saving the old one in case there is bugs) Use this only if you know what you are doing.
Stefan Israelsson Tampe committed
88

Stefan Israelsson Tampe committed
89
Have fun!