This class implements the Hypergraph Minor Ordering, as described in "Applying the Graph Minor
Theorem to the Verification of Graph Transformation Systems" (Salil Joshi, Barbara König).
More...
#include <MinorOrder.h>
|
bool | checkContractions (graphs::Hypergraph const &graphB, graphs::Mapping const &nodeMap, graphs::Mapping::Inversion const &invNodeMap, unordered_set< IDType > const &preservedEdges, int isoNodes) const |
| Checks if edges of the given graph can be contracted to obtain a smaller graph. More...
|
|
bool | generateMapp (graphs::Hypergraph const &graphS, graphs::Hypergraph const &graphB, map< string, vector< IDType >> const &edgeMapS, map< string, vector< IDType >> const &edgeMapB, vector< pair< string, vector< size_t >>> const &edgesToEdges, graphs::Mapping &nodeMap, unordered_set< IDType > &preservedEdges) const |
| Given a mapping of edges of graphS to edges of graphB, this method generates a Mapping of node IDs of graphB to node IDs of graphS induced by the edge map (storing it in nodeMap). More...
|
|
void | reset (vector< size_t > &vec, size_t numCount) const |
| Clears the given vector and fills it with the numbers from 0 to numCount-1. More...
|
|
bool | inc (vector< pair< string, vector< size_t >>> &vec, map< string, vector< IDType >> &posTargets) const |
| Increments the given vector such that it represents the next possible mapping of edges of the smaller graph to edges of the larger graph. More...
|
|
bool | inc (vector< size_t > &vec, size_t tarCount) const |
| Increments the given vector such that it consists of the next sequence of distinct values between 0 and tarCount-1. More...
|
|
bool | inc (vector< basic_types::IDPartitionEnumerator > &enums, size_t pos) const |
| Increments the given vector ignoring the first pos indices. More...
|
|
size_t | findFirst (vector< size_t > const &vec, size_t tofind) const |
| Finds the occurrence of toFinde with the least index in the vector. More...
|
|
bool | isFiner (basic_types::IDPartition const &part, graphs::Mapping const &mapp) const |
| Checks if the given partition is finer that the partition induced by the Mapping. More...
|
|
bool | isIncludedIn (basic_types::IDPartition const &part, graphs::Mapping::Inversion const &mapp) const |
| Checks if the given partition is included in the inverse Mapping. More...
|
|
bool | enoughIsolated (basic_types::IDPartition const &part, graphs::Mapping const &mapp, int num) const |
| Checks if the given partition has enough subpartitions to be mapped to isolated nodes. More...
|
|
This class implements the Hypergraph Minor Ordering, as described in "Applying the Graph Minor
Theorem to the Verification of Graph Transformation Systems" (Salil Joshi, Barbara König).
- Author
- Jan Stückrath
Checks if edges of the given graph can be contracted to obtain a smaller graph.
The smaller graph is implicitly given by the Mapping and Mapping::Inversion parameters.
- Parameters
-
graphB | the graph of which edge contractions are simulated |
nodeMap | the map of nodes of graphB to the smaller graph |
invNodeMap | the inversion of nodeMap |
preservedEdges | the set of all IDs of edges of graphB which have an image in the smaller graph |
isoNodes | the number of isolated nodes, the smaller graph has more than graphB (may be negative) |
- Returns
- true iff the smaller graph can be generated from graphB by contraction of edges
Checks if the given partition has enough subpartitions to be mapped to isolated nodes.
Such a mapping is possible if all elements of a subpartition do not have an image under the Mapping. The number of subpartitions necessary is given by num.
- Parameters
-
part | the partition to be tested |
mapp | a Mapping of all nodes which are incident to edges which are mapped to the smaller graph |
num | the number of isolated nodes the smaller graph has more than the larger graph (may be negative) |
- Returns
- true, iff enough subpartitions exist
size_t findFirst |
( |
vector< size_t > const & |
vec, |
|
|
size_t |
tofind |
|
) |
| const |
|
inlineprivate |
Finds the occurrence of toFinde with the least index in the vector.
If none could be found, vec.size() is returned.
- Parameters
-
vec | the vector to be searched |
tofind | the element to be found |
- Returns
- the least index of the element of vec.size() if none was found
Given a mapping of edges of graphS to edges of graphB, this method generates a Mapping of node IDs of graphB to node IDs of graphS induced by the edge map (storing it in nodeMap).
Additionally all edge IDs in graphB used for this Mapping are stored in preservedEdges. If it is not possible to generate a Mapping from the given data, this function returns false.
- Parameters
-
graphS | the smaller graph |
graphB | the larger graph |
edgeMapS | a map where the keys are labels of edges in graphS and values are the collection of edge IDs of graphS with this label |
edgeMapB | a map where the keys are labels of edges in graphS(!) and values are the collection of edge IDs of graphB with this label |
edgesToEdges | a vector of pairs where the first element is a label and the second a vector defining that the i-th edge in edgeMapS with that label is mapped to the edgesToEdges[i]-th edge in edgeMapB with that label |
nodeMap | the mapping of nodes to nodes, generated by this method is stored in this parameter |
preservedEdges | the IDs of edges of graphB used to generate the node map are stored in this parameter |
- Returns
- true, iff it is possible to generate a node Mapping
bool inc |
( |
vector< pair< string, vector< size_t >>> & |
vec, |
|
|
map< string, vector< IDType >> & |
posTargets |
|
) |
| const |
|
private |
Increments the given vector such that it represents the next possible mapping of edges of the smaller graph to edges of the larger graph.
- Parameters
-
vec | the vector which will be "incremented" |
posTargets | a mapping of labels of the larger graph to IDs of edges with this labels |
- Returns
- true, iff the incrementation was possible (false if all possible incrementations have been performed)
bool inc |
( |
vector< size_t > & |
vec, |
|
|
size_t |
tarCount |
|
) |
| const |
|
private |
Increments the given vector such that it consists of the next sequence of distinct values between 0 and tarCount-1.
- Parameters
-
vec | the vector which will be "incremented" |
tarCount | the vector will only consist of (distinct) values between 0 and tarCount-1 |
- Returns
- true, iff the incrementation was possible (false if all possible incrementations have been performed)
Increments the given vector ignoring the first pos indices.
The enumerator at the index pos is incremented and possibly also higher indices if the enumerator has ended. Enumerators at indices before pos are reset.
- Parameters
-
enums | the vector of enumerators which will be incremented |
pos | the number of indices ignored (beginning from 0) |
- Returns
- true, iff the incrementation was possible (false if all possible incrementations have been performed)
Checks if the given partition is finer that the partition induced by the Mapping.
The partition is finer iff, whenever two elements are in the same subpartition, they have the same image under the Mapping. IDs without images under the Mapping are ignored.
- Parameters
-
part | the partition to be tested |
mapp | the Mapping to be tested |
- Returns
- true iff the partition is finer (or equally fine)
Checks if the given partition is included in the inverse Mapping.
A partition is included in an inverse Mapping iff, whenever two IDs have the same image under the Mapping, both IDs are in the same subpartition.
- Parameters
-
part | the partition to be tested |
mapp | the inverse Mapping to be tested |
- Returns
- true, iff the partition is included in the inverse Mapping
Checks whether the first given graph is a minor of the second.
- Parameters
-
smaller | the possible minor |
bigger | the possibly larger graph |
- Returns
- true iff the first graph is a minor of the second
Implements Order.
void reset |
( |
vector< size_t > & |
vec, |
|
|
size_t |
numCount |
|
) |
| const |
|
inlineprivate |
Clears the given vector and fills it with the numbers from 0 to numCount-1.
- Parameters
-
vec | the vector to be reset |
numCount | the number of elements added to the vector |
The documentation for this class was generated from the following files:
- /home/stueckrath/eclipse_ws/Uncover/src/minors/MinorOrder.h
- /home/stueckrath/eclipse_ws/Uncover/src/minors/MinorOrder.cpp