• Stars
    star
    148
  • Rank 242,189 (Top 5 %)
  • Language
    Haskell
  • License
    Other
  • Created almost 13 years ago
  • Updated 11 months ago

Reviews

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

Repository Details

My sandbox for experimenting with solver algorithms.

toysolver

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

Hackage: Hackage Hackage Deps

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 Liner 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

More Repositories

1

cpl

An interpreter of Hagino's Categorical Programming Language (CPL).
Haskell
100
star
2

data-interval

Interval datatype, interval arithmetic, and interval-based containers for Haskell
Haskell
20
star
3

haskell-decision-diagrams

Binary decision diagrams (BDD) and Zero-Suppressed Binary Decision Diagrams (ZDD) in Haskell
Haskell
11
star
4

nonlinear-optimization-ad

Several Haskell packages for numerical optimizations.
Haskell
8
star
5

ptq

An implementation of Montague's PTQ (Proper Treatment of Quantification).
Haskell
7
star
6

bytestring-encoding

Haskell
6
star
7

haskell-minisat

Low-level Haskell binding of Minisat
C++
5
star
8

finite-field

Haskell
4
star
9

glpk-maxsat

Max-SAT frontend for GLPK
C++
4
star
10

extended-reals

Extension of real numbers with positive/negative infinities (±∞)
Haskell
4
star
11

chainer-optnet

Python
3
star
12

pseudo-boolean

Haskell library for parsing/generating OPB/WBO files used in pseudo boolean competition.
Haskell
3
star
13

satchmo-toysat

toysat driver as backend for satchmo
Haskell
2
star
14

sign

Arithmetic over signs and sets of signs
Haskell
2
star
15

haskell-hyperset

Haskell
2
star
16

haskell-MIP

Libraries for reading/writing MIP problem files, invoking external MIP solvers, etc. in Haskell
Haskell
2
star
17

tpp2011

"Uniform Candy Distribution" problem
2
star
18

haskell-optdir

The OptDir type for representing optimization directions.
Haskell
2
star
19

ltg

TeamSampou's repository for ICFPC2011
Haskell
2
star
20

ersatz-toysat

toysat driver as backend for ersatz
Haskell
2
star
21

haskell-glpk

Haskell wrapper for GLPK (GNU Linear Programming Kit).
Haskell
2
star
22

scip-maxsat

Max-SAT frontend for SCIP
C++
2
star
23

folkung

Personal mirror of http://code.haskell.org/folkung/
Haskell
2
star
24

icfpc2013

Haskell
2
star
25

icfpc2012

ICFP Programming Contest 2012 -- Lambda Lifter
Haskell
2
star
26

bnn-verification

TeX
2
star
27

essence-of-ad

Attempt to code "The Simple Essence of Automatic Differentiation" paper
Haskell
2
star
28

pulp-scip

Python
1
star
29

tmctf2015-qualifier

Trend Micro CTF Asia Pacific & Japan 2015 Online Qualifier
Haskell
1
star
30

glucose-pybind11

C++
1
star
31

vstte2012vc

Java
1
star
32

multiset-large

Haskell
1
star
33

CCG-ja

Combinatory categorial grammar (CCG) of Japanese
1
star
34

icfpc2014

Haskell
1
star
35

rena

Ruby
1
star
36

CNFIO

CNF reader for Haskell
Haskell
1
star
37

cvc3

personal mirror of CVC3
C++
1
star
38

z3-proof-visualizer

TeX
1
star
39

kodkod

Personal mirror of http://alloy.mit.edu/kodkod/
Java
1
star
40

sandbox

Sandbox repository to learn git.
1
star