Hi Doug,
We have golog in pilog. Er, I think :-) If not we're pretty dang close.
Cool! :)
With miniPicoLisp at 100 to 150k (depending on platform, build
options, etc.) and with pilog + golog loaded, it has to be the smallest
footprint golog (with a respectable prolog and lisp under the
Hi Doug,
the following works:
(be a (3))
(be foo @C
(2 - @C) )
: (? (foo (a @Z)))
@Z=3
- NIL
I spied what 'call/1' is doing ;-) That number magic with '2' is a bit
tricky, I'm never sure what level to pick. Basically it tells the
interpreter with which
.
Cheers,
Doug
--- On Thu, 6/30/11, Alexander Burger a...@software-lab.de wrote:
From: Alexander Burger a...@software-lab.de
Subject: Re: pilog: unification in variables that are clauses
To: picolisp@software-lab.de
Date: Thursday, June 30, 2011, 11:55 PM
Hi Doug,
the following
Hi Doug,
So this should be written as
(be holds (@A @S)
(or
((restoreSitArg @A @S @F) (@ solve (list (- @F
((not (restoreSitArg @A @S @F)) (isAtom @A) (@ solve (list (- @A ) )
I didn't test it, but I think the construct using 'solve' is more
complicated than necessary.
At
On Thu, Jun 30, 2011 at 09:20:43AM +0200, Alexander Burger wrote:
At least, a simple (@ . @A) should work. Doesn't it?
Wait ... probably not a good idea.
But this should work: (@ - @A)
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
in @F (which is bound to a clause)
: (solve '((holds (On @N) s0)))
- (T)
Solves, but it also should tell me @N is bound to 3
Cheers,
Doug
--- On Thu, 6/30/11, Alexander Burger a...@software-lab.de wrote:
From: Alexander Burger a...@software-lab.de
Subject: Re: pilog: unification
Hi Doug,
(be holds (@A @S)
(or
((restoreSitArg @A @S @F) (@ - @F))
((not (restoreSitArg @A @S @F)) (isAtom @A) (@ - @A)) ) )
gives me the same results as using the (@ solve (list (- @F)))
clause. Neither that nor (@ - @F) seem to unify variables in @F (which
is bound to a
Here's the issue boiled down to a simpler test case :-) First, swi-prolog:
# cat t.pl
a(3).
foo(N) :- N.
bar(a(X)) :- a(X).
# swipl -f t.pl
% /root/prolog/t.pl compiled 0.00 sec, 2,800 bytes ...
?- trace.
true.
[trace] ?- bar(a(Z)).
Call: (6) bar(a(_G386)) ? creep
Call: (7)
The solve way seems to some closest to doing it.
~/lisp/miniPicoLisp
$ cat t.l
(be a (3))
(be foo (@C)
# (@C - @C)
# (call @C)
(@ print (solve (list (- @C
)
$ ./pil t.l
: (? a foo (foo (a @Z)))
1 (foo (a @Z))
(((@Z . 3)))- T
So I can see that it is correctly solving for @Z this