versat: A Verified Modern SAT Solver Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy Computer Science, The University of Iowa, USA

Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy

versat: A Verified Modern SAT Solver

Satisfiability Problem (SAT) “Is there a model for the given propositional formula?” I

Model: assignments to the variables that makes the formula true.

I

SAT if the formula has a model

I

UNSAT if the formula has a contradiction (thus, no model)

I

Decidable, but NP-Hard

SAT solver decides the satisfiability of a formula. I

Modern SAT solvers can solve large problems.

I

Smart engineering and heuristics work very well with human formulas.

I

Many applications in automated reasoning and verification.

Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy

versat: A Verified Modern SAT Solver

SAT Solver Verification Motivation I

Theoretically: simple specification, sophisticated implementation =⇒ “a challenging work”

I

Practically: SAT solvers are used as trusted backends for verification systems. =⇒ “to increase the level of trust”

Two Approaches for Verified SAT I I

Verify the code: mostly written in C/C++, highly optimized Verify the certificate by a trusted(=small/verified) checker: I I

SAT instance: a model that is found by the solver (easy) UNSAT instance: a refutational proof (execution trace, huge)

Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy

versat: A Verified Modern SAT Solver

versat: a Verified SAT Solver Goal: Making a new SAT solver such that I

implements modern SAT techniques and low-level optimizations

I

is verified to produce sound UNSAT answers

Focus on the soundness of UNSAT answers and speed I

SAT certificates have very low overhead to implement and check.

I

Why bother to verify the code for SAT?

I

Speed is more important than a guarantee of termination.

Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy

versat: A Verified Modern SAT Solver

The Guru Programming Language Guru is a functional programming language with: I

Dependent type system (for verification) I I

I

supports inductive datatypes and (equality) formula types allows partial functions

Resource type system (for efficient code generation) I I

mutable arrays with constant time access configurable memory management and no garbage collection

Published Papers: I

PLPV(2010) Resource Typing in Guru. Stump and Austin

I

PLPV(2009) Verified Programming in Guru. Stump, et al.

I

PSTT(2009) Deciding Joinability Modulo Ground Equations in Operational Type Theory. Petcher and Stump

Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy

versat: A Verified Modern SAT Solver

Specification: Overview Summary I

It is an encoding of the propositional logic.

I

This is the only trusted part of versat. The reset of versat are actual implementation and proof.

I

I

I I

to be checked and certified by the G URU compiler.

Size: 259 lines of G URU code (reasonably small) The parser is a part of specification. I I

a trusted interpretation of the benchmark file 145 lines (out of 259 lines)!

The type of the solve function Define clause := . Define formula := . Define solve : Fun(F:formula). := ... Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy

versat: A Verified Modern SAT Solver

Specification: Soundness of UNSAT answer Statement of Unsatisfiability I

Model Theoretically: “∀M.M 2 Φ” or “Φ  ⊥”

I

Proof Theoretically: “Φ ` ⊥” (more natural)

I

Solver returns UNSAT when the empty clause is deduced.

The answer type Inductive answer : Fun(F:formula).type := sat : Fun(spec F:formula). | unsat : Fun(spec F:formula)(spec p:).

I

A value represents a proof of F ` C.

I

spec (specificational) arguments are only for type checking.

I

So, proofs are not generated in run-time.

Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy

versat: A Verified Modern SAT Solver

Specification: Inference System The pf type encodes “`res ” (a weaker system than “`”) Inductive pf : Fun(F : formula)(C:clause).type := pf_asm : Fun(F : formula)(C:clause) (u : { (member C F eq_clause) = tt }). | pf_res : Fun(F : formula)(C1 C2 Cr : clause)(l:lit) (d1 : ) (d2 : ) (u : { (is_resolvent Cr C1 C2 l) = tt }).

I

Term constructors are the inference rules.

I

is resolvent is a logical (straightforward) function that determines whether Cr is a resolvent of C1 and C2.

Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy

versat: A Verified Modern SAT Solver

Implemented Features The least set of features to make “modern”

Engineering: I

Watched Literals

