From: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
To: guile-devel@gnu.org
Subject: Logic programming with prompts
Date: Sun, 24 Mar 2013 14:20:04 +0100 [thread overview]
Message-ID: <2117338.vrdFpiuacV@warperdoze> (raw)
Dear friends,
I think that the current state of guile is in a sad state for logic
programming with prompts in guile. I really think that we should fix
the most pressing issues or stop touting prompts as a way to implement
logic programming and direct to kanren or guile-log instead.
Issues.
1. with a prompt based solution fluids is the natural choice to
implement backtracking logical variables. But the current fluid
implementation is fundamentally broken with respect to undo and
redo semantics and will haunt any project that want to have
interactive logic reasoning implemented. It's possible to fix it
in pure guile with a horrible complex solution and will lead to
laughable performance.
2. with-fluids is not tail recursive. It is quite possible that
project will fail due to burnout of the stack in current guile
because of this. One probably cannot get kanrens great support
for tail call's implemented but at-least reduce the total memory
consumption quite significantly.
3. Speed, Logic programming in pure guile is currently 100x slower then
than with e.g. gprolog. It can be imporved to 20x by using a C-based
backend. It's possible to get down to 4x (with prompts) if we could
have a fast C-call mechansim or support in the VM.
4. This is a less important issue. But in order to implement all
logic constructs found in kanren with prompts you will need to
be able to use a special-variables construct that i'm touting
which is needed if one want to be able to undo and redo things.
Regards
Stefan
reply other threads:[~2013-03-24 13:20 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=2117338.vrdFpiuacV@warperdoze \
--to=stefan.itampe@gmail.com \
--cc=guile-devel@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).