DDD  1.9.0.20240826145154
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
_setVarConst Class Reference
Inheritance diagram for _setVarConst:
Inheritance graph
Collaboration diagram for _setVarConst:
Collaboration graph

Public Member Functions

 _setVarConst (int vr, int vl)
 
bool skip_variable (int vr) const
 The skip_variable predicate indicates which variables are "don't care" with respect to this SHom. More...
 
const GHom::range_t get_range () const
 The range returns the dual of skip_variable, default implem considers that all variables are affected by this homomorphism. More...
 
GDDD phiOne () const
 Evaluation over terminal GDDD::one. More...
 
GHom phi (int vr, int vl) const
 Evaluation over an arbitrary arc of a SDD. More...
 
GHom invert (const GDDD &potall) const
 returns the predescessor homomorphism, using pot to determine variable domains More...
 
size_t hash () const
 Hash key computation. More...
 
void print (std::ostream &os) const
 pretty print More...
 
bool operator== (const StrongHom &s) const
 Comparator is pure virtual. Define a behavior in user homomorphisms. More...
 
_GHomclone () const
 
bool operator== (const _GHom &h) const
 Comparator for unicity table. More...
 
GDDD eval (const GDDD &) const
 The evaluation mechanism of strong homomorphisms. More...
 
virtual GDDD has_image (const GDDD &) const
 
GDDD has_image_skip (const GDDD &) const
 
virtual bool is_selector () const
 The isSelector predicate indicates a homomorphism that only selects paths in the SDD (no modifications, no additions) Tagging with isSelector() allows to enable optimizations and makes the homomorphism eligible as "condition" in ITE construct. More...
 
bool operator< (const _GHom &h) const
 Ordering between _GHom. It is the chronological ordering of creation. More...
 
virtual void mark () const
 For garbage collection. Used in first phase of garbage collection. More...
 
virtual GHom negate () const
 returns a negation of a selector homomorphism h, such that h.negate() (d) = d - h(d) More...
 
virtual GHom compose (const GHom &r) const
 

Static Public Member Functions

static const _GHomget_concret (const GHom &ghom)
 

Private Member Functions

GDDD eval_skip (const GDDD &) const
 

Private Attributes

int var
 
int val
 
int refCounter
 For garbage collection. More...
 
bool marking
 For garbage collection. More...
 
bool immediat
 For operation cache management. More...
 
size_t creation_counter
 Counter of objects created (see constructors). More...
 

Constructor & Destructor Documentation

◆ _setVarConst()

_setVarConst::_setVarConst ( int  vr,
int  vl 
)
inline

Referenced by clone().

Member Function Documentation

◆ clone()

_GHom* _setVarConst::clone ( ) const
inlinevirtual

Implements _GHom.

References _setVarConst().

◆ compose()

GHom _GHom::compose ( const GHom r) const
virtualinherited

Reimplemented in _VarCompVar, and _VarCompState.

References GHom::id, and GDDD::null.

Referenced by _VarCompState::compose(), _VarCompVar::compose(), and GHom::compose().

◆ eval()

GDDD StrongHom::eval ( const GDDD d) const
virtualinherited

The evaluation mechanism of strong homomorphisms.

Evaluation is defined as :

Let an SDD d= (var, Union_i (val_i, d_i) )

h (d) = Sum_i ( phi(var, val_i) (d_i) )

Implements _GHom.

References DED::add(), GDDD::begin(), GDDD::end(), GDDD::null, GDDD::one, StrongHom::phi(), StrongHom::phiOne(), GDDD::top, and GDDD::variable().

◆ eval_skip()

GDDD _GHom::eval_skip ( const GDDD d) const
privateinherited

◆ get_concret()

static const _GHom* _GHom::get_concret ( const GHom ghom)
inlinestaticinherited

◆ get_range()

const GHom::range_t _setVarConst::get_range ( ) const
inlinevirtual

The range returns the dual of skip_variable, default implem considers that all variables are affected by this homomorphism.

Reimplemented from _GHom.

References var.

◆ has_image()

GDDD StrongHom::has_image ( const GDDD d) const
virtualinherited

◆ has_image_skip()

GDDD _GHom::has_image_skip ( const GDDD d) const
inherited

◆ hash()

size_t _setVarConst::hash ( ) const
inlinevirtual

Hash key computation.

It is essential for good hash table operation that the spread of the keys be as good as possible. Also, fast hash key computation is a good design goal. Note that bad hash functions will yield more collisions, thus equality comparisons which may be quite costly.

Implements _GHom.

References ddd::int32_hash(), val, and var.

◆ invert()

GHom _setVarConst::invert ( const GDDD ) const
inlinevirtual

returns the predescessor homomorphism, using pot to determine variable domains

Reimplemented from _GHom.

