Weird poplog-Prolog behaviour.. 
Author Message
 Weird poplog-Prolog behaviour..

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



Tue, 12 Oct 2004 04:38:03 GMT  
 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



Sat, 13 Nov 2004 10:10:52 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. weird relational operator behaviour

2. Weird Reltree behaviour using c4b ABC

3. Weird behaviour in Relation Manager Delete(0)

4. Event:MouseIn weird behaviour.

5. Weird behaviour of _MENUSYS in 5.3b

6. Weird DOS shell behaviour in NT 4.0

7. weird behaviour with floor and length

8. weird backspace behaviour in X-app running Solaris 2.6

9. Weird Array.flatten behaviour with DBI

10. Weird string behaviour, I'm stuck.

11. Weird int 10h behaviour

12. Weird int 10h behaviour

 

 
Powered by phpBB® Forum Software