%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Encoding for stable sets % Input: % arg(x, c) ...x is an argument with claim c % att(x, y) ...argument x attacks argument y % % Output: % in(c) ...claim c is in the extension %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % guess some set of claims in(C) :- arg(_, C), not out(C). out(C) :- arg(_, C), not in(C). % try to satisfy all claims that are in { argIn(X) : arg(X, C) } > 0 :- in(C). % verify that the guess is conflict-free :- argIn(X), argIn(Y), att(X, Y). % verify that all arguments outside are defeated defeated(X) :- att(Y, X), argIn(Y). :- arg(X, _), not argIn(X), not defeated(X). #show in/1.