All Projects → msakai → Toysolver

msakai / Toysolver

Licence: other
My sandbox for experimenting with solver algorithms.

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Toysolver

Scriptsdump
The biggest dump of scripts ever!
Stars: ✭ 114 (-10.24%)
Mutual labels:  algorithms
Competitiveprogrammingquestionbank
This repository contains all the popular competitive programming and DSA questions with solutions.
Stars: ✭ 122 (-3.94%)
Mutual labels:  algorithms
Echo
Python package containing all custom layers used in Neural Networks (Compatible with PyTorch, TensorFlow and MegEngine)
Stars: ✭ 126 (-0.79%)
Mutual labels:  algorithms
Functional Way
Write small programs (eg -algorithms) in a functional way.
Stars: ✭ 115 (-9.45%)
Mutual labels:  algorithms
Crystalline
A collection of containers & algorithms for the Crystal programming language
Stars: ✭ 120 (-5.51%)
Mutual labels:  algorithms
Shiyanlou
学习C & C++ & python&汇编语言 LLVM编译器 数据结构 算法 操作系统 单片机 linux 面试
Stars: ✭ 1,909 (+1403.15%)
Mutual labels:  algorithms
Dailycodingproblem
Stars: ✭ 113 (-11.02%)
Mutual labels:  algorithms
Stock Prediction
Smart Algorithms to predict buying and selling of stocks on the basis of Mutual Funds Analysis, Stock Trends Analysis and Prediction, Portfolio Risk Factor, Stock and Finance Market News Sentiment Analysis and Selling profit ratio. Project developed as a part of NSE-FutureTech-Hackathon 2018, Mumbai. Team : Semicolon
Stars: ✭ 125 (-1.57%)
Mutual labels:  algorithms
Data Structures With Go
Data Structures with Go Language
Stars: ✭ 121 (-4.72%)
Mutual labels:  algorithms
Data Structure And Algorithm 2017
Chinese University MOOC - Chen Yue, He Qinming - data structure - 2017 spring. Mainly implement the course code on MOOC.
Stars: ✭ 124 (-2.36%)
Mutual labels:  algorithms
Pydml
Distance Metric Learning Algorithms for Python
Stars: ✭ 115 (-9.45%)
Mutual labels:  algorithms
Algo
数据结构与算法 by golang
Stars: ✭ 116 (-8.66%)
Mutual labels:  algorithms
Typefont
The first open-source library that detects the font of a text in a image.
Stars: ✭ 1,575 (+1140.16%)
Mutual labels:  algorithms
Foundational Knowledge For Programmers
List of resources about foundational knowledge for programmers (supposed to last a few decades)
Stars: ✭ 115 (-9.45%)
Mutual labels:  algorithms
Scala Samples
There are pieces of scala code that explain Scala syntax and related things - like what you can do with all this
Stars: ✭ 125 (-1.57%)
Mutual labels:  algorithms
Competitive Programming
Hello Programmers 💻 , A one-stop Destination✏️✏️ for all your Competitive Programming Resources.📗📕 Refer CONTRIBUTING.md for contributions
Stars: ✭ 113 (-11.02%)
Mutual labels:  algorithms
Trienet
.NET Implementations of Trie Data Structures for Substring Search, Auto-completion and Intelli-sense. Includes: patricia trie, suffix trie and a trie implementation using Ukkonen's algorithm.
Stars: ✭ 122 (-3.94%)
Mutual labels:  algorithms
Leetcode
📓 算法学习笔记
Stars: ✭ 127 (+0%)
Mutual labels:  algorithms
Deeplearning Notes
Notes for Deep Learning Specialization Courses led by Andrew Ng.
Stars: ✭ 126 (-0.79%)
Mutual labels:  algorithms
Thealgorithms
Algorithms repository.
Stars: ✭ 122 (-3.94%)
Mutual labels:  algorithms

toysolver

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

Hackage: Hackage Hackage Deps Hackage CI

Dev: Build Status (Travis CI) Build Status (AppVeyor) Build Status (GitHub Actions) 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

Installation from binaries

Binary distributions for Windows, Mac, and Linux, can be downloaded from releases page.

Installation from Hackage

cabal install toysolver or stack install toysolver

Installation from source using stack

  1. Install stack
  2. git clone --recursive https://github.com/msakai/toysolver.git
  3. cd toysolver
  4. stack install

Installation from source using cabal-install

  1. Install GHC and cabal (You can use ghcup for installing them)
  2. git clone --recursive https://github.com/msakai/toysolver.git
  3. cd toysolver
  4. cabal install

Docker image

The Docker images can be found at dockerhub.

To run toysat using Docker for solving samples/pbs/normalized-j3025_1-sat.opb:

docker run -it --rm -v `pwd`:/data msakai/toysolver toysat samples/pbs/normalized-j3025_1-sat.opb`

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].