Current answer set solvers work on variable-free programs. Hence, a grounder is needed that, given an input program with first-order variables, computes an equivalent ground (variable-free) program. gringo is such a grounder. Its output can be processed further with clasp, claspfolio, or clingcon.
clingo combines both gringo and clasp into a monolithic system. This way it offers more control over the grounding and solving process than gringo and clasp can offer individually - e.g., incremental grounding and solving.
Both clingo and gringo are released together in one package.
Attention! The languages of clingo 3 and 4 are not fully compatible because clingo 4 adheres to the recent ASP language standard. For processing legacy encodings, we recommend downloading the latest version of clingo 3 in addition to clingo 4. The language did not change in version 5 but there were many API changes.
- Recent clingo releases are on GitHub: github.com/potassco/clingo/releases.
- The latest source is on GitHub: github.com/potassco/clingo.
- clingo up to version 4.x is available on sourceforge: sourceforge.net/projects/potassco/files/clingo.
- clingo versions 2.x are also available on sourceforge: sourceforge/projects/potassco/files/gringo.
- Potassco guide on GitHub for series 5 and later
- Potassco guide on Sourceforge for series 4 and earlier
- Formal language specification
- Python API Reference (versions 5.5, 5.4, 5.3, 5.2, 5.1, 5.0)
- C API Reference (versions 5.5, 5.4, 5.3, 5.2, 5.1, 5.0)
- Advanced Examples
conda create -n potassco -c conda-forge clingo conda activate potassco
Further packages, including development packages, are available from the potassco channel.
We also provide pip packages for Python. Packages can be installed from pypi.org:
python3 -m pip install --user --upgrade clingo
Development packages can be installed from test.pypi.org.
Furthermore, clingo can be installed using spack, a package manager targeting HPC environments. Interestingly, spack uses clingo internally to compute which packages to install:
Packages for clingo are available for some Linux distributions:
For Mac OS X, clingo packages are available in
- The clorm Python library provides an object relational mapper-like interface to clingo. It allows facts to be asserted and extracted in an intuitive and easy to use way.
- The clingo-rs project provides rust bindings to the clingo library.
- The clingo-haskell project provides Haskell bindings to the clingo library.
- There are also rudimentary prolog bindings to clingo.
- There are abandoned java bindings to clingo.
- Syntax highlighting is available for vim and emacs.