potassco / clingo

🤔 A grounder and solver for logic programs.
https://potassco.org/clingo
MIT License
601 stars 79 forks source link

Feature/extend safety #375

Closed rkaminsk closed 2 years ago

rkaminsk commented 2 years ago

Compute intervals by computing bounds for linear equations given by comparison literals to extend safety. The examples below give an overview of contexts where this feature is applicable.

% conjunction
2 { p(1..3) } 3.
q :- p(X): 1 <= X <= 3.
% disjunction
p(X): 1 <= X <= 3.
% head aggregate
2 { p(X): 1 <= X <= 3 } 3.
2 #count { X: p(X): 1 <= X <= 3 } 3.
% body aggregate
2 { p(1..3) } 3.
q :- 2 { p(X): 1 <= X <= 3 } 3.
q :- 2 #count { X: p(X), 1 <= X <= 3 } 3.
% rule
0 { p(1..3) } 2.
q :- p(X), 1 <= X <= 3.