The pilog trace can be helpful in these situations.

: (be bigger (me her))
: (be bigger (her son))
: (be bigger (son daughter))
: (be bigger (@x @y) (bigger @x @z) (bigger @z @y))

List the assertions you want to trace before the clause to be proved, in this 
case "bigger" :

: (? bigger (bigger @x meily))

4 (bigger @x meily)
1 (bigger me her)
4 (bigger her meily)
2 (bigger her son)
4 (bigger son meily)
3 (bigger son daughter)
4 (bigger daughter meily)
4 (bigger daughter @y)
4 (bigger daughter @y)
4 (bigger daughter @y)
4 (bigger daughter @y)
4 (bigger daughter @y)
4 (bigger daughter @y)
4 (bigger daughter @y)
4 (bigger daughter @y)
4 (bigger daughter @y)
4 (bigger daughter @y)
4 (bigger daughter @y)
4 (bigger daughter @y)
4 (bigger daughter @y)
4 (bigger daughter @y)
...


So, it is infinitely recurring when trying to prove (bigger daughter @y).

The numbers in front of the pilog trace output lines correspond to the rule 
being proved at that stage. 

Hope that helps!

Cheers,

Doug




--- On Sun, 7/8/12, Christophe Gragnic <christophegrag...@gmail.com> wrote:

> From: Christophe Gragnic <christophegrag...@gmail.com>
> Subject: pilog in ersatz
> To: picolisp@software-lab.de
> Date: Sunday, July 8, 2012, 11:36 AM
> Hi all, I'm currently investigating
> Picolisp to teach prefix notation,
> and Pilog to teach first order logic.
> 
> I have a problem with a set of instructions in ersatz:
> 
> : (be bigger (me her))
> -> bigger
> : (be bigger (her son))
> -> bigger
> : (be bigger (son daughter))
> -> bigger
> : (be bigger (@x @y) (bigger @x @z) (bigger @z @y))
> -> bigger
> : bigger
> -> NIL
> : (? (bigger @x meily))
>  @x=alix
>  @x=sw
> 
> Then ersatz freezes, no prompt.
> Any idea?
> 
> 
> chri
> 
> -- 
> Envoyé de ma messagerie électronique.
> Merci de divulguer cette adresse mail au minimum (pour les
> envois en
> groupe, utilisez la copie invisible).
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to