Thanks Alex!    The more I look at it, the more I like pilog for golog because 
golog uses prolog-ish backtracking so heavily.  When I look at this attempt to 
make a lua golog for example 
http://drops.dagstuhl.de/opus/volltexte/2010/2631/pdf/10081.Ferrein.2631.pdf , 
I think a picolisp/pilog -based golog might be a better approach than using lua 
for this, at least.  (And by translating the swi prolog golog into pilog, I 
seem to be able to understand golog programs better, at least.)  

Cheers,

Doug




--- On Sun, 6/26/11, Alexander Burger <a...@software-lab.de> wrote:

> From: Alexander Burger <a...@software-lab.de>
> Subject: Re: tracing pilog
> To: picolisp@software-lab.de
> Date: Sunday, June 26, 2011, 12:31 AM
> Hi Doug,
> 
> > What's the best way to trace pilog?
> 
> Pilog clauses can indeed be traced.
> 
> Unfortunately, I don't find a good description at the
> moment. The
> reference of '?' (and of 'prove' which is the internal
> machinery of the
> query front end '?') just briefly mentions it:
> 
>    http://software-lab.de/doc/ref_.html#?
>    http://software-lab.de/doc/refP.html#prove
> 
> It works by simply passing the names of the clauses you
> want to trace
> right after the '?' (i.e. the ['sym' ..] arguments).
> 
> 
> A simple example, using the 'append' clause:
> 
> Without tracing
> 
>    : (? (append (a b c) @X (a b c d e f)))
>     @X=(d e f)
>    -> NIL
> 
> 
> With tracing
> 
>    : (? append (append (a b c) @X (a b c d e
> f)))
>    2 (append (a b c) @Y (a b c d e f))
>    2 (append (b c) @Y (b c d e f))
>    2 (append (c) @Y (c d e f))
>    1 (append NIL (d e f) (d e f))
>     @X=(d e f)
> 
> The trace output lists all clauses that _matched_, and
> always starts
> with a number indicating _which_ of the clauses in the
> definition
> matched.
> 
> The definition of 'append' is
> 
>    : (rules 'append)
>    1 (be append (NIL @X @X))
>    2 (be append ((@A . @X) @Y (@A . @Z))
> (append @X @Y @Z))
>    -> append
> 
> 
> The symbolic arguments to '?' can of course also specify
> clauses
> somewhere deeply nested in the Pilog definitions, not just
> those passed
> to '?' on the top level.
> 
> Cheers,
> - Alex
> -- 
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to