The PreparedGTS class represents a graph transformation system that was prepared for use in the backward procedure.
More...
#include <PreparedGTS.h>
|
typedef unordered_map< IDType,
Rule_sp > | RuleMap |
| An alias for the map storing standard rules.
|
|
typedef unordered_map< IDType,
UQRule_sp > | UQRuleMap |
| An alias for the map storing universally quantified rules.
|
|
The PreparedGTS class represents a graph transformation system that was prepared for use in the backward procedure.
It is instantiated with a GTS and a RulePreparer object. The standard rules of the GTS are prepared and stored as standard rules of the PreparedGTS. For UQRules, this class provides the uqinst_iterator to iterate over all UQRuleInstances which have to be applied backwards to a given UQRule and graph.
- Author
- Jan Stückrath
- See Also
- graphs::GTS
-
RulePreparer
Creates a Prepared GTS using the given GTS and RulePreparer.
All rules of the given GTS are prepared and all resulting rules added to this PreparedGTS. If optimization is enabled (default), rules are only added if they are no order morphism wrt. to the order used by the RulePreparer (these rules do not produce new results during the backward search). UQRules are not prepared and just copied.
- Parameters
-
gts | the GTS of which the rules will be prepared |
rulePrep | the RulePreparer used for preparation |
opt | if true (default), then order morphisms will not be added to this PreparedGTS |
Adds the given graph to the collection of initial graphs of this GTS.
- Parameters
-
graph | the graph to be added to the initial graphs |
- Returns
- true, iff the graph was added (i.e. it was not null)
Adds the given Rule to the standard rules of this GTS.
- Parameters
-
- Returns
- true, iff the rule was added (i.e. it was not null and not already added before)
Adds the given UQRule to the quantified rules of this GTS.
- Parameters
-
- Returns
- true, iff the rule was added (i.e. it was not null and not already added before)
Creates and returns an iterator, iterating over all UQRuleInstances of the UQRule with the given ID, which need to be applied backward to the given graph.
The number of UQRuleInstance increases exponentially with the complexity of the rule (i.e. the basis is the number of Quantifications) and the size of the graph (the exponent).
- Parameters
-
ruleID | the ID of the UQRule to be instantiated |
graph | the graph to which the UQRule should be applied backwards to |
- Returns
- an iterator, enumerating all necessary instances of the UQRule
void createInstancesUpTo |
( |
IDType const & |
ruleID, |
|
|
size_t |
bound |
|
) |
| |
|
protected |
Creates and stores all UQRuleInstances for the given UQRule up to the given bound.
The generated UQRuleInstances are stored in uqRuleInstances and indexed by uqRuleLengths.
- Parameters
-
ruleID | the ID of the UQRule to be instantiated |
bound | the size up to which instances should be generated |
size_t getInitialCount |
( |
| ) |
const |
|
inherited |
Returns the number of initial graphs of this GTS.
- Returns
- the number of initial graphs of this GTS
vector< shared_ptr< Hypergraph > > const & getInitialGraphs |
( |
| ) |
const |
|
inherited |
Returns a reference to the collection of initial graphs of this GTS.
- Returns
- a reference to the collection of initial graphs of this GTS
Returns the name of this GTS.
- Returns
- the name of this GTS
Creates a new collection which contains all original rules from which the prepared rule with the given ID could have been generated from.
- Parameters
-
id | the ID of the prepared rule |
- Returns
- the collection of original rules
size_t getStdRuleCount |
( |
| ) |
const |
|
inherited |
Returns the number of standard rules stored in this GTS.
- Returns
- the number of standard rules stored in this GTS
unordered_map< IDType, shared_ptr< Rule > > const & getStdRules |
( |
| ) |
const |
|
inherited |
Returns a reference to the standard rules of this GTS.
- Returns
- a reference to the standard rules of this GTS
size_t getUQRuleCount |
( |
| ) |
const |
|
inherited |
Returns the number of universally quantified rules stored in this GTS.
- Returns
- the number of quantified rules of this GTS
unordered_map< IDType, UQRule_sp > const & getUQRules |
( |
| ) |
const |
|
inherited |
Returns a reference to the universally quantified rules of this GTS.
- Returns
- a reference to the quantified rules of this GTS
void streamTo |
( |
std::ostream & |
ost | ) |
const |
|
virtualinherited |
Prints a string representation of this GTS to the given steam.
- Parameters
-
ost | the stream on which the string will be printed |
Implements Streamable.
Stores for every new (prepared) rule the ID of the original rules from which it was prepared.
Note that a prepared rule may have multiple original rules from which it was generated, even if these rules where not isomorphic.
unordered_map<IDType, vector<size_t> > uqRuleLengths |
|
protected |
For each ID of a UQRule (key) this map stores a vector of positions (value).
The i-th value in the vector is the first position in the corresponding vector of uqRuleInstances (with the same UQRule ID) where the length of the instantiation is i.
The documentation for this class was generated from the following files:
- /home/stueckrath/eclipse_ws/Uncover/src/analysis/PreparedGTS.h
- /home/stueckrath/eclipse_ws/Uncover/src/analysis/PreparedGTS.cpp