sparc icon indicating copy to clipboard operation
sparc copied to clipboard

Use of variables in display section

Open zhangyuanlin opened this issue 7 years ago • 0 comments

Given program

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Template for a SPARC file
%% Author:
%% Description:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
sorts
    #people = {f(a,sara), f(b, sara), f(a, bob)}.
predicates
    father(#people, #people).
rules
    father(f(a,bob), f(a,sara)).
    father(f(a, bob), f(b, sara)).
    
display
father(X, f(Z, sara)).

We have complaint for the statement in the display section:

SPARC V2.54
temp.sp: non-ground term "f(Z,sara)" occuring in program as 2 argument of predicate father/2 
is not a program term

zhangyuanlin avatar Sep 24 '18 04:09 zhangyuanlin