Giter Site home page Giter Site logo

c-cube / mc2 Goto Github PK

View Code? Open in Web Editor NEW
38.0 5.0 5.0 9.3 MB

[research] A modular SMT solver in OCaml, based on mcSAT

Home Page: https://c-cube.github.io/mc2/

License: Apache License 2.0

Makefile 0.01% OCaml 1.90% Shell 0.01% SMT 98.01% Python 0.06% Common Lisp 0.01%
ocaml mcsat smt formal-methods prover

mc2's Introduction

MC2 build

MC² ("Model Constructing Modular Contraption") is a modular SMT solver in OCaml, based on the MCSat calculus.

It implements most of the techniques described in de Moura and Jovanović (VMCAI 13), in around 7 thousands lines of code (not including dependencies). EUF is supported via congruence lemmas; LRA is based on a conflict-driven Fourier-Motzkin solver. Boolean formulas are turned into clauses during preprocessing, using the Tseitin encoding; the core solver handles clauses like a regular SAT solver, as the code was originally derived from msat (github.com/Gbury/mSAT), itself derived from Alt-Ergo Zero. However most of the code was modified or rewritten by Simon Cruanes while working at Veridis at Loria, Nancy, France; and later in his own free time.

Documentation

https://c-cube.github.io/mc2/

Short Summary

MC² is a SMT solver. SMT solvers are automatic tools that try to assess whether a given logic formula is satisfiable (admits a model, an interpretation that makes it true) or unsatisfiable (no interpretation can make it true; it is absurd, and its negation is a theorem). Prominent solvers include Z3, cvc5, Yices 2, and others; all of them follow the CDCL(T) paradigm. Most of these solvers are implemented in C or C++.

In contract, MC² is based on the mcSAT calculus (see [fmcad'13] and [vmcai'13]). mcSAT is fundamentally different from CDCL(T); it is a so-called natural SMT calculus where the boolean reasoning of CDCL is extended so as to be able to assign values to non-boolean variables (such as linear arithmetic variables, for example). As a calculus it can be considered stronger, in some sense, because it can have shorter proofs by virtue of being allowed to introduce new terms during the proof search. On the other hand, mcSAT is not as well known or battle tested as CDCL(T). MC² started as an experiment to try and reproduce some results from vmcai'13.

COPYRIGHT

This program is distributed under the Apache Software License version 2.0. See the enclosed file LICENSE.

mc2's People

Contributors

c-cube avatar gbury avatar louisabraham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mc2's Issues

missing support for boolean subterms

answers sat on this unsat problem:

(declare-sort U 0)
(declare-fun f (Bool) U)
(declare-fun a () Bool)
(declare-fun b () Bool)
(declare-fun c () Bool)
(assert
  (distinct (f a) (f b) (f c)))
(check-sat)

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.