unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Logic programming with prompts
@ 2013-03-24 13:20 Stefan Israelsson Tampe
  0 siblings, 0 replies; only message in thread
From: Stefan Israelsson Tampe @ 2013-03-24 13:20 UTC (permalink / raw)
  To: guile-devel

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




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

only message in thread, other threads:[~2013-03-24 13:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-24 13:20 Logic programming with prompts 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).