% This examples demonstrate partial/scoped reasoning
% The meta predicate "partial(goal,oid)"
% can be used to constrain the knowledge base to
% the module(s) (set of clauses) with the oid and
% hence enable partial/scoped reasoning with the goal


:-eval(consult('ContractLog/list.prova')).	% load the module with oid 'ContractLog/list.prova'
:-eval(consult('ContractLog/math.prova')).	% load the module with oid 'ContractLog/math.prova'

% appyl append goal on partial modul "ContractLog/list.prova", i.e.
% on the clauses defined in list.prova
p(Out):-partial(append([],[xxx],Out),"ContractLog/list.prova").
:-solve(p(Out)).

% derive
:-solve(partial(append([],[xxx],Out),"ContractLog/list.prova")).

% fails because the append clause (rule) is not defined in math.prova
:-solve(partial(append([],[xxx],Out),"ContractLog/math.prova")).