10.07.2015 Views

SIMPLY: a Compiler from a CSP Modeling Language to the SMT-LIB ...

SIMPLY: a Compiler from a CSP Modeling Language to the SMT-LIB ...

SIMPLY: a Compiler from a CSP Modeling Language to the SMT-LIB ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Simply works in <strong>the</strong> spirit of SPEC2SAT [3], which transforms problem specificationswritten in NP-SPEC [1] in<strong>to</strong> SAT instances in DIMACS format. However,as said, <strong>the</strong> input language of Simply is similar <strong>to</strong> that of EaCL and, mostimportantly, it generates <strong>SMT</strong> instances according <strong>to</strong> <strong>the</strong> standard <strong>SMT</strong>-<strong>LIB</strong>language [13] instead of SAT instances. Then, <strong>the</strong> problem can be solved by usingany <strong>SMT</strong> solver supporting <strong>the</strong> required <strong>the</strong>ories. Thanks <strong>to</strong> <strong>the</strong> higher levelof expressivity of <strong>SMT</strong>, <strong>the</strong> resulting <strong>SMT</strong> instances are smaller than if <strong>the</strong>ywhere just plain SAT and, in many cases, as we show in Section 4, <strong>the</strong> problemscan be solved in a reasonable amount of time by state-of-<strong>the</strong>-art <strong>SMT</strong> solvers.Our aim is <strong>to</strong> take advantage of <strong>the</strong> race for efficiency between <strong>SMT</strong> solvers,and <strong>to</strong> expand <strong>the</strong> application of <strong>SMT</strong> techniques <strong>to</strong> new areas. The system canalso serve as a <strong>CSP</strong> benchmark genera<strong>to</strong>r for <strong>SMT</strong> solvers comparison. Currently,Simply generates quantifier-free linear integer arithmetic formulas, but <strong>the</strong>re areplans <strong>to</strong> extend <strong>the</strong> compiler in order <strong>to</strong> deal with o<strong>the</strong>r interesting <strong>the</strong>ories suchas, e.g., arrays and bit-vec<strong>to</strong>rs.The rest of <strong>the</strong> paper is structured as follows. In Section 2 we recall somebasic concepts on <strong>SMT</strong>. In Section 3 we introduce <strong>the</strong> <strong>to</strong>ol and its language, andgive some details about <strong>the</strong> compiler. In Section 4 we discuss some benchmarks.Finally, in Section 5 we conclude and discuss fur<strong>the</strong>r work.2 Satisfiability Modulo TheoriesSatisfiability Modulo Theories (<strong>SMT</strong>) is <strong>the</strong> problem of deciding <strong>the</strong> satisfiabilityof a first-order formula with respect <strong>to</strong> some background first-order <strong>the</strong>ory. Thatis, an <strong>SMT</strong> instance is a first-order formula where some function and predicatesymbols have predefined interpretations, according <strong>to</strong> <strong>the</strong> background <strong>the</strong>ories.Examples of <strong>the</strong>ories are Equality and Uninterpreted Functions, Linear IntegerArithmetic, Linear Real Arithmetic, <strong>the</strong>ir fragments Integer Difference Logicand Real Difference Logic, Arrays (useful in modeling and verifying softwareprograms), Bit-Vec<strong>to</strong>rs (useful in modeling and verifying hardware designs), orcombinations of <strong>the</strong>m (see [13] for details). Most <strong>SMT</strong> solvers are restricted <strong>to</strong>decidable quantifier free fragments of <strong>the</strong>ir logics, but this suffices for many applications.Usually, <strong>SMT</strong> solvers deal with problems with thousands of clauseslike, e.g., x + 3 < y ∨ y = f(f(x + 2)) ∨ g(y) ≤ 1, containing a<strong>to</strong>ms over combined<strong>the</strong>ories, and involving functions with no predefined interpretation, i.e.,uninterpreted functions.There are two main approaches <strong>to</strong> solve <strong>SMT</strong> instances, namely, <strong>the</strong> eagerand <strong>the</strong> lazy approach. In <strong>the</strong> eager approach, <strong>the</strong> formula is translated in<strong>to</strong>an equisatisfiable propositional formula. This allows <strong>the</strong> use of off-<strong>the</strong>-shelf SATsolvers, but has important drawbacks like, e.g., exponential memory blow-ups.For this reason most, if not all, state-of-<strong>the</strong>-art <strong>SMT</strong> solvers implement a lazyapproach, which does not involve a translation in<strong>to</strong> SAT. One of <strong>the</strong>se approachesis DPLL(T ) [12], which consists of a general DPLL(X) engine, very similar innature <strong>to</strong> a SAT solver, whose parameter X is instantiated with a specializedsolver Solver Tfor a given <strong>the</strong>ory T , producing a DPLL(T ) system. The basic

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!