I

Conflict Analysis + Fast Resolution

I

Backjumping and Non-chronological Backtracking

Heuristics: I

Variable Scoring

I

Clause Learning

Summary: I

9884 lines of G URU code and proofs

I

Proved 247 lemmas

Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy

versat: A Verified Modern SAT Solver

Efficient Representation of Clauses aclause type: array-based clause and invariants Inductive aclause : Fun(nv:word)(F:formula).type := mk_aclause : Fun(spec nv:word)(spec F:formula) (spec n:word)(l:) (u1:{ (array_in_bounds nv l) = tt }) (spec c:clause)(spec pf_c:) (u2:{ c = (to_cl l) }) . I

aclause stores a clause in the array.

I

array in bounds: all array items are within bounds and the array is null-terminated.

I

to cl interprets a null-terminated array as a list.

I

the interpretation of array is valid in F.

Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy

versat: A Verified Modern SAT Solver

Conflict Analysis with Fast Resolution C ∨ l D ∨ ¬l Res C ∨D

Data structure: I

For constant time remove operation & duplication removal

Invariants: (u1:{ (u2:{ (u3:{ (u4:{

C2L = (length C2) }) (all_lits_are_assigned T (append C2 C1)) = tt }) (cl_has_all_vars (append C2 C1) T) = tt }) (cl_unique C2) = tt })

Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy

versat: A Verified Modern SAT Solver

Example Theorem: Clearing the Look-up Table

Define cl_has_all_vars_implies_clear_vars_like_new : Forall (nv:word) (vt:) (c:clause) (u:{ (cl_valid nv c) = tt }) (r:{ (cl_has_all_vars c vt) = tt }) .{ (clear_vars vt c) = (array_new nv UN) }

Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy

versat: A Verified Modern SAT Solver

Results: versat vs. proof checking The Certified Track benchmarks of SAT Competition 2007 I

16 UNSAT benchmarks

I

System: Intel Core 2 Duo 2.40GHz w/ 3GB of memory

I

One hour timeout for solving and checking, individually

Systems versat picosat + RUP picosat + TraceCheck

#Solved 6 14 14

#Certified 6 4 12

Trusted Base: I

versat: G URU compiler + 259 lines of G URU code

I

checker3 (RUP checker): 1,538 lines of C code

I

tracecheck (TraceCheck checker): boolforce library + 2,989 lines of C code

Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy

versat: A Verified Modern SAT Solver

Results: versat vs. State-of-the-art Solvers

SAT Race 2008 Test Set 1 I

50 benchmarks

I

System: Intel Xeon X5650 2.67GHz w/ 12GB of memory

I

900 seconds timeout for solving

Systems versat picosat-936 minisat-2.2.0

#Solved 19 46 47

#Timeout 31 4 3

#Error/Wrong 0 0 0

Note: versat solved velev-live-sat-1.0-03 (78MB size, 224,920 variables, 3,596,474 clauses)

Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy

versat: A Verified Modern SAT Solver

Conclusion versat is a new SAT solver written in G URU I

Implemented modern features with low-level data structures.

I

The soundness of UNSAT answer is proved.

I

Can solve and certify modern scale benchmarks

I

Our paper is submiited to VMCAI and under review.

I

Available at http://cs.uiowa.edu/~duoe/

Future Work: I

Implementing state-of-the-art features: CC Minimization, Restarting, Reordering Literals

I

Implement other related tools: RUP checker

Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy

versat: A Verified Modern SAT Solver

versat: A Verified Modern SAT Solver

is verified to produce sound UNSAT answers. Focus on the soundness of UNSAT answers and speed. ▷ SAT certificates have very low overhead to implement ...

139KB Sizes 3 Downloads 197 Views

Recommend Documents

versat: A Verified Modern SAT Solver
Oct 1, 2011 - Duckki Oe, Aaron Stump, Corey Oliver, Kevin Clancy. Computer Science, The University of Iowa, USA ... Guru is a functional programming language with: ▷ Dependent type system (for verification). ▷ supports ... PLPV(2009) Verified Pro

