Giter Site home page Giter Site logo

hands-on-solvers's Introduction

hands-on-solvers

For running Minisat, Z3 and CVC4, you can use Docker containers. You find the installation instruction below.

Minisat

docker pull julianthome/tinned:tinned-minisat
docker run -it julianthome/tinned:tinned-minisat bash
apt-get install ruby
cd /opt && git clone https://github.com/julianthome/hands-on-solvers
cd /opt/hands-on-solvers/sudoku2sat
./gensat.rb input.csv # translate problem to DIMACS
minisat input.cnf model.txt # solve problem
# you can map the variable id to the sudoku grid by using input.vmap file which
# is generated automatically

CVC4

docker pull julianthome/tinned:tinned-cvc4
docker run -it julianthome/tinned:tinned-cvc4 bash
apt-get install ruby
cd /opt && git clone https://github.com/julianthome/hands-on-solvers
cd /opt/hands-on-solvers/sudoku2smt
./gensmt.rb input.csv # translate problem to SMT
cvc4 --lang smt2 input.smt2

Z3

docker pull julianthome/tinned:tinned-z3
docker run -it julianthome/tinned:tinned-z3 bash
apt-get install ruby
cd /opt && git clone https://github.com/julianthome/hands-on-solvers
cd /opt/hands-on-solvers/sudoku2smt
./gensat.rb input.csv # translate problem to SMT
z3 input.smt2

Z3 Python bindings

docker pull julianthome/tinned:tinned-z3
docker run -it julianthome/tinned:tinned-z3 bash
cd /opt/hands-on-solvers
apt-get update && apt-get install python-pip
pip install z3-solver
./pythonz3.py
./solveSudoku.py xample.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.