UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
UQRuleInstance Class Reference

The UQRuleInstance is a rule which is generated when UQRules are instantiated. More...

#include <UQRuleInstance.h>

Inheritance diagram for UQRuleInstance:
Inheritance graph
[legend]
Collaboration diagram for UQRuleInstance:
Collaboration graph
[legend]

Public Member Functions

 UQRuleInstance (AnonRule const &rule, unordered_set< IDType > const &leftUQVertices, unordered_set< IDType > const &rightUQVertices)
 Creates a new UQRuleInstance from the given AnonRule and with the given sets of universally quantified vertices. More...
 
 UQRuleInstance (string name, AnonHypergraph_sp leftGraph, AnonHypergraph_sp rightGraph, Mapping const &mapping, unordered_set< IDType > const &leftUQVertices, unordered_set< IDType > const &rightUQVertices)
 Creates a new UQRuleInstance from the given rule parts and with the given sets of universally quantified vertices. More...
 
 UQRuleInstance (AnonHypergraph const &graph, unordered_set< IDType > const &uqVertices)
 Creates a new UQRuleInstance which is the identity on the given graph and used the given set as universally quantified vertices. More...
 
virtual ~UQRuleInstance ()
 Destroys this UQRuleInstance.
 
unordered_set< IDType > & getLeftUQVertices ()
 Returns the set of universally quantified vertices of the left-hand side. More...
 
unordered_set< IDType > const & getLeftUQVertices () const
 Returns the set of universally quantified vertices of the left-hand side. More...
 
unordered_set< IDType > & getRightUQVertices ()
 Returns the set of images of universally quantified vertices in the right-hand side. More...
 
unordered_set< IDType > const & getRightUQVertices () const
 Returns the set of images of universally quantified vertices in the right-hand side. More...
 
virtual bool isBackApplicable (AnonHypergraph const &graph, Mapping const &match) const override
 Checks whether this UQRuleInstance is backward applicable or not. More...
 
virtual void fillSplitRule (pair< AnonRule_sp, AnonRule_sp > &rulePair) const override
 
string getName () const
 Returns the name of this rule. More...
 
void setName (string name)
 Sets the name of this rule to the given string. More...
 
AnonHypergraph_sp getLeft ()
 Returns a pointer to the left graph of this rule. More...
 
AnonHypergraph_csp getLeft () const
 Returns a pointer to the left graph of this rule. More...
 
AnonHypergraph_sp getRight ()
 Returns a pointer to the right graph of this rule. More...
 
AnonHypergraph_csp getRight () const
 Returns a pointer to the right graph of this rule. More...
 
void setLeft (AnonHypergraph_sp graph)
 Sets the left graph of this rule to be the given graph. More...
 
void setRight (AnonHypergraph_sp graph)
 Sets the right graph of this rule to be the given graph. More...
 
MappinggetMapping ()
 Returns a reference to the mapping of this rule. More...
 
Mapping const & getMapping () const
 Returns a reference to the mapping of this rule. More...
 
void setMapping (Mapping const &map)
 Replaces the mapping of this rule by the given mapping. More...
 
virtual void fillSplitRule (pair< shared_ptr< AnonRule >, shared_ptr< AnonRule >> &rulePair) const
 Splits this rule into a total and a partial part and stores both subrules in the given pair. More...
 
bool isInjective () const
 Checks and returns true, iff the rule is injective. More...
 
bool isConflictFree (Mapping const &match) const
 Check whether the given match is conflict-free wrt. More...
 
virtual void streamTo (std::ostream &ost) const override
 Streams as string representation of this Streamable object to the given ostream. More...
 

Protected Member Functions

void adjustSplitRule (AnonRule &partial, AnonRule &total) const
 Takes two rules and changes them to be the two split rules of this rule. More...
 

Protected Attributes

unordered_set< IDTypeleftUQVertices
 Stores all universally quantified IDs in the left-hand side.
 
unordered_set< IDTyperightUQVertices
 Stores all images of universally quantified IDs in the right-hand side.
 
string name
 Stores the name of this rule.
 
AnonHypergraph_sp left
 Stores a pointer to the left graph of this rule.
 
AnonHypergraph_sp right
 Stores a pointer to the right graph of this rule.
 
Mapping interface
 Stores the mapping from the left to the right graph of this rule.
 

Friends

class UQRule
 

Detailed Description

The UQRuleInstance is a rule which is generated when UQRules are instantiated.

Contrary to normal Rules, the UQRuleInstance might be not always backward applicable if not the whole neighborhood of unversally quantified nodes are matched.

See Also
UQRule
Author
Jan Stückrath

Constructor & Destructor Documentation

UQRuleInstance ( AnonRule const &  rule,
unordered_set< IDType > const &  leftUQVertices,
unordered_set< IDType > const &  rightUQVertices 
)

Creates a new UQRuleInstance from the given AnonRule and with the given sets of universally quantified vertices.

Parameters
rulethe rule encapsulated (its content is copied) in this UQRuleInstances
leftUQVerticesthe set of all IDs of universally quantified vertices of the left-hand side of the given rule
rightUQVerticesthe set of all images of universally quantified vertices of the left-hand side along the given rule
UQRuleInstance ( string  name,
AnonHypergraph_sp  leftGraph,
AnonHypergraph_sp  rightGraph,
Mapping const &  mapping,
unordered_set< IDType > const &  leftUQVertices,
unordered_set< IDType > const &  rightUQVertices 
)

