mios-1.3.0: A Minisat-based SAT solver in Haskell

Safe HaskellTrustworthy
LanguageHaskell2010

SAT.Mios.Clause

Contents

Description

Clause, supporting pointer-based equality

Synopsis

Documentation

data Clause Source #

Fig. 7.(p.11) clause, null, binary clause. This matches both of Clause and GClause in MiniSat TODO: GADTs is better?

Constructors

Clause 

Fields

NullClause 

shrinkClause :: Int -> Clause -> IO () Source #

drop the last N literals in a Clause to eliminate unsatisfied literals

newClauseFromVec :: Bool -> Vec -> IO Clause Source #

copies vec and return a new Clause Since 1.0.100 DIMACS reader should use a scratch buffer allocated statically.

sizeOfClause :: Clause -> IO Int Source #

returns the number of literals in a clause, even if the given clause is a binary clause

Vector of Clause

type ClauseVector = IOVector Clause Source #

Mutable Clause Vector

setNthClause :: ClauseVector -> Int -> Clause -> IO () Source #

sets the nth Clause

swapClauses :: ClauseVector -> Int -> Int -> IO () Source #

swaps the two Clauses