0

I'm trying an example from XSB Version 3.3.5 manual (from "Partial Order Answer Subsumption"):

:- table sp(_,_,po(</2)).
sp(X,Y,1):- edge(X,Y).
sp(X,Z,N):- sp(X,Y,N1),edge(Y,Z),N is N1 + 1.

And I'm getting

++Error[XSB/Runtime/P]: [Syntax] :- table sp ( _ , _ , po ( >/  <--- HERE? ************ 
++                                                    2 ) ) 

Any ideas what's wrong?

Also, there is no error with

:- table sp(_,_,lattice(min/3)).
false
  • 10,264
  • 13
  • 101
  • 209
Sergii Dymchenko
  • 6,890
  • 1
  • 21
  • 46

2 Answers2

2

I would try this (since it's a syntax error)

:- table sp(_,_,po('<'/2)).
sp(X,Y,1):- edge(X,Y).
sp(X,Z,N):- sp(X,Y,N1),edge(Y,Z),N is N1 + 1.
Thanos Tintinidis
  • 5,828
  • 1
  • 20
  • 31
0

It's strange that the operator 'reversed' in the error message (or the error message loose 1 character?). The table directive could generate the error 'inside' (directives are library predicate calls) or the error could be generated before, consulting.

Could be a syntax error due to change in operator declaration (i.e. some declaration like op(N,xfx,<) or op(M,xfy,/) changed N regards M), or the sample could be misaligned on current table/3 specification.

I'd try (similar to what thanosQR suggest), the simplest thing, changing the directive and removing the (redundant?) arity indication:

:- table sp(_,_,po(<)).
CapelliC
  • 59,646
  • 5
  • 47
  • 90