clingcon
Clingcon is an answer set solver for constraint logic programs, building upon the answer set solver clingo. It extends the high-level modeling language of ASP with constraint solving capacities. Constraints over finite domain integer variables can be used in logic programs. Clingcon adopts state-of-the-art techniques from the area of SMT, like conflict-driven learning and theory propagation. It uses lazy nogood and variable generation on the order encoding and features several preprocessing techniques.
Features
- integer linear constraints
&sum{3*x; 4*y} >= z-7
- global distinct constraint
&distinct{x;y;3*z}
- can handle huge variables
- no domains needed (-2^30 .. 2^30 as default domain)
&dom{1..10; 30..40} = x
- multi-shot solving using python or lua
- multi-objective optimization on constraint variables
&minimize{x;y;z}
Example
#include "csp.lp".
#const end=20.
#const stepsize=7.
step(0..end).
% initial state
&sum {at(0)} = 0.
% actions
{move(T)} :- step(T); T > 0.
% effects
&sum {at(T-1); stepsize} = at(T) :- move(T).
% frame axiom
&sum {at(T-1)} = at(T) :- not move(T); step(T); step(T-1).
% goals
:- &sum {at(end)} <= 100.
&show {at(X):step(X)}.
#show move/1.
More examples can be found in the example section.
Download
- Recent clingcon 3.x releases are on github: github.com/potassco/clingcon/releases.
- The latest source is on github: github.com/potassco/clingcon.
- Clingcon up to version 2.x is available on sourceforge: sourceforge.net/projects/potassco/files/clingcon.
Building
See INSTALL for more details.
Benchmarks
- Experiments for clingcon 3
- Experiments for clingcon 2
- Experiments for clingcon 1
- Experiments for new-old
Citing
- Max Ostrowski, Modern Constraint Answer Set Solving, Thesis, 2018 (for version 3)
- Mutsunori Banbara, Benjamin Kaufmann, Max Ostrowski and Torsten Schaub, Clingcon: The Next Generation, TPLP, 2017 (for version 3)
- Max Ostrowski and Torsten Schaub, ASP modulo CSP: The clingcon system, TPLP, 2012 (for version 2)
- Martin Gebser, Max Ostrowski and Torsten Schaub, Constraint Answer Set Solving, ICLP, 2009 (for version 1)