References GHom::add(), GDDD::begin(), computeDomain(), GDDD::end(), setVarConst(), val, var, and varEqState().

◆ is_selector()

virtual bool _GHom::is_selector ( ) const
inlinevirtualinherited

The isSelector predicate indicates a homomorphism that only selects paths in the SDD (no modifications, no additions) Tagging with isSelector() allows to enable optimizations and makes the homomorphism eligible as "condition" in ITE construct.

Reimplemented in _VarCompVar, _VarCompState, Fixpoint, Minus, And, Compose, Monotonic, Add, NotCond, Inter, Mult, DomExtract, Constant, and Identity.

Referenced by _GHom::invert(), and GHom::is_selector().

◆ mark()

virtual void _GHom::mark ( ) const
inlinevirtualinherited

For garbage collection. Used in first phase of garbage collection.

Reimplemented in MLHomAdapter, Fixpoint, Minus, RightConcat, LeftConcat, And, Compose, Monotonic, Add, NotCond, Inter, Mult, Apply2k, and Constant.

Referenced by GHom::mark().

◆ negate()

GHom _GHom::negate ( ) const
virtualinherited

returns a negation of a selector homomorphism h, such that h.negate() (d) = d - h(d)

Reimplemented in _VarCompState, And, Add, NotCond, Inter, Constant, and Identity.

References _GHom::GHom.

Referenced by GHom::negate().

◆ operator<()

bool _GHom::operator< ( const _GHom h) const
inherited

Ordering between _GHom. It is the chronological ordering of creation.

References _GHom::creation_counter.

◆ operator==() [1/2]

bool StrongHom::operator== ( const _GHom h) const
virtualinherited

Comparator for unicity table.

Users should not use this. The behavior is to check for type mismatch (and return false if that is the case) or call specialized comparators of derived subclasses otherwise.

Implements _GHom.

◆ operator==() [2/2]

bool _setVarConst::operator== ( const StrongHom h) const
inlinevirtual

Comparator is pure virtual. Define a behavior in user homomorphisms.

Implements StrongHom.

References val, and var.

◆ phi()

GHom _setVarConst::phi ( int  var,
int  val 
) const
inlinevirtual

Evaluation over an arbitrary arc of a SDD.

Parameters
varthe index of the variable labeling the node.
valthe value labeling the arc.
Returns
a homomorphism to apply on the successor node

Implements StrongHom.

References _GHom::GHom, GHom::id, val, and var.

◆ phiOne()

GDDD _setVarConst::phiOne ( ) const
inlinevirtual

Evaluation over terminal GDDD::one.

Returns a constant DDD. A homomorphism that does not overload phiOne does not expect to meet the terminal during it's evaluation, therefore default behavior returns GDDD::top

Reimplemented from StrongHom.

References GDDD::one.

◆ print()

void _setVarConst::print ( std::ostream &  os) const
inlinevirtual

pretty print

Reimplemented from StrongHom.

References GDDD::getvarName(), val, and var.

◆ skip_variable()

bool _setVarConst::skip_variable ( int  ) const
inlinevirtual

The skip_variable predicate indicates which variables are "don't care" with respect to this SHom.

This is defined as a StrongHom with : phi(var,val) { if ( skip_variable(var) ) return GShom( var, val, this ); else { real behavior } }

Reimplemented from _GHom.

References var.

Member Data Documentation

◆ creation_counter

size_t _GHom::creation_counter
privateinherited

Counter of objects created (see constructors).

This is used for the ordering between homomorphisms.

Referenced by _GHom::_GHom(), and _GHom::operator<().

◆ immediat

bool _GHom::immediat
mutableprivateinherited

For operation cache management.

If immediat==true, eval is called without attempting a cache hit. Currently only the constant homomorphism has this attribute set to true.

Referenced by GHom::operator()().

◆ marking

bool _GHom::marking
mutableprivateinherited

For garbage collection.

Used in the two phase garbage collection process. A Hom that is not marked after the first pass over the unicity table, will be sweeped in the second phase. Outside of garbage collection routine, marking should always bear the value false.

Referenced by GHom::garbage(), and GHom::mark().

◆ refCounter

int _GHom::refCounter
mutableprivateinherited

For garbage collection.

Counts the number of times a _GShom is referenced from the context of an Shom.

Referenced by Hom::Hom(), Hom::operator=(), GHom::refCounter(), and Hom::~Hom().

◆ val

int _setVarConst::val
private

Referenced by hash(), invert(), operator==(), phi(), and print().

◆ var

int _setVarConst::var
private

The documentation for this class was generated from the following file:

Please comment this page and report errors about it on the RefDocComments page.
Generated on Mon Aug 26 2024 14:54:00 for DDD by doxygen 1.9.1