GithubHelp home page GithubHelp logo

imandra-ai / abstract-transition-systems Goto Github PK

View Code? Open in Web Editor NEW
1.0 7.0 1.0 235 KB

[alpha] An implementation of several classic transition systems that describe algorithms for SAT or SMT, for interactive exploration

Home Page: https://docs.imandra.ai/abstract-transition-systems/ats_web.html

Makefile 0.32% OCaml 97.83% HTML 0.33% CSS 1.53%
formalization sat smt ocaml dpll-algorithm cdcl

abstract-transition-systems's Introduction

Abstract Transition Systems

An implementation of several classic transition systems that describe algorithms for SAT or SMT. The purpose is to make it very easy to experiment with new calculi or variants of existing calculi.

online version

  • Calculi
    • DPLL
    • CDCL
    • mcsat '13
    • mcsat '17 (with non boolean propagations) โ€ฆ
  • Interfaces
    • linenoise
    • interactive web UI

Example of a session

$ dune exec src/bin/main.exe -- -s dpll
picked ats dpll    
> init ((-1 2) (1 2) (-3 2) (3 1) (-2 -1 -3) (-2 3) (-3 2))
> show
state:
  (st :status searching
   :cs ((-1 2) (1 2) (-3 2) (3 1) (-2 -1 -3) (-2 3) (-3 2)) :trail ())
> next
choices:
  (0: (st :status searching
       :cs ((-1 2) (1 2) (-3 2) (3 1) (-2 -1 -3) (-2 3) (-3 2)) :trail (3*)) by "decide 3")
  (1: (st :status searching
       :cs ((-1 2) (1 2) (-3 2) (3 1) (-2 -1 -3) (-2 3) (-3 2)) :trail (2*)) by "decide 2")
  (2: (st :status searching
       :cs ((-1 2) (1 2) (-3 2) (3 1) (-2 -1 -3) (-2 3) (-3 2)) :trail (1*)) by "decide 1")
> pick 0
picked 0: next state by "decide 3"
  (st :status searching
   :cs ((-1 2) (1 2) (-3 2) (3 1) (-2 -1 -3) (-2 3) (-3 2)) :trail (3*))
> next 5
deterministic transition "propagate 2 from (-3 2)" to
  (st :status searching
   :cs ((-1 2) (1 2) (-3 2) (3 1) (-2 -1 -3) (-2 3) (-3 2)) :trail (2 3*))
deterministic transition "propagate -1 from (-2 -1 -3)" to
  (st :status searching
   :cs ((-1 2) (1 2) (-3 2) (3 1) (-2 -1 -3) (-2 3) (-3 2)) :trail (-1 2 3*))
done by "all vars decided", last state:
  (st :status sat :cs ((-1 2) (1 2) (-3 2) (3 1) (-2 -1 -3) (-2 3) (-3 2))
   :trail (-1 2 3*))

Run directly on the command line:

$ cat mcsat_unsat2
(
  (ty a)
  (fun x a)
  (fun y a)
  (fun z a)
  (assert (= x y))
  (assert (= y z))
  (assert (not (= x z)))
)

$ ./ats.exe -s mcsat -e 'load "mcsat_unsat2";show;auto 2;quit'
trail.cons true <- true
picked ats mcsat
state:
  (st :status searching
   :cs ((= x y)
        (= y z)
        (not (= x z)))
   :trail ((true <- true))
   :env ((ty a) (fun x a) (fun y a) (fun z a)))
trail.cons (= x y) <- true
trail.cons (= y z) <- true
deterministic transition "propagate (= x y) from (= x y)" to
  (st :status searching
   :cs ((= x y)
        (= y z)
        (not (= x z)))
   :trail (((= x y) <- true) (true <- true))
   :env ((ty a) (fun x a) (fun y a) (fun z a)))
deterministic transition "propagate (= y z) from (= y z)" to
  (st :status searching
   :cs ((= x y)
        (= y z)
        (not (= x z)))
   :trail (((= y z) <- true) ((= x y) <- true) (true <- true))
   :env ((ty a) (fun x a) (fun y a) (fun z a)))
trail.cons true <- true

abstract-transition-systems's People

Contributors

c-cube avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

zeta1999

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.