BaseBDDFactory

onera.pmlanalyzer.views.interference.model.formalisation.BaseBDDFactory
trait BaseBDDFactory[Var, MyBDD <: BDD]

base trait for BDD factories

Attributes

MyBDD

the BDD representation which must be a subtype of JavaBDD type

Var

the type of variable labelled on BDD nodes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Value members

Abstract methods

def andBDD(left: MyBDD, right: MyBDD): MyBDD

BDD AND

BDD AND

Attributes

left

BDD

right

BDD

Returns:

the resulting BDD

def dispose(): Unit

Free native data structure if exists

Free native data structure if exists

Attributes

def getIthVar(i: Int): MyBDD

Return the ith BDD node in the table

Return the ith BDD node in the table

Attributes

i

the index of the BDD node

Returns:

BDD node

def getVar(variable: Var): MyBDD

Produce a BDD node labelled with a given variable

Produce a BDD node labelled with a given variable

Attributes

variable

the variable

Returns:

a BDD node

def getVarMap: Map[MyBDD, Var]

Attributes

Returns:

the mapping from BDD to labelled variable

def initFactory(numberOfVar: Int, cacheSize: Int): BDDFactory

initialisation of the cache and number of node of the factory

initialisation of the cache and number of node of the factory

Attributes

cacheSize

initial size of the cache table containing BDD nodes

numberOfVar

maximum number of variables in BDDs

def mkNode(variable: Var, high: MyBDD, low: MyBDD): MyBDD

Build a MDDNode labelled by a variable where the high and low sons are given

Build a MDDNode labelled by a variable where the high and low sons are given

Attributes

high

the high son

low

the low son

variable

the variable labelling the BDD

Returns:

the resulting BDD

def notBDD(arg: MyBDD): MyBDD

BDD negation

BDD negation

Attributes

arg

initial BDD

Returns:

negated BDD

def one(): MyBDD

Return the one terminal

Return the one terminal

Attributes

Returns:

one terminal

def orBDD(left: MyBDD, right: MyBDD): MyBDD

BDD OR

BDD OR

Attributes

left

BDD

right

BDD

Returns:

the resulting BDD

def replaceVar(replace: Var, by: Var, in: MyBDD): MyBDD

Replace all BDD nodes labelled by a given to variable to another one

Replace all BDD nodes labelled by a given to variable to another one

Attributes

by

the new variable

in

the BDD

replace

the initial variable to replace

Returns:

the modified BDD

def reset(): Unit

Clean the cache and the index table

Clean the cache and the index table

Attributes

def zero(): MyBDD

Return the zero terminal

Return the zero terminal

Attributes

Returns:

zero terminal

Concrete methods

def andBDD(s: Iterable[MyBDD]): MyBDD

n-ary BDD and

n-ary BDD and

Attributes

s

set of BDD

Returns:

the resulting BDD

def importBDD[OtherBDD <: BDD](bdd: OtherBDD, bddVar: Map[Var, OtherBDD]): MyBDD

Import a BDD in this factory from one coming from another factory

Import a BDD in this factory from one coming from another factory

Attributes

OtherBDD

the type of the other BDD

bdd

the other factory BDD

bddVar

the map from BDD node to variables

Returns:

the BDD imported in this factory

def mkExactlyK(vs: Seq[Var], k: Int): MyBDD

Exactly k elements out of an ordered sequence of variables

Exactly k elements out of an ordered sequence of variables

Attributes

k

the number of variables that must be true

vs

the ordered sequence of variables

Returns:

the resulting BDD

def mkImplies(left: MyBDD, right: MyBDD): MyBDD

BDD implication

BDD implication

Attributes

left

BDD

right

BDD

Returns:

the resulting BDD

def orBDD(s: Iterable[MyBDD]): MyBDD

n-ary BDD or

n-ary BDD or

Attributes

s

the set of BDD

Returns:

the resulting BDD