
Weird poplog-Prolog behaviour..
[To reply replace "Aaron.Sloman.XX" with "A.Sloman"]
The following query did not reach the Birmingham news server for some
reason, though I noticed it on google groups.
Quote:
> Date: Thu, 25 Apr 2002 20:38:03 +0000 (UTC)
> Hi.
> I have encountered some intresting behaviour of
> poplog-Prolog, while (trying to) port over a
> Sicstus system.
> An example is probally best. Start a normal poplog-prolog
> session.
> $prolog
> And add some facts..
> ?- [user].
> | dummy(x-2).
> | dummy(x-1).
> | dummy(x-(0)).
> | dummy(0-x).
> | dummy(x-0).
> ;;; PROLOG SYNTAX ERROR - OPERATOR, ',', OR ')' EXPECTED
> ;;; FOUND : 0
> ;;; READING: o ( x <<HERE>> 0
> It seems that somthing-0 has a special significance?
> Am i missing somthing obvious here?
> Yours,
> Bill J Ellis
I have managed to duplicate this error. I have no explanation
for it.
dummy(x+0).
causes no problem. Also
silly(-0).
is fine.
dummy(x-0.33).
is OK. but
dummy(x-0.0).
produces
;;; PROLOG SYNTAX ERROR - OPERATOR, ',', OR ')' EXPECTED
;;; FOUND : 0.0
;;; READING: dum ( x <<HERE>> 0.0
;;; FILE : /home/axs/fetched/fpfp.pl LINE NUMBER: 7
;;; [execution aborted]
whereas
dummy(x - 0).
dummy(x - 0.0).
are fine. It looks as if the prolog itemiser is treating "-0" and "-0.0"
as if they used unary minus, but not "-1".
Why?
Aaron
Does anyone understand why this happens, before I start investigating
the source code for Poplog prolog?
Aaron
====
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/ (And free book on Philosophy of AI)
FREE TOOLS: http://www.cs.bham.ac.uk/research/poplog/freepoplog.html