versat: A Verified Modern SAT Solver - The University of Iowa
arrays for clauses and other solver state, and machine integers for literals. The im- ...... 2. M. Armand, B. Grégoire, A. Spiwack, and L. Théry. Extending Coq with ...

versat: A Verified Modern SAT Solver
Jan 23, 2012 - SAT certificates are checked at run-time (low overhead). ▷ No completeness(termination) proof. ▷ Performance is more important than ...

Towards a Verified Artificial Pancreas ... - Computer Science
robustness metric can be used as an objective function to guide the system towards property violations in a systematic manner by seeking trajectories of ever decreasing ro- bustness [49,1,3]. This is usually achieved inside a global optimization tech

Verified Complaint.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Verified ...

Signature Not Verified -
May 24, 2018 - P.Krishna Mohan,Ph.D.,. Ph: 0866-2410017 / 18. Chief Executive Officer. To,. All Project Directors of DPMUs /APDs of TPMUs in the State. Sir,.

Verified Petition-Complaint.pdf
Adam S. Ross, Esq., and Stroock & Stroock & Lavan LLP, for their verified. petition/complaint respectfully allege: PRELMINARY STATEMENT. 1. Petitioners-Plaintiffs (“Petitioners”) commence this hybrid declaratory. action and Article 78 proceeding

Verified Petition-Complaint.pdf
NEW YORK STATE UNITED TEACHERS by its X. President ANDREW PALLOTTA;. UNITED FEDERATION OF TEACHERS, LOCAL 2. by its President MICHAEL ...

DHHS Verified Complaint.pdf
Page 1 of 21. Page 1 of 21. Page 2 of 21. Page 2 of 21. Page 3 of 21. Page 3 of 21. DHHS Verified Complaint.pdf. DHHS Verified Complaint.pdf. Open. Extract.

Towards a Verified Artificial Pancreas - Arizona State University - ASU
4 Department of Computer Science, University of Colorado, Boulder. Abstract. ...... Theoretical Computer Science, 410:4262–4291, 2009. 28. Georgios Fainekos ...

A parallel multigrid Poisson solver for fluids simulation ...
We present a highly efficient numerical solver for the Poisson equation on irregular voxelized domains ... a preconditioner for the conjugate gradient method, which enables the use of a lightweight, purely geometric ..... for transferring data across

A Solver for the Network Testbed Mapping Problem - Flux Research ...
ing an extra node (thus preferring to waste a gigabit in- terface before choosing ...... work experimentation, the primary concern is whether, for example, a node is ...

A Solver for the Network Testbed Mapping Problem - Flux Research ...
As part of this automation, Netbed ...... tions, we compute the average error for each test case. Ideally ... with available physical resources, the goal of these tests.

VOCAL – A Verified OCAml Library - ML Family Workshop
OCaml is the implementation language of systems used worldwide where stability, safety, and correctness are of ... An overview of JML tools and applications.

AP Verified Complaint form old.pdf
Loading… Page 1. Whoops! There was a problem loading more pages. Retrying... AP Verified Complaint form old.pdf. AP Verified Complaint form old.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying AP Verified Complaint form old.pdf.

Towards a Verified Artificial Pancreas: Challenges and ...
MHz 64 bit AMD Phenom(tm) II processor with 8 GB RAM running Linux. .... B. Buckingham, D.M. Wilson, T. Lecher, R. Hanas, K. Kaiserman, and F. Cameron.

VOCAL – A Verified OCAml Library - ML Family Workshop
Libraries are the basic building blocks of any realistic programming project. It is thus of utmost .... verification of object-oriented programs. In 21st International ...

Jigsaw Puzzle Solver (JPS)
N-1}) and connect all pieces in SP into one large piece.” We propose a ..... "Recovery of connection relationships among two- dimensional objects." IPSJ J. 1997.

Verified Complaint 060617 Fillable.pdf
Whoops! There was a problem loading this page. Verified Complaint 060617 Fillable.pdf. Verified Complaint 060617 Fillable.pdf. Open. Extract. Open with.