• Stars
    star
    117
  • Rank 301,828 (Top 6 %)
  • Language
    C++
  • License
    MIT License
  • Created over 8 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⚙️ A conflict-driven nogood learning answer set solver

clasp

clasp is an answer set solver for (extended) normal and disjunctive logic programs. It is part of the Potassco project for Answer Set Programming (ASP). The primary algorithm of clasp relies on conflict-driven nogood learning, a technique that proved very successful for satisfiability checking (SAT). clasp has been genuinely developed for answer set solving but can also be applied as a (Max-)SAT or PB solver or as a C++ library in another program. It provides different reasoning modes and other advanced features including:

Detailed information (including a User's manual), source code, and pre-compiled binaries are available at: http://potassco.org/

LICENSE

clasp is distributed under the MIT License.

See LICENSE for details regarding the license.

PACKAGE CONTENTS

LICENSE        - The MIT License
CHANGES        - Major changes between versions
README.md      - This file
CMakeLists.txt - Configuration file for building clasp with CMake
cmake/         - Module directory for additional CMake scripts
app/           - Source code directory of the command-line interface
clasp/         - Header directory of the clasp library
src/           - Source code directory of the clasp library
tests/         - Unit tests of the clasp library
examples/      - Examples using the clasp library
libpotassco/   - Directory of the potassco library
tools/         - Some additional files

BUILDING & INSTALLING

The preferred way to build clasp is to use CMake version 3.1 or later together with a C++ compiler that supports C++11.

The following options can be used to configure the build:

CLASP_BUILD_APP         : whether or not to build the clasp application
CLASP_BUILD_TESTS       : whether or not to build clasp unit tests
CLASP_BUILD_EXAMPLES    : whether or not to build examples
CLASP_BUILD_WITH_THREADS: whether or not to build clasp with threading support
                          (requires C++11)

For example, to build clasp in release mode in directory <dir>:

cmake -H. -B<dir>
cmake --build <dir>

To install clasp afterwards:

cmake --build <dir> --target install

To set the installation prefix, run cmake with option -DCMAKE_INSTALL_PREFIX=<path>.

Finally, you can always skip installation and simply copy the clasp executable to a directory of your choice.

DOCUMENTATION

A User's Guide is available from http://potassco.org/

Source code documentation can be generated with Doxygen. Either explicitly:

cd libclasp/doc/api
doxygen clasp.doxy

or via the doc_clasp target when using cmake.

USAGE

clasp reads problem instances either from stdin, e.g

cat problem | clasp

or from a given file, e.g

clasp problem

Type

clasp --help

to get a basic overview of options supported by clasp or

clasp --help={2,3}

for a more detailed list.

In addition to printing status information, clasp also provides information about the computation via its exit status. The exit status is either one or a combination of:

0  : search was not started because of some option (e.g. '--help')
1  : search was interrupted
10 : problem was found to be satisfiable
20 : problem was proved to be unsatisfiable

Exit codes 1 and 11 indicate that search was interrupted before the final result was computed. Exit code 30 indicates that either all models were found (enumeration), optimality was proved (optimization), or all consequences were computed (cautious/brave reasoning). Finally, exit codes greater than 32 are used to signal errors.

More Repositories

1

clingo

🤔 A grounder and solver for logic programs.
C++
590
star
2

pddl-instances

🌍 PDDL instances covering the International Planning Competitions
Common Lisp
108
star
3

guide

🦮 An introduction to our Answer Set Programming tools focusing on gringo, clingo, and clasp.
TeX
74
star
4

asprilo

🤖 ASPRILO, an intra-logistics benchmark suite for answer set programming
Python
53
star
5

clorm

🗃️ A Python ORM-like interface for the Clingo Answer Set Programming (ASP) reasoner
Python
52
star
6

clingo-rs

🗝️ Rust bindings to the clingo library
Rust
29
star
7

plasp

🗺️ ASP planning tools for PDDL
C++
27
star
8

clingraph

🕸️ A visualizer for graphs defined as logic programs
Python
27
star
9

aspcud

A solver for package problems in CUDF format
C++
26
star
10

clinguin

🐧 Clingo Interactive UI
Python
25
star
11

clingcon

⛓️ Extension of clingo to handle constraints over integers
C++
25
star
12

asprilo-encodings

Collection of ASP encodings for asprilo
CLIPS
21
star
13

telingo

🕰️ A solver for temporal programs.
Python
21
star
14

asprin

💊 Qualitative and quantitative optimization in answer set programming
Python
19
star
15

plingo

🍀 A system for probabilistic reasoning in clingo
Python
15
star
16

flatzinc

🫓 A parser for the FlatZinc modelling language
Rust
11
star
17

clingofmt

♻️ Experimental formatter for clingo code
Rust
10
star
18

clingoLP

Theory propagator for linear programming using clingo theory language and interface.
Python
10
star
19

eclingo

🧠 A solver for epistemic logic programs.
Python
9
star
20

qasp2qbf

🧊 A translator from quantified answer set programming to quantified boolean formula
Python
8
star
21

mu-gringo

🌱 A prototypical grounder implementation
Rust
8
star
22

python-clingox

🧰 Library with auxilary functions to use along with the clingo module.
Python
7
star
23

anthem-1

🎼 Translate answer set programs to first-order theorem prover language
Rust
7
star
24

foliage

🍁 Rust crate for first-order logic with integer arithmetics
Rust
6
star
25

flatzingo

🦩 A flatzinc frontend for clingcon
Python
6
star
26

clingo-dl

📏 Theory propagator for difference logic using clingo's theory language and C++ API.
C++
6
star
27

mapf-subgraph-system

🕵️ Solving MAPF under map-to-subgraph transformation with SAT and ASP
C++
6
star
28

clingo-explaid

Tools to aid the development of explanation systems using clingo
Python
6
star
29

clintest

🧪 A test framework for clingo programs
Python
6
star
30

tree-sitter-clingo

🌳 Clingo grammar for tree-sitter
C
5
star
31

xorro

⚔️ A solver for programs with XOR constraints.
Python
5
star
32

python-project-template

📄 Template for python based projects.
Python
5
star
33

configuration-encoding

🧩 An encoding for solving configuration problems with ASP
Python
5
star
34

clingo-lpx

🧮 A simplistic simplex solver for checking satisfiability of a set of equations.
C++
4
star
35

potassco.github.io

ℹ️ The Potassco website
HTML
4
star
36

teaspoon

🥄 ASP encodings to solve the curriculum-based course timetabling problem
C++
4
star
37

train-scheduling-with-clingo-dl

🚄 Benchmark scripts, encodings and instances for train scheduling with clingo-dl
Python
4
star
38

ngo

Non Ground Optimizer for logic programs.
Python
4
star
39

clingo-cmake-example

🏗️ Example how to use the clingo library in a cmake based project.
C
3
star
40

eclingo-prototype

Epistemic logic programming with clingo
Python
3
star
41

asp-date-lib

📅 ASP Library for dates
Python
3
star
42

fzn2lp

🥞 A converter from FlatZinc into an ASP fact format
Rust
3
star
43

libpotassco

🧱 A utility library used by various potassco projects
C++
3
star
44

ginkgo

🌱 Generalize learned constraints with ASP
C++
2
star
45

guess_and_check

Guess and Check Answer Set Programming
Python
2
star
46

asprilo-seminar

2
star
47

train-scheduling-with-hybrid-asp

🚂 Benchmark instances and encoding for the paper "Train Scheduling With Hybrid Answer Set Programming"
Python
2
star
48

asp-planning-benchmarks

A repository of ASP planning benchmarks
ASP
2
star
49

tel

Haskell
2
star
50

xls2asp

📊 Convert excel spreadsheets to ASP facts
Python
2
star
51

clingo-server

🌐 Clingo via HTTP
Rust
2
star
52

libcsp

C++
1
star
53

atlingo

Automata for dynamic answer set solving
C++
1
star
54

conda

📦 Conda recepies for potassco projects.
Python
1
star
55

planner

An ASP-based planner
Python
1
star
56

coala

coala is a translation tool for BC to ASP
Python
1
star
57

study-regulations

1
star
58

acclingo

Automatic algorithm configuration for clingo
Python
1
star
59

fz2aspif

Translating flatzinc format to ASP intermediate language aspif. To be used with clingcon-3.x series.
C++
1
star
60

clingo-sys

Raw Rust FFI bindings to the C API of clingo library
Rust
1
star