@hackage / toysolver

Assorted decision procedures for SAT, SMT, Max-SAT, PB, MIP, etc

Latest0.9.0

About

Metadata

  • Last updated , by MasahiroSakai
  • License BSD-3-Clause
  • Categories Algorithms
  • Maintained by: masahiro.sakai@gmail.com

  • Lottery factor: 1

Links

Installation

Tested Compilers

  1. 9.8.2
  2. 9.6.6
  3. 9.4.8
  4. 9.2.8
  5. 9.0.2
  6. 8.10.7
  7. 8.8.4
  8. 8.6.3

Package Flags

Use the -f option with cabal commands to enable flags

    forcechar8 (off by default)

    set default encoding to char8 (not to use iconv)

    linuxstatic (off by default)

    build statically linked binaries

    withzlib (on by default)

    Use zlib package to support gzipped files

    buildtoyfmf (off by default)

    build toyfmf command

    buildforeignlibraries (on by default)

    build foreign libraries

    buildsampleprograms (off by default)

    build sample programs

    buildmiscprograms (off by default)

    build misc programs

    usehaskeline (on by default)

    use haskeline package

    opencl (off by default)

    use opencl package (deprecated)

    extraboundschecking (off by default)

    enable extra bounds checking for debugging

    optparse-applicative-018 (off by default)

    use optparse-applicative >=0.18

Readme

toysolver

License Join the chat at https://gitter.im/msakai/toysolver

Hackage: Hackage

Dev: Build Status Coverage Status

It provides solver implementations of various problems including SAT, SMT, Max-SAT, PBS (Pseudo Boolean Satisfaction), PBO (Pseudo Boolean Optimization), MILP (Mixed Integer Linear Programming) and non-linear real arithmetic.

In particular, it contains moderately-fast pure-Haskell SAT solver 'toysat'.

Installation

See INSTALL.md.

Usage

This package includes several commands.

toysolver

Arithmetic solver for the following problems:

  • Mixed Integer Linear Programming (MILP or MIP)
  • Boolean SATisfiability problem (SAT)
  • PB
    • Pseudo Boolean Satisfaction (PBS)
    • Pseudo Boolean Optimization (PBO)
    • Weighted Boolean Optimization (WBO)
  • Max-SAT families
    • Max-SAT
    • Partial Max-SAT
    • Weighted Max-SAT
    • Weighted Partial Max-SAT
  • Real Closed Field

Usage:

toysolver [OPTION...] [file.lp|file.mps]
toysolver --lp [OPTION...] [file.lp|file.mps]
toysolver --sat [OPTION...] [file.cnf]
toysolver --pb [OPTION...] [file.opb]
toysolver --wbo [OPTION...] [file.wbo]
toysolver --maxsat [OPTION...] [file.cnf|file.wcnf]

-h  --help           show help
-v  --version        show version number
    --solver=SOLVER  mip (default), omega-test, cooper, cad, old-mip, ct
toysat

SAT-based solver for the following problems:

  • SAT
    • Boolean SATisfiability problem (SAT)
    • Minimally Unsatisfiable Subset (MUS)
    • Group-Oriented MUS (GMUS)
  • PB
    • Pseudo Boolean Satisfaction (PBS)
    • Pseudo Boolean Optimization (PBO)
    • Weighted Boolean Optimization (WBO)
  • Max-SAT families
    • Max-SAT
    • Partial Max-SAT
    • Weighted Max-SAT
    • Weighted Partial Max-SAT
  • Integer Programming (all variables must be bounded)

Usage:

toysat [file.cnf|-]
toysat --sat [file.cnf|-]
toysat --mus [file.gcnf|file.cnf|-]
toysat --pb [file.opb|-]
toysat --wbo [file.wbo|-]
toysat --maxsat [file.cnf|file.wcnf|-]
toysat --lp [file.lp|file.mps|-]

PB'12 competition result:

  • toysat placed 2nd in PARTIAL-BIGINT-LIN and SOFT-BIGINT-LIN categories
  • toysat placed 4th in PARTIAL-SMALLINT-LIN and SOFT-SMALLINT-LIN categories
  • toysat placed 8th in OPT-BIGINT-LIN category
toysmt

SMT solver based on toysat.

Usage:

toysmt [file.smt2]

Currently only QF_UF, QF_RDL, QF_LRA, QF_UFRDL and QF_UFLRA logic are supported.

toyfmf

SAT-based finite model finder for first order logic (FOL).

Usage:

toyfmf [file.tptp] [size]
toyconvert

Converter between various problem files.

Usage:

toyconvert -o [outputfile] [inputfile]

Supported formats:

  • Input formats: .cnf .wcnf .opb .wbo .gcnf .lp .mps
  • Output formats: .cnf .wcnf .opb .wbo .lsp .lp .mps .smp .smt2 .ys

Bindings

Spin-off projects and packages