Ah, the situation is not so bad IMO. To begin with, this is an obscure thing
to do, I think - maybe somewhat pedantic. It forces golog to be prolog, in a
sense. And there are workarounds which you provided. And I think you're right:
it should be possible to restructure the involved golog.l rules to do this
Maybe another rule or a lisp function can be written, which gets the bindings
instantiated and copied out to another, less partially unified, expression.
Or maybe a way to make that pilog magic number to bind at the desired level,
*and all levels above that also*, perhaps if a negative magic numbers appears
there. (But I wouldn't touch doProve, if it slows it down!)
In any event, the golog.l source and simple test program are now in the public
domain and so hopefully better pilog programmers than I are able to smooth that
I think translating golog into pilog has been a great review of prolog and
pilog and golog for me personally - hopefully useful for others on the list and
I'm guessing picolisp/pilog for embedded systems will get more popular over
time, as people see the advantages :-)
Thanks for all the help!
--- On Mon, 7/4/11, Alexander Burger <a...@software-lab.de> wrote:
> From: Alexander Burger <a...@software-lab.de>
> Subject: Re: pilog question
> To: firstname.lastname@example.org
> Date: Monday, July 4, 2011, 10:55 PM
> Hi Doug,
> > 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 other test work."
> Hmm, unsatisfactory ... :(
> I'm not very happy with the situation. It is a design flaw
> in Pilog.
> A cleaner solution would be to restructure the involved
> rules in such a
> way that the bindings are propagated up the "normal" way
> through the
> call hierarchy (and not from a deeply nested level directly
> to the top).
> I'm not sure how to do it in the case of golog, though.
> - Alex
> UNSUBSCRIBE: mailto:email@example.com?subject=Unsubscribe