Small Guide to MiniSAT - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Small Guide to MiniSAT

Description:

http://www.cs.chalmers.se/Cs/Research/FormalMethods/MiniSat ... Assumption: malloc produces pointers with least significant bit 0. 26.8.2004. Daniel Kroening ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 12
Provided by: infE
Category:

less

Transcript and Presenter's Notes

Title: Small Guide to MiniSAT


1
Small Guide to MiniSAT
  • Daniel Kroening
  • ETH Zürich

2
Overview MiniSat
  • Winner of 2005 SAT competition
  • Written by two PhD students
  • Available athttp//www.cs.chalmers.se/Cs/Research
    /FormalMethods/MiniSat/Main.html
  • Written in C
  • Only 1954 lines!
  • There is also a C version

3
Niklas Eén
Niklas Sörensson
4
Classes
Solver
GClause
VarOrder
Clause
Heap
Vec
Lit
uses
5
Class vec
  • Re-implementation of STL stdvector
  • There is even a version that uses the STL instead
    of vec

6
Class Lit
  • Obvious implementation of the idea of a literal
  • Variable sign is stored as one integer
  • Sign is the least significant bit
  • Variable number is the rest
  • Several methods to convert/from to Lit

7
Class Clause
  • Stores clauses
  • from original problem
  • that are learnt
  • Array of Lit
  • Integer that encodes
  • size of array
  • bit whether original clause or learnt one
  • Learnt clauses also have an activity value

8
Class GClause
  • Stores either
  • a pointer to a clause
  • a literal
  • Least significant bit of pointerdistinguishes
    both
  • Bit is 1 Literal, rest is the integer from Lit
  • Bit is 0 pointer to clause
  • Assumption malloc produces pointers with least
    significant bit 0

9
Class VarOrder
  • Heuristic for picking the next variable to make a
    decision on
  • Uses Heap to build a priority queue
  • Various activity measures

10
Class Solver
  • About 700 lines
  • Stores
  • the problem clauses
  • the learnt clauses
  • current assignment
  • watched literals
  • assignment stack
  • Methods for
  • Creating variables and clauses
  • Removing clauses

11
Class Solver
  • Main method solve()
  • Actual DPLL search()
  • Unit clause propagation propagate()
  • Conflict analysis analyze()
  • Removal of learnt clauses reduceDB()
Write a Comment
User Comments (0)
About PowerShow.com