clasp package from clasp repo


Package Summary

Tags No category tags.
Version 3.0.3
License GNU GPLv2
Build type CATKIN

Repository Summary

Checkout URI
VCS Type git
VCS Version master
Last Updated 2014-04-23
CI status Continuous Integration
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This ROS package contains the clasp answer set solver for (extended) normal logic programs developed at the University of Potsdam. Clasp combines the high-level modeling capacities of answer set programming (ASP) with state-of-the-art techniques from the area of Boolean constraint solving. The primary clasp algorithm relies on conflict-driven nogood learning, a technique that proved very successful for satisfiability checking (SAT). Unlike other learning ASP solvers, clasp does not rely on legacy software, such as a SAT solver or any other existing ASP solver. Rather, clasp has been genuinely developed for answer set solving based on conflict-driven nogood learning. clasp can be applied as an ASP solver (on SMODELS format, as output by Gringo), as a SAT solver (on a simplified version of DIMACS/CNF format), or as a PB solver (on OPB format).

Additional Links


  • Piyush Khandelwal
  • Jack O'Quin


  • Benjamin Kaufmann
              A conflict-driven nogood learning answer set solver 

  clasp is an answer set solver for (extended) normal and disjunctive logic programs. 
  It combines the high-level modeling capacities of answer set programming
  with state-of-the-art techniques from the area of Boolean constraint solving.
  The primary clasp algorithm relies on conflict-driven nogood learning, 
  a technique that proved very successful for satisfiability checking (SAT).
  Starting with version 2.0, clasp supports parallel (multithreaded) solving.
  Starting with version 3.0, clasp supports
   - disjunctive logic programs as in claspD-2
   - domain heuristic modifications as in hclasp via option "--heuristic=domain"
   - unsatisfiable-core based optimization as in unclasp via "--opt-strategy={4,5}"

  clasp is written in (mostly) Standard-C++. It was successfully built and run
  under Linux (x86-32, x86-64) using gcc/clang and Windows (x86-32, x86-64) using
  either Microsoft Visual Studio or MinGW. 

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

  clasp is part of the Potassco project hosted at SourceForge.
  It is distributed under the GNU Public License. See COPYING for
  details regarding the license.

  COPYING      - GNU Public License
  CHANGES      - Major changes between versions
  README       - This file
               - Simple script that creates Makefiles for building clasp (library and application) 
  app/         - Source code directory of the command-line interface
  libclasp/    - Directory of the clasp (static) library (sources, documentation, unit tests)
               - Library for parsing command-line options (needed by app)
  build_vc/    - Directory containing Visual Studio project files for building clasp
  tools/       - Some additional files

  The preferred way to build clasp is to use make and the provided configure script.
  You'll need to have the GNU Compiler Collection (GCC) version 3 or
  better installed in order to build clasp. You'll also need GNU make 3.80 or better. 
  On Microsoft Windows, we recommend using MinGW available from - 
  You may want to visit for detailed
  instructions on installing MinGW. Make sure to also install MinGW-make.

  In the following it is assumed that 'make' is an alias for the installed GNU make. 
  If this is not the case on your system, replace 'make' with the name of the GNU make 
  executable (e.g. gmake). Furthermore, on Microsoft Windows use ./configure.bat instead of

  clasp's multithread support requires the Intel Threading Building Blocks library (version >= 3.x) 
  which is freely available at: 
  After downloading and installing you may want to set and export the 
  TBB30_INSTALL_DIR environment variable.

    ./ --help 
  to get an overview of all supported build configurations/options.

  To build clasp:
    cd build/release

  To build clasp with multithread support using TBB30_INSTALL_DIR:
    ./ --with-mt
    cd build/release_mt

  To build clasp with multithread support using custom directory structure:
    ./ --with-mt TBB_INCLUDE=<path_to_tbb_include> TBB_LIB=<path_to_tbb_lib>
    cd build/release_mt

  To install clasp:
    make install

  By default, 'make install' will install clasp in '/usr/local/bin'
  You can specify an installation prefix other than '/usr/local' 
  by running the configure-script with the option '--prefix=PATH'.
  Alternatively, use option '--bindir=PATH' to directly specify the
  installation path. 

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

BUILDING WITH Microsoft Visual Studio
  In the directory build_vc/ we provide Microsoft Visual Studio project files
  for building clasp. You can download the freely available express edition 
  of Visual C++ from here:
  Once installed:
    - open build_vc\vc9\clasp\clasp.sln
    - select the desired solution configuration (typically release_static) 
    - build the "app" project   

  clasp reads problem instances either from stdin, e.g 
    cat problem | clasp
  or from a given file, e.g
    clasp problem

  Beside logic programs in SMODELS-format, clasp also supports SAT-problems in DIMACS-,
  Max-SAT in (extended) DIMACS-, and PB-problems in OPB and WBO-format.

    clasp --help
  to get an overview of the various options supported by clasp.

  In addition to printing status information, clasp also
  provides information about the computation via its exit status.
  The exit status is:
    10: if the problem was found to be satisfiable
    20: if the problem was proved to be unsatisfiable
    0 : if the satisfiability of problem is not known, 
        because search was either interrupted or not started
    127: if clasp ran out of memory
    Furthermore, the exit status of 1 indicates an error.


Changelog for package clasp

3.0.3 (2014-04-23)

  • Released to ROS Hydro.
  • updated repo with clasp 3.0.3
  • Contributors: Piyush Khandelwal

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

System Dependencies


Dependant Packages

Launch files

No launch files found


No message files found.


No service files found


No plugins found.

Recent questions tagged clasp at Robotics Stack Exchange