Alexander Burger wrote:
Hi Cle,

Hi Alex,

although not intended so, it seems I mutate the picoLisp mailing list
into a Pilog mailing list ;-)

Which is a good thing. This way we produce at last some Pilog
documentation ;-)

nice you see it that way :-)

    (be attributes ((@H) @L @V) T (member (@H @V) @L) )
    (be attributes ((@H . @) @L @V) (member (@H @V) @L) )
    (be attributes ((@ . @T) @L @V) T (attributes @T @L @V) )
...
    (? (attributes (b c) ((a 1) (b 2) (c 3)) @V))
...
good! But if I comment out the first rule, the Pilog interpreter gets
into an endless loop, I have to terminate explicitely.

Hmm, I cannot reproduce that. It works both with and without the first
rule.

Stupid me! Now I also cannot reproduce it! That is more than strange ... or perhaps ... perhaps I did execute it with the ./p script and did not hit the extra Enter afterwards? I have no another explanation, why it does work now ... sorry for the noise I made ... :-(

BTW, let me explain a debugging aid in Pilog: You can trace the matching
process for individual rules (similar to (trace 'fun) in Lisp) if you
write the names of the rules you like to trace between the '?' and the
first expression:

    : (? attributes (attributes (b c) ((a 1) (b 2) (c 3)) @V))
    1 (attributes (b c) ((a 1) (b 2) (c 3)) @V)
     @V=2
    2 (attributes (b c) ((a 1) (b 2) (c 3)) @V)
    1 (attributes (c) ((a 1) (b 2) (c 3)) @V)
     @V=3
    2 (attributes (c) ((a 1) (b 2) (c 3)) @V)
    ->  NIL
    :

The numbers preceding the trace output indicate which one of the
'attributes' rule matched.

That is *really* nice! This will be very helpful in my future investigations. Thank you! :-)

Cheers,
- Alex

Ciao,
Cle.


--------------040801020606010302090602
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 <meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
<br>
<br>
Alexander Burger wrote:
<blockquote cite="mid:20091125072012.gc16...@software-lab.de"
type="cite">
 <pre wrap="">Hi Cle,
 </pre>
</blockquote>
<br>
Hi Alex,<br>
<br>
<blockquote cite="mid:20091125072012.gc16...@software-lab.de"
type="cite">
 <blockquote type="cite">
<pre wrap="">although not intended so, it seems I mutate the picoLisp mailing list into a Pilog mailing list ;-)
   </pre>
 </blockquote>
 <pre wrap=""><!---->
Which is a good thing. This way we produce at last some Pilog
documentation ;-)
 </pre>
</blockquote>
<br>
nice you see it that way :-)<br>
<br>
<blockquote cite="mid:20091125072012.gc16...@software-lab.de"
type="cite">
 <blockquote type="cite">
   <pre wrap="">   (be attributes ((@H) @L @V) T (member (@H @V) @L) )
  (be attributes ((@H . @) @L @V) (member (@H @V) @L) )
  (be attributes ((@ . @T) @L @V) T (attributes @T @L @V) )
..
  (? (attributes (b c) ((a 1) (b 2) (c 3)) @V))
..
good! But if I comment out the first rule, the Pilog interpreter gets into an endless loop, I have to terminate explicitely.
   </pre>
 </blockquote>
 <pre wrap=""><!---->
Hmm, I cannot reproduce that. It works both with and without the first
rule.
 </pre>
</blockquote>
<br>
Stupid me! Now I also cannot reproduce it! That is more than strange
.. or perhaps ... perhaps I did execute it with the ./p script and did
not hit the extra Enter afterwards? I have no another explanation, why
it does work now ... sorry for the noise I made ... :-(<br>
<br>
<blockquote cite="mid:20091125072012.gc16...@software-lab.de"
type="cite">
 <pre wrap="">BTW, let me explain a debugging aid in Pilog: You can trace the 
matching
process for individual rules (similar to (trace 'fun) in Lisp) if you
write the names of the rules you like to trace between the '?' and the
first expression:

  : (? attributes (attributes (b c) ((a 1) (b 2) (c 3)) @V))
  1 (attributes (b c) ((a 1) (b 2) (c 3)) @V)
@V=2 2 (attributes (b c) ((a 1) (b 2) (c 3)) @V)
  1 (attributes (c) ((a 1) (b 2) (c 3)) @V)
   @V=3
  2 (attributes (c) ((a 1) (b 2) (c 3)) @V)
  -&gt; NIL
:
The numbers preceding the trace output indicate which one of the
'attributes' rule matched.
 </pre>
</blockquote>
<br>
That is *really* nice! This will be very helpful in my future
investigations. Thank you! :-)<br>
<br>
<blockquote cite="mid:20091125072012.gc16...@software-lab.de"
type="cite">
 <pre wrap="">Cheers,
- Alex
 </pre>
</blockquote>
<br>
Ciao,<br>
Cle.<br>
<br>
</body>
</html>

--------------040801020606010302090602--
--
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to