Reimplement integer variable detection
This is a reimplementation of the integer variable detection procedure. The idea is to iteratively assume variables to be noninteger, and to prove that this would lead to a false or erroneous result. If the proof is successful, the variable is integer as a consequence.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#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).
|
||||
|
||||
#show in/2.
|
||||
|
Reference in New Issue
Block a user