unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Version 0.5.3 guile-log
@ 2014-11-12 19:57 Stefan Israelsson Tampe
  0 siblings, 0 replies; only message in thread
From: Stefan Israelsson Tampe @ 2014-11-12 19:57 UTC (permalink / raw
  To: guile-devel, guile-user@gnu.org

[-- Attachment #1: Type: text/plain, Size: 2337 bytes --]

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!

[-- Attachment #2: Type: text/html, Size: 3219 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-12 19:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-12 19:57 Version 0.5.3 guile-log Stefan Israelsson Tampe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).