101 template <
class Value,
class Key,
class HashFcn,
102 class ExtractKey,
class SetKey,
class EqualKey,
class Alloc>
103 friend class google::sparse_hashtable;
236 static void pstats(
bool reinit=
true);
448 std::cerr <<
"Cannot invert homomorphism : " ;
450 std::cerr << std::endl ;
460 static size_t counter = 0;
497 virtual void print (std::ostream & os)
const = 0;
546 virtual void print (std::ostream & os)
const ;
GHom operator!(const GHom &cond)
A negation/complement constructor for selector homomophisms.
Definition: Hom.cpp:2284
GHom ITE(const GHom &cond, const GHom &iftrue, const GHom &iffalse)
An IF-THEN-ELSE construct.
Definition: Hom.cpp:2274
GHom fixpoint(const GHom &, bool is_top_level=false)
Apply a homomorphism until fixpoint is reached.
Definition: Hom.cpp:2099
GHom operator^(const GDDD &, const GHom &)
Left Concatenation of a constant SDD.
Definition: Hom.cpp:2425
GHom apply2k(const GDDD &)
Apply a 2 level DDD representing a transition relation to current variable.
Definition: Hom.cpp:2437
GHom operator&(const GHom &, const GHom &)
Composition by circ (rond) of homomorphisms.
Definition: Hom.cpp:2363
GHom operator-(const GHom &, const GDDD &)
Set difference.
Definition: Hom.cpp:2433
GHom operator*(const GDDD &, const GHom &)
Intersection with a constant DDD.
Definition: Hom.cpp:2402
bool commutative(const GHom &h1, const GHom &h2)
return true if the provided operations are commutative
Definition: Hom.cpp:1894
GHom operator+(const GHom &, const GHom &)
Composition by union of two homomorphisms.
Definition: Hom.cpp:2394
GDDD computeDomain(int var, const GDDD &)
Return the domain of the first variable bearing the provided index in the provided DDD Useful for inv...
Definition: Hom.cpp:316
This class is the base class representing a Data Decision Diagram.
Definition: DDD.h:49
static const GDDD top
The approximation terminal.
Definition: DDD.h:146
static const GDDD null
The non-accepting terminal.
Definition: DDD.h:143
This class is the base class representing a homomorphism over DDD.
Definition: Hom.h:55
range_t::const_iterator range_it
Definition: Hom.h:178
GHom(_GHom *_h)
THIS VERSION IS DELIBERATELY UNIMPLEMENTED OTHERWISE bad calls like GShom(new myHom()) would promote ...
GDDD eval(const GDDD &d) const
Evaluation function : users should use operator() instead of this.
Definition: Hom.cpp:1971
friend std::ostream & operator<<(std::ostream &os, const GHom &h)
Definition: Hom.cpp:2483
GHom negate() const
returns a negation of a selector homomorphism h, such that h.negate() (d) = d - h(d)
Definition: Hom.cpp:1914
static const range_t full_range
The full_range : that targets everyone.
Definition: Hom.h:182
bool skip_variable(int var) const
Definition: Hom.cpp:1864
static GHom add(const d3::set< GHom >::type &set)
A constructor for a union of several homomorphisms.
Definition: Hom.cpp:1981
static void pstats(bool reinit=true)
Prints some statistics to std::cout.
Definition: Hom.cpp:2452
bool operator<(const GHom &h) const
Total ordering function between Hom.
Definition: Hom.cpp:1860
static void garbage()
For garbage collection.
Definition: Hom.cpp:2023
GHom compose(const GHom &r) const
Definition: Hom.cpp:1906
GDDD operator()(const GDDD &d) const
Evaluation operator.
Definition: Hom.cpp:1941
static unsigned int statistics()
Returns unicity table current size. Gives the number of different _GHom created and not yet destroyed...
Definition: Hom.cpp:2011
friend GHom operator^(const GDDD &, const GHom &)
This is the left concatenantion operator, that adds a constant DDD above the operation.
Definition: Hom.cpp:2425
GHom invert(const GDDD &pot) const
returns the predescessor homomorphism, using pot to determine variable domains
Definition: Hom.cpp:1910
void mark() const
For garbage collection internals. Marks a GHom as in use in garbage collection phase.
Definition: Hom.cpp:2016
GDDD NodeType
Definition: Hom.h:110
GHom()
Default public constructor.
Definition: Hom.h:133
size_t hash() const
For storage in a hash table.
Definition: Hom.h:240
friend GHom operator&(const GHom &, const GHom &)
This operator creates an operation that is the composition of two operations.
Definition: Hom.cpp:2363
friend GHom operator-(const GHom &, const GDDD &)
This is a set difference constructor, only available for (hom - ddd), not hom - hom as that might not...
Definition: Hom.cpp:2433
bool operator!=(const GHom &h) const
Comparison between Homomorphisms.
Definition: Hom.h:165
GDDD has_image(const GDDD &d) const
returns true if and only if h(d) != SDD::null
Definition: Hom.cpp:1960
GHom(const _GHom *_h)
A uncontrolled constructor used in internals.
Definition: Hom.h:114
friend GHom operator*(const GDDD &, const GHom &)
This operator creates an operation that is the intersection of an operation and a constant DDD.
Definition: Hom.cpp:2402
friend GHom fixpoint(const GHom &, bool)
This operator applies its argument to a node until a fixpoint is reached.
Definition: Hom.cpp:2099
bool operator==(const GHom &h) const
Comparison between Homomorphisms.
Definition: Hom.h:161
friend GHom operator+(const GHom &, const GHom &)
This operator creates an operation that is the union of two operations.
Definition: Hom.cpp:2394
friend GHom monotonic(const d3::set< GHom >::type &set)
This operator applies its arguments to a node until a fixpoint is reached.
Definition: Hom.cpp:2260
friend class Hom
Open access to Hom derived class.
Definition: Hom.h:58
bool is_selector() const
This predicate is true if the homomorphism global behavior is only to prune some paths.
Definition: Hom.cpp:2093
const _GHom * concret
The real implementation class.
Definition: Hom.h:108
static GHom ccompose(const d3::set< GHom >::type &set)
A constructor for a commutative composition of several homomorphisms.
Definition: Hom.cpp:1995
static const GHom id
Elementary homomorphism Identity, defined as a constant.
Definition: Hom.h:154
const range_t get_range() const
Returns the range for this homomorphism, i.e. the dual of skip_variable.
Definition: Hom.cpp:1868
int refCounter() const
Accessor to visualize the reference count of the concret instance.
Definition: Hom.cpp:1977
d3::set< int >::type range_t
Definition: Hom.h:177
This is the user interface class to manipulate homomorphisms.
Definition: Hom.h:339
~Hom()
Destructor maintains reference counting.
Definition: Hom.cpp:2069
Hom & operator=(const GHom &)
Overloaded behavior for assignment operator, maintains reference counting.
Definition: Hom.cpp:2084
Unknown function for this class.
Definition: Hom.h:564
The abstract base class for user defined operations.
Definition: Hom.h:520
virtual void print(std::ostream &os) const
pretty print
Definition: Hom.cpp:1841
virtual ~StrongHom()
Default destructor.
Definition: Hom.h:527
virtual GDDD phiOne() const
Evaluation over terminal GDDD::one.
Definition: Hom.h:531
virtual bool operator==(const StrongHom &h) const =0
Comparator is pure virtual. Define a behavior in user homomorphisms.
GDDD eval(const GDDD &) const
The evaluation mechanism of strong homomorphisms.
Definition: Hom.cpp:1811
virtual GHom phi(int var, int val) const =0
Evaluation over an arbitrary arc of a SDD.
StrongHom()
Default constructor.
Definition: Hom.h:524
virtual GDDD has_image(const GDDD &) const
Definition: Hom.cpp:1780
The concrete data class for Homomorphisms.
Definition: Hom.h:390
virtual GHom invert(const GDDD &) const
returns the predescessor homomorphism, using pot to determine variable domains
Definition: Hom.h:441
virtual _GHom * clone() const =0
GDDD eval_skip(const GDDD &) const
Definition: Hom.cpp:1682
virtual bool operator==(const _GHom &h) const =0
Comparator.
size_t creation_counter
Counter of objects created (see constructors).
Definition: Hom.h:410
virtual size_t hash() const =0
Hash key computation.
virtual GHom compose(const GHom &r) const
Definition: Hom.cpp:1621
virtual GDDD has_image(const GDDD &) const
Definition: Hom.cpp:1647
virtual const GHom::range_t get_range() const
The range returns the dual of skip_variable, default implem considers that all variables are affected...
Definition: Hom.h:435
virtual GHom negate() const
returns a negation of a selector homomorphism h, such that h.negate() (d) = d - h(d)
Definition: Hom.cpp:1640
bool operator<(const _GHom &h) const
Ordering between _GHom. It is the chronological ordering of creation.
Definition: Hom.cpp:2448
int refCounter
For garbage collection.
Definition: Hom.h:398
virtual void mark() const
For garbage collection. Used in first phase of garbage collection.
Definition: Hom.h:488
GDDD has_image_skip(const GDDD &) const
Definition: Hom.cpp:1652
virtual void print(std::ostream &os) const =0
static const _GHom * get_concret(const GHom &ghom)
Definition: Hom.h:501
virtual bool is_selector() const
The isSelector predicate indicates a homomorphism that only selects paths in the SDD (no modification...
Definition: Hom.h:429
virtual GDDD eval(const GDDD &) const =0
The computation function responsible for evaluation over a node.
_GHom(int ref=0, bool im=false)
Constructor.
Definition: Hom.h:458
friend class GHom
open access to container class GHom.
Definition: Hom.h:393
bool marking
For garbage collection.
Definition: Hom.h:403
virtual ~_GHom()
Virtual Destructor. Default behavior.
Definition: Hom.h:464
virtual bool skip_variable(int) const
The skip_variable predicate indicates which variables are "don't care" with respect to this SHom.
Definition: Hom.h:422
bool immediat
For operation cache management.
Definition: Hom.h:407
size_t knuth32_hash(size_t key)
Knuth's Multiplicative hash function.
Definition: hashfunc.hh:73
std::set< Key, Compare, Allocator > type
Definition: set.hh:18
bool operator()(const GHom &g1, const GHom &g2) const
Definition: Hom.h:380