Question

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)).
Was it helpful?

Solution

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.

OTHER TIPS

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(<)).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top