On Fri, Dec 13, 2013 at 10:34 AM, Robert Dodier <robert.dodier at gmail.com>wrote:
I am a big fan of declarative programming -- I have sometimes
> entertained the idea that Maxima could implement something like Prolog
> or a subset of it. The syntax need not be the same, but maybe some of
> the same functionality could be useful and interesting.
>
Overnight I've remembered where to find some references. leanTAP is the
name of a remarkable first-order-logic theorem prover that requires only 6
(not 4) Prolog rules. The entire implementation fits in the abstract of
the paper describing it.
http://formal.iti.kit.edu/~beckert/pub/LeanTAP.pdf
The Prolog system developed in Peter Norvig's Principles of AI Programming
is essentially portable Common Lisp and the source is freely usable without
constraints. I would expect few problems inserting it into Maxima if there
were good reason. (Allegro Prolog, which I authored, is derived from
Norvig's, but has been heavily optimized around Allegro CL.) leanTAP is
written in standard Edinburgh notation, but that is easily translatable
into the sexpr notation used by most Lisp Prolog implementations.