From: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
To: guile-devel <guile-devel@gnu.org>,
"guile-user@gnu.org" <guile-user@gnu.org>
Subject: Version 0.5.3 guile-log
Date: Wed, 12 Nov 2014 20:57:10 +0100 [thread overview]
Message-ID: <CAGua6m0P7b4mYWtSgTP1RNhagiGok6uFBibNkv2SSkn50FKK_Q@mail.gmail.com> (raw)
[-- 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 --]
reply other threads:[~2014-11-12 19:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGua6m0P7b4mYWtSgTP1RNhagiGok6uFBibNkv2SSkn50FKK_Q@mail.gmail.com \
--to=stefan.itampe@gmail.com \
--cc=guile-devel@gnu.org \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).