Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Basic data types used throughout mios.
- module SAT.Mios.Vec
- type Var = Int
- bottomVar :: Var
- int2var :: Int -> Int
- type Lit = Int
- lit2int :: Lit -> Int
- int2lit :: Int -> Lit
- bottomLit :: Lit
- positiveLit :: Lit -> Bool
- lit2var :: Lit -> Var
- var2lit :: Var -> Bool -> Lit
- negateLit :: Lit -> Lit
- lFalse :: Int
- lTrue :: Int
- lBottom :: Int
- class VarOrder o where
- data CNFDescription = CNFDescription {}
- data MiosConfiguration = MiosConfiguration {}
- defaultConfiguration :: MiosConfiguration
Documentation
module SAT.Mios.Vec
Variable
int2var :: Int -> Int Source #
converts a usual Int as literal to an internal Var
presentation.
>>>
int2var 1
1 -- the first literal is the first variable>>>
int2var 2
2 -- literal @2@ is variable 2>>>
int2var (-2)
2 -- literal @-2@ is corresponding to variable 2
Internal encoded Literal
The literal data has an index
method which converts the literal to
a "small" integer suitable for array indexing. The var
method returns
the underlying variable of the literal, and the sign
method if the literal
is signed (False for x and True for -x).
positiveLit :: Lit -> Bool Source #
returns True
if the literal is positive
var2lit :: Var -> Bool -> Lit Source #
converts a Var
to the corresponing literal.
>>>
var2lit 1 True
2>>>
var2lit 1 False
3>>>
var2lit 2 True
4>>>
var2lit 2 False
5
negateLit :: Lit -> Lit Source #
negates literal
>>>
negateLit 2
3>>>
negateLit 3
2>>>
negateLit 4
5>>>
negateLit 5
4
Assignment on the lifted Bool domain
class VarOrder o where Source #
Assisting ADT for the dynamic variable ordering of the solver.
The constructor takes references to the assignment vector and the activity
vector of the solver. The method select
will return the unassigned variable
with the highest activity.
CNF
data CNFDescription Source #
Misc information on a CNF
CNFDescription | |
|
Solver Configuration
data MiosConfiguration Source #
Solver's parameters; random decision rate was dropped.
MiosConfiguration | |
|
defaultConfiguration :: MiosConfiguration Source #
dafault configuration
- Minisat-1.14 uses
(0.95, 0.999, 0.2 = 20 / 1000)
. - Minisat-2.20 uses
(0.95, 0.999, 0)
. - Gulcose-4.0 uses
(0.8 , 0.999, 0)
. - Mios-1.2 uses
(0.95, 0.999, 0)
.