1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
conjunction(B) :- literal_tuple(B),
not not hold(L) : literal_tuple(B, L), L > 0;
not hold(L) : literal_tuple(B,-L), L > 0.
body(normal(B)) :- rule(_,normal(B)), conjunction(B).
body(sum(B,G)) :- rule(_,sum(B,G)),
#sum { W,L : not not hold(L), weighted_literal_tuple(B, L,W), L > 0 ;
W,L : not hold(L), weighted_literal_tuple(B,-L,W), L > 0 } >= G.
hold(A) : atom_tuple(H,A) :- rule(disjunction(H),B), body(B).
{ hold(A) : atom_tuple(H,A) } :- rule( choice(H),B), body(B).
#show.
#show T : output(T,B), conjunction(B).
|