Patrick Lühne
ea885f5fdb
Clingo treats operations that were assumed to be “invalid” not as processing errors but as operations returning an empty set. This changes how formulas have to be evaluated. This commit implements an explicit function for retrieving the return type of an expression, that is, both the domain of the result as well as whether it’s an empty, unit, or general set with multiple values.
10 lines
174 B
Plaintext
10 lines
174 B
Plaintext
#show in/2.
|
|
%#external integer(n(0)).
|
|
%#external integer(r(0)).
|
|
|
|
{in(1..n, 1..r)}.
|
|
covered(I) :- in(I, S).
|
|
|
|
:- I = 1..n, not covered(I).
|
|
:- in(I, S), in(J, S), in(I + J, S).
|