Creates a new UQRuleInstance from the given rule parts and with the given sets of universally quantified vertices.

Parameters
namethe name of this UQRuleInstance
leftGraphthe left-hand side of this UQRuleInstance
rightGraphthe right-hand side of this UQRuleInstance
mappinga Mapping of the left-hand side to the right-hand side
leftUQVerticesthe set of all IDs of universally quantified vertices of the left-hand side
rightUQVerticesthe set of all images of universally quantified vertices of the left-hand side along the given Mapping
UQRuleInstance ( AnonHypergraph const &  graph,
unordered_set< IDType > const &  uqVertices 
)

Creates a new UQRuleInstance which is the identity on the given graph and used the given set as universally quantified vertices.

Parameters
graphthe graph which will be left- and right-hand side of the UQRuleInstance
uqVerticesthe set of universally quantified vertices of the left- and right-hand side

Member Function Documentation

void adjustSplitRule ( AnonRule partial,
AnonRule total 
) const
protectedinherited

Takes two rules and changes them to be the two split rules of this rule.

The first rule (partial) has to be the identity on the left side of this rule and the second rule (total) has to be a copy of this rule.

Parameters
partialthe identity rule on the left graph of this rule
totala copy of this rule
void fillSplitRule ( pair< shared_ptr< AnonRule >, shared_ptr< AnonRule >> &  rulePair) const
virtualinherited

Splits this rule into a total and a partial part and stores both subrules in the given pair.

The first rule p is the partial rule and the second rule t is the total rule, such that the composition t(p(x)) is the old rule.

Parameters
rulePaira reference to a pair of rule pointer, which will be set to the actual pointer to the split rules
AnonHypergraph_sp getLeft ( )
inherited

Returns a pointer to the left graph of this rule.

Returns
a pointer to the left graph of this rule
AnonHypergraph_csp getLeft ( ) const
inherited

Returns a pointer to the left graph of this rule.

Returns
a pointer to the left graph of this rule
unordered_set< IDType > & getLeftUQVertices ( )

Returns the set of universally quantified vertices of the left-hand side.

Returns
the set of universally quantified vertices of the left-hand side
unordered_set< IDType > const & getLeftUQVertices ( ) const

Returns the set of universally quantified vertices of the left-hand side.

Returns
the set of universally quantified vertices of the left-hand side
Mapping & getMapping ( )
inherited

Returns a reference to the mapping of this rule.

Returns
a reference to the mapping of this rule
Mapping const & getMapping ( ) const
inherited

Returns a reference to the mapping of this rule.

Returns
a reference to the mapping of this rule
string getName ( ) const
inherited

Returns the name of this rule.

Returns
the name of this rule
AnonHypergraph_sp getRight ( )
inherited

Returns a pointer to the right graph of this rule.

Returns
a pointer to the right graph of this rule
AnonHypergraph_csp getRight ( ) const
inherited

Returns a pointer to the right graph of this rule.

Returns
a pointer to the right graph of this rule
unordered_set< IDType > & getRightUQVertices ( )

Returns the set of images of universally quantified vertices in the right-hand side.

Returns
the set of images of universally quantified vertices in the right-hand side
unordered_set< IDType > const & getRightUQVertices ( ) const

Returns the set of images of universally quantified vertices in the right-hand side.

Returns
the set of images of universally quantified vertices in the right-hand side
bool isBackApplicable ( AnonHypergraph const &  graph,
Mapping const &  match 
) const
overridevirtual

Checks whether this UQRuleInstance is backward applicable or not.

It is backward applicable only if all edges in the given graph which are incident to images of universally quantified vertices of the right-hand side are in the matching (i.e. have a preimage in the right-hand side).

Parameters
graphthe graph to which the this instance is matched backwardly
matchthe match to be checked
Returns
true iff the rule is backward applicable

Reimplemented from AnonRule.

bool isConflictFree ( Mapping const &  match) const
inherited

Check whether the given match is conflict-free wrt.

this rule, i.e. there are no two nodes or edges with the same image under the match such that one of these nodes is deleted by the rule and the other is preserved.

Parameters
matchthe match to be checked; it must match all nodes of the left-hand side to some graph (which we do not need to know) return true iff the match is conflict-free wrt. this rule
bool isInjective ( ) const
inherited

Checks and returns true, iff the rule is injective.

A rule is injective if two elements of the left graph are never mapped to the same element of the right graph. Note that a rule need not be total to be injective.

Returns
true, iff the rule is injective
void setLeft ( AnonHypergraph_sp  graph)
inherited

Sets the left graph of this rule to be the given graph.

Caution, the given graph is used directly and not copied. Furthermore, the mapping and right graph are not changed.

Parameters
graphthe new left graph of this rule
void setMapping ( Mapping const &  map)
inherited

Replaces the mapping of this rule by the given mapping.

The given mapping is copied and not used directly.

Parameters
mapthe new mapping of this rule
void setName ( string  name)
inherited

Sets the name of this rule to the given string.

Parameters
namethe new name of this rule
void setRight ( AnonHypergraph_sp  graph)
inherited

Sets the right graph of this rule to be the given graph.

Caution, the given graph is used directly and not copied. Furthermore, the mapping and left graph are not changed.

Parameters
graphthe new right graph of this rule
void streamTo ( std::ostream &  ost) const
overridevirtualinherited

Streams as string representation of this Streamable object to the given ostream.

Parameters
ostthe stream to which the string representation will be written

Implements Streamable.

Reimplemented in Rule.


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