% This examples demonstrate the use of integrity constraints
% ContractLog defines four types of constraints
% and | or | xor (mutual exclusive) | not

:-eval(consult('ContractLog/list.prova')).	
:-eval(consult('ContractLog/utils.prova')).
:-eval(consult('ContractLog/integrity.prova')).



%neg(p1(x)).
p2(x).
%p1(x).
%p1(a).

integrity(xor(p1(a),z(),p1(x),neg(p1(_)))).



%integrity(not(p1(x),p1(a))).
integrity(and(p1(x),p2(x))).
%integrity(or(p1(x),p2(x))).


:-solve(testIntegrity(p1(x))).
:-solve(testIntegrity()).

