guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Version 0.5.3 guile-log


From: Stefan Israelsson Tampe
Subject: Version 0.5.3 guile-log
Date: Wed, 12 Nov 2014 20:57:10 +0100

Hi all, I managed to restore guile-log from bitrotten the previous support of iso-prolog and assoc like variable bindings, while introducing new features.

There is now a couple of new features added.
1. coroutines and attributed variables, that enables hooks can controls the unification, see swi-prolog docs in e.g. http://www.swi-prolog.org/pldoc/man?section=extvar

2. It's possible to handle self referential datastructures e.g. X=[1,X] and behave well.

3. Together with 2, tablating is now suppported in guile-log which is memoisation on steroids, check out this.

A nice example is this recursive definition:
----------------------------------------
(compile-prolog-string
"
-functorize(tabling).
ff(X) :- (X=[Y,A,B]),ff(A),ff(B),(Y=1;Y=2).
")
-----------------------------------------

Then we can run this as (note the recursive representation), 

scheme@(guile-user)> ,L prolog
Happy hacking with Prolog!  To switch back, type `,L scheme'.
prolog@(guile-user)> .rec ff(X).

   X = {0}[1, ref[0], ref[0]]

more (y/n/a/s) > s
prolog@(guile-user)> .10 .c

   X = {0}[2, ref[0], ref[0]]
   X = {0}[1, ref[0], {1}[1, ref[1], ref[1]]]
   X = {0}[2, ref[0], {1}[1, ref[1], ref[1]]]
   X = {0}[1, ref[0], {1}[2, ref[1], ref[1]]]
   X = {0}[2, ref[0], {1}[2, ref[1], ref[1]]]
   X = [1, {0}[1, ref[0], ref[0]], {1}[1, ref[1], ref[1]]]
   X = [2, {0}[1, ref[0], ref[0]], {1}[1, ref[1], ref[1]]]
   X = [1, {0}[1, ref[0], ref[0]], {1}[2, ref[1], ref[1]]]
   X = [2, {0}[1, ref[0], ref[0]], {1}[2, ref[1], ref[1]]]
   X = [1, {0}[1, ref[0], ref[0]], {1}[1, ref[1], {2}[1, ref[2], ref[2]]]]
$1 = stalled

Anywau here is the news,

Version 0.5,
* Improved parsing tool
  - Factorized and enabled for customized streams flow e.g.
    current indentation level in python
  - f-cons and similar tools for functional AST creation.
* Debug features
* Tabling or memoisation, experimental.
* rational datastructures, experimental.
* scheme Keyword objects and logic values.
* GC of prolog variables
* Attributed variables / only one success all forms/ experimental
* corouttines / experimental.
* tracing
* Better compilation error handling
* Support for namespaced operators in prolog (TODO)
* Support for X[a] and X{A} (TODO)
* Operators are now namespaced correctly.
* fast math and guile featured operators for numerics added.

Happy Hacking!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]