Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
A shrinkable VectorFamily
of Clause
- class ClauseManager a where
- data ClauseExtManager
- pushClauseWithKey :: ClauseExtManager -> Clause -> Lit -> IO ()
- getKeyVector :: ClauseExtManager -> IO Vec
- markClause :: ClauseExtManager -> Clause -> IO ()
- type WatcherList = Vector ClauseExtManager
- newWatcherList :: Int -> Int -> IO WatcherList
- getNthWatcher :: WatcherList -> Lit -> ClauseExtManager
- garbageCollect :: WatcherList -> IO ()
higher level interface for ClauseVector
class ClauseManager a where Source #
resizable clause vector
newManager :: Int -> IO a Source #
numberOfClauses :: a -> IO Int Source #
clearManager :: a -> IO () Source #
shrinkManager :: a -> Int -> IO () Source #
getClauseVector :: a -> IO ClauseVector Source #
pushClause :: a -> Clause -> IO () Source #
Manager with an extra Int (used as sort key or blocking literal)
data ClauseExtManager Source #
Clause + Blocking Literal
pushClauseWithKey :: ClauseExtManager -> Clause -> Lit -> IO () Source #
O(1) inserter
getKeyVector :: ClauseExtManager -> IO Vec Source #
returns the associated Int vector
markClause :: ClauseExtManager -> Clause -> IO () Source #
sets the expire flag to a clause
WatcherList
type WatcherList = Vector ClauseExtManager Source #
Vector of ClauseExtManager
newWatcherList :: Int -> Int -> IO WatcherList Source #
n is the number of Var
, m is default size of each watcher list
| For n vars, we need [0 .. 2 + 2 * n - 1] slots, namely 2 * (n + 1)-length vector
getNthWatcher :: WatcherList -> Lit -> ClauseExtManager Source #
returns the watcher List :: ClauseManager for Literal l
garbageCollect :: WatcherList -> IO () Source #
purges all expirable clauses in WatcherList