Consider these five pilog assertions.
(be do ((Question @P) @S @S) (holds @P @S))
(be holds (@A @S)
(restoreSitArg @A @S @F)
(2 cons (- @F)))
(be On (3 s0))
(be On (5 s0))
(be restoreSitArg ((On @N) @S (On @N @S)))
I define some tests.
(de t_1 () # ok
(? holds On restoreSitArg (holds
Hi Doug,
(be do ((Question @P) @S @S) (holds @P @S))
(be holds (@A @S)
(restoreSitArg @A @S @F)
(2 cons (- @F)))
Maybe this mechanism of explicitly specifying a number for the outer
environment for unifying a clause is an an unfortunate limitation of
Pilog. I don't know a better way,
Hi Kazimir,
this question sounds rather strange to me. You could also ask Why do
you construct new cells? or Why does your program generate numbers?
I'm trying to write review of the reasons for use of the generated
symbols in Lisp dialects. I'm interested in experiences of Picolisp
http://stackoverflow.com/questions/6571200/pilog-assertion
On Mon, Jul 04, 2011 at 12:26:46AM -0700, Doug Snead wrote:
Consider these five pilog assertions.
(be do ((Question @P) @S @S) (holds @P @S))
(be holds (@A @S)
(restoreSitArg @A @S @F)
(2 cons (- @F)))
(be On (3 s0))
Thanx Alex.
this question sounds rather strange to me. You could also ask Why do
you construct new cells? or Why does your program generate numbers?
Your answer demonstrates how Lisp dialects have grown in different
directions. For instance, in two currently most popular Common Lisp
books
Hi Kazimir,
Your answer demonstrates how Lisp dialects have grown in different
directions. For instance, in two currently most popular Common Lisp
books Practical Common Lisp and Land of Lisp, function
make-symbol is not mentioned at all.
OK, I see. Right.
Could you demonstrate technique
Thanks Alex!
I ended up taking it up to (5 cons (- @F)) to get the first simple elevator
example working. Still a bit wonky in that respect. (Might have to adjust that
magic unification level number per application!)
But this definitely shows golog pilog is possible.
Here's a page where
Hmmm, what's the best answer for stackoverflow?
(2 cons (- @F)))
Tune the magic number to allow the correct unification bindings to reach up
into rules which are calling this one, as far as needed, in a given
application. The value of 2 here works for one test, but use 3 to make the