%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% mod.lp
%%
%% (C) Thomas Linsbichler, Jörg Pührer, Hannes Strass, 2015
%%
%% Deciding realisability of sets of three-valued interpretations
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% two-valued model semantics
% only sets of two-valued interpretations are realisable in principle
:- in(I), not int2(I).
inV(I) :- in(I).
% propagation
% members
ac(S, I, t) :- inV(I), member(t(S), I).
ac(S, I, f) :- inV(I), member(f(S), I).
% non-members
ac(S, I, t) :- int2(I), not inV(I), member(f(S), I), ac(R, I, t) : s(R), member(t(R), I); ac(Q, I, f) : s(Q), member(f(Q), I), Q != S.
ac(S, I, f) :- int2(I), not inV(I), member(t(S), I), ac(R, I, f) : s(R), member(f(R), I); ac(Q, I, t) : s(Q), member(t(Q), I), Q != S.