Skip to content

⛓️ Extension of clingo to handle constraints over integers

License

Notifications You must be signed in to change notification settings

potassco/clingcon

This branch is 7 commits ahead of master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4ddb538 · Jan 17, 2025
Jun 23, 2024
Jan 17, 2025
Sep 28, 2023
Mar 24, 2020
Apr 7, 2021
Jan 17, 2025
Sep 28, 2023
Feb 15, 2024
Sep 19, 2023
Sep 19, 2023
Sep 19, 2023
Sep 19, 2023
Sep 18, 2022
Sep 19, 2023
Feb 15, 2024
Sep 19, 2023
Apr 6, 2020
Jun 2, 2022
Sep 19, 2023
Sep 19, 2023
Jun 13, 2021
Jun 13, 2021

Repository files navigation

Clingcon

clingcon CI tests

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 constraints over finite domain integer variables.

The latest source release is available under the releases tab. Binary packages can be installed using on of the following package managers:

  • Packages for a wide range of platforms are available on Anaconda
  • Ubuntu users can install packages from our Ubuntu PPA
  • Clingcon's Python module is available on PyPI

Building a release version with conda

conda create -n clingcon -c potassco/label/dev -c conda-forge \
      clingo ninja cmake cxx-compiler
conda activate clingcon
cmake -G Ninja \
      -Bbuild/release \
      -H. \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_PREFIX="${CONDA_PREFIX}" \
      -DCMAKE_INSTALL_LIBDIR=lib \
      -DCLINGCON_MANAGE_RPATH=Off
cmake --build build/release --target install
clingcon --version

Development

The Makefile is meant for development. It is also possible to create a compile database to use with linting plugins.

conda install -n clingcon -c conda-forge -c programfan \
      compdb libcxx clang-tools
conda activate clingcon
make compdb

With this, plugins like vim-ale should be able to lint the source code while editing.

Profiling

The makefile enables easy setup of profiling. To profile, use

make BUILD_TYPE=profile
./build/profile/bin/clingcon <options>

To visualize the callgraph, use

pprof --gv ./build/profile/bin/clingcon clingcon.solve.prof

To browse the profiling data, use

pprof --callgrind ./build/profile/bin/clingcon clingcon.solve.prof > clingcon.solve.out
kcachegrind clingcon.solve.out