UnCoVer (Using Coverability for Verification)
|
The UQRuleInstance is a rule which is generated when UQRules are instantiated. More...
#include <UQRuleInstance.h>
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... | |
Mapping & | getMapping () |
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< IDType > | leftUQVertices |
Stores all universally quantified IDs in the left-hand side. | |
unordered_set< IDType > | rightUQVertices |
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 |
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.
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.
rule | the rule encapsulated (its content is copied) in this UQRuleInstances |
leftUQVertices | the set of all IDs of universally quantified vertices of the left-hand side of the given rule |
rightUQVertices | the 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.
name | the name of this UQRuleInstance |
leftGraph | the left-hand side of this UQRuleInstance |
rightGraph | the right-hand side of this UQRuleInstance |
mapping | a Mapping of the left-hand side to the right-hand side |
leftUQVertices | the set of all IDs of universally quantified vertices of the left-hand side |
rightUQVertices | the 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.
graph | the graph which will be left- and right-hand side of the UQRuleInstance |
uqVertices | the set of universally quantified vertices of the left- and right-hand side |
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.
partial | the identity rule on the left graph of this rule |
total | a copy of this rule |
|
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.
rulePair | a reference to a pair of rule pointer, which will be set to the actual pointer to the split rules |
|
inherited |
Returns a pointer to the left graph of this rule.
|
inherited |
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.
unordered_set< IDType > const & getLeftUQVertices | ( | ) | const |
Returns the set of universally quantified vertices of the left-hand side.
|
inherited |
Returns a reference to the mapping of this rule.
|
inherited |
Returns a reference to the mapping of this rule.
|
inherited |
Returns the name of this rule.
|
inherited |
Returns a pointer to the right graph of this rule.
|
inherited |
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.
unordered_set< IDType > const & getRightUQVertices | ( | ) | const |
Returns the set of images of universally quantified vertices in the right-hand side.
|
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).
graph | the graph to which the this instance is matched backwardly |
match | the match to be checked |
Reimplemented from AnonRule.
|
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.
match | the 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 |
|
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.
|
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.
graph | the new left graph of this rule |
|
inherited |
Replaces the mapping of this rule by the given mapping.
The given mapping is copied and not used directly.
map | the new mapping of this rule |
|
inherited |
Sets the name of this rule to the given string.
name | the new name of this rule |
|
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.
graph | the new right graph of this rule |
|
overridevirtualinherited |
Streams as string representation of this Streamable object to the given ostream.
ost | the stream to which the string representation will be written |
Implements Streamable.
Reimplemented in Rule.