Click or drag to resize

PatternGraph Class

Representation of the pattern to search for, containing nested alternative, iterated, negative, and independent-patterns, plus references to the rules of the used subpatterns. Accessible via IPatternGraph as meta information to the user about the matching action. Skeleton data structure for the matcher generation pipeline which stores intermediate results here, which saves us from representing the nesting structure again and again in the pipeline's data structures
Inheritance Hierarchy
SystemObject
  de.unika.ipd.grGen.lgspPatternGraph

Namespace: de.unika.ipd.grGen.lgsp
Assembly: lgspBackend (in lgspBackend.dll) Version: GrGen.NET 7.1
Syntax
C#
public class PatternGraph : IPatternGraph, 
	INamed

The PatternGraph type exposes the following members.

Constructors
 NameDescription
Public methodPatternGraph(PatternGraph, PatternGraphEmbedding, PatternGraph, String, DictionaryPatternNode, PatternNode, DictionaryPatternEdge, PatternEdge, DictionaryPatternVariable, PatternVariable) Instantiates a new PatternGraph object as a copy from an original pattern graph, used for inlining. We create the inlined elements as clones from the original stuff so a maybe already done inlining pass inside a subpattern does not influence us when we inline that subpattern.
Public methodPatternGraph(String, PatternNode, PatternEdge, PatternCondition, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, INode, IEdge) Constructs a PatternGraph object (when it is to be constructed from a graph object, for graph equality checking).
Public methodPatternGraph(String, String, String, String, Boolean, Boolean, PatternNode, PatternEdge, PatternVariable, PatternGraphEmbedding, Alternative, Iterated, PatternGraph, PatternGraph, PatternCondition, PatternYielding, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean) Constructs a PatternGraph object.
Top
Properties
 NameDescription
Public propertyAlternatives An array of alternatives, each alternative contains in its cases the subpatterns to choose out of.
Public propertyEdges An array of all pattern edges.
Public propertyEmbeddedGraphs An array with subpattern embeddings, i.e. subpatterns and the way they are connected to the pattern
Public propertyEmbeddingGraph The pattern graph which contains this pattern graph, null if this is a top-level-graph
Public propertyHomomorphicEdges A two-dimensional array describing which pattern edge may be matched non-isomorphic to which pattern edge.
Public propertyHomomorphicEdgesGlobal A two-dimensional array describing which pattern edge may be matched non-isomorphic to which pattern edge globally, i.e. the edges are contained in different, but locally nested patterns (alternative cases, iterateds).
Public propertyHomomorphicNodes A two-dimensional array describing which pattern node may be matched non-isomorphic to which pattern node.
Public propertyHomomorphicNodesGlobal A two-dimensional array describing which pattern node may be matched non-isomorphic to which pattern node globally, i.e. the nodes are contained in different, but locally nested patterns (alternative cases, iterateds).
Public propertyIndependentPatternGraphs An array of independent pattern graphs which must get matched in addition to the main pattern (PACs - Positive Application Conditions).
Public propertyIterateds An array of iterateds, each iterated is matched as often as possible within the specified bounds.
Public propertyName The name of the pattern graph
Public propertyNegativePatternGraphs An array of negative pattern graphs which make the search fail if they get matched (NACs - Negative Application Conditions).
Public propertyNodes An array of all pattern nodes.
Public propertyPackage null if this is a global pattern graph, otherwise the package the pattern graph is contained in.
Public propertyPackagePrefixedName The name of the pattern graph in case of a global type, the name of the pattern graph is prefixed by the name of the package otherwise (package "::" name).
Public propertyPatternElements An enumerable over all pattern elements.
Public propertyTotallyHomomorphicEdges A one-dimensional array telling which pattern edge is to be matched non-isomorphic against any other edge.
Public propertyTotallyHomomorphicNodes A one-dimensional array telling which pattern node is to be matched non-isomorphic against any other node.
Public propertyVariables An array of all pattern variables.
Top
Methods
 NameDescription
Public methodAdaptToMaybeNull 
Public methodDumpInlined 
Public methodDumpOriginal 
Public methodExplain 
Public methodExplainNested 
Public methodGetPatternElement Returns the pattern element with the given name if it is available, otherwise null.
Public methodGetSource(IPatternEdge) Returns the source pattern node of the given edge, null if edge dangles to the left
Public methodGetSource(PatternEdge) Returns the source pattern node of the given edge, null if edge dangles to the left.
Public methodGetSourcePlusInlined Returns the source pattern node of the given edge, null if edge dangles to the left. Taking inlined stuff into account.
Public methodGetTarget(IPatternEdge) Returns the target pattern node of the given edge, null if edge dangles to the right
Public methodGetTarget(PatternEdge) Returns the target pattern node of the given edge, null if edge dangles to the right.
Public methodGetTargetPlusInlined Returns the target pattern node of the given edge, null if edge dangles to the right. Taking inlined stuff into account.
Public methodIsRefEntityExisting 
Public methodPatchUsersOfCopiedElements 
Public methodPrepareInline Copies all the elements in the pattern graph to the XXXPlusInlined attributes. This duplicates the pattern, the duplicate is used for the computing and emitting the real code, whereas the original version is retained as interface to the user (and used in generating the match building). When subpatterns/embedded graphs get inlined, only the duplicate is changed.
Public methodRevertMaybeNullAdaption 
Public methodWasInlinedHere 
Top
Fields
 NameDescription
Public fieldalternatives An array of alternatives, each alternative contains in its cases the subpatterns to choose out of.
Public fieldalternativesPlusInlined An array of all alternatives plus the alternatives inlined into this pattern.
Public fieldavailabilityOfMaybeNullElements For each schedule the availability of the maybe null presets - true if is available, false if not Empty dictionary if there are no maybe null action preset elements
Public fieldbranchingFactor Larger than 1 if and only if this rule is to be parallelized, giving the branching factor to apply
Public fieldConditions The conditions used in this pattern graph or it's nested graphs
Public fieldConditionsPlusInlined An array of all conditions plus the conditions inlined into this pattern.
Public fieldcorrespondingEdges Normally null. In case this is a pattern created from a graph, an array of all edges which created the pattern edges in edges, coupled by position.
Public fieldcorrespondingNodes Normally null. In case this is a pattern created from a graph, an array of all nodes which created the pattern nodes in nodes, coupled by position.
Public fieldedges An array of all pattern edges.
Public fieldedgesPlusInlined An array of all pattern edges plus the edges inlined into this pattern.
Public fieldedgeToSourceNode Contains the source node of the pattern edges in this graph if specified.
Public fieldedgeToSourceNodePlusInlined Contains the source node of the pattern edges in this graph if specified. Plus the additional information from inlined stuff.
Public fieldedgeToTargetNode Contains the target node of the pattern edges in this graph if specified.
Public fieldedgeToTargetNodePlusInlined Contains the target node of the pattern edges in this graph if specified. Plus the additional information from inlined stuff.
Public fieldembeddedGraphs An array with subpattern embeddings, i.e. subpatterns and the way they are connected to the pattern
Public fieldembeddedGraphsPlusInlined An array of all embedded graphs plus the embedded graphs inlined into this pattern.
Public fieldembeddingGraph The pattern graph which contains this pattern graph, null if this is a top-level-graph
Public fieldhomomorphicEdges A two-dimensional array describing which pattern edge may be matched non-isomorphic to which pattern edge. Including the additional information from inlined stuff (is extended during inlining).
Public fieldhomomorphicEdgesGlobal A two-dimensional array describing which pattern edge may be matched non-isomorphic to which pattern edge globally, i.e. the edges are contained in different, but locally nested patterns (alternative cases, iterateds). Including the additional information from inlined stuff (is extended during inlining).
Public fieldhomomorphicNodes A two-dimensional array describing which pattern node may be matched non-isomorphic to which pattern node. Including the additional information from inlined stuff (is extended during inlining).
Public fieldhomomorphicNodesGlobal A two-dimensional array describing which pattern node may be matched non-isomorphic to which pattern node globally, i.e. the nodes are contained in different, but locally nested patterns (alternative cases, iterateds). Including the additional information from inlined stuff (is extended during inlining).
Public fieldindependentPatternGraphs An array of independent pattern graphs which must get matched in addition to the main pattern (PACs - Positive Application Conditions).
Public fieldindependentPatternGraphsPlusInlined An array of all independent pattern graphs plus the pattern graphs inlined into this pattern.
Public fieldisDefEntityExisting Tells whether a def entity (node, edge, variable) is existing in this pattern graph
Public fieldisDefEntityExistingPlusInlined Tells whether a def entity (node, edge, variable) is existing in this pattern graph after inlining
Public fieldisEmitOrAssertExisting Tells whether one of the emit/emitDebug/assert/assertAlways procedures (which are interacting with the environment) are existing in this pattern graph (yields)
Public fieldisEmitOrAssertExistingPlusInlined Tells whether one of the emit/emitDebug/assert/assertAlways procedures (which are interacting with the environment) are existing in this pattern graph (yields) after inlining
Public fieldisIteratedFilteringExisting Tells whether an iterated filtering is existing in this pattern graph
Public fieldisIteratedFilteringExistingPlusInlined Tells whether an iterated filtering is existing in this pattern graph after inlining
Public fieldisIterationBreaking If this pattern graph is a negative or independent nested inside an iterated, it breaks the iterated instead of only the current iterated case (if true).
Public fieldisNonLocalDefEntityExisting Tells whether a non local def entity (node, edge, variable) is existing in this pattern graph
Public fieldisNonLocalDefEntityExistingPlusInlined Tells whether a non local def entity (node, edge, variable) is existing in this pattern graph after inlining
Public fieldisPatternGraphOnPathFromEnclosingPatternpath Tells whether the pattern graph is on a path from some enclosing negative/independent with patternpath modifier. Needed for patternpath processing setup (to check patternpath matches stack).
Public fieldisPatternpathLocked Tells whether the elements from the parent patterns (but not sibling patterns) should be isomorphy locked, i.e. not again matchable, even in negatives/independents, which are normally hom to all. This allows to match paths without a specified end, eagerly, i.e. as long as a successor exists, even in case of a cycles in the graph.
Public fielditerateds An array of iterateds, each iterated is matched as often as possible within the specified bounds.
Public fielditeratedsPlusInlined An array of all iterateds plus the iterateds inlined into this pattern.
Public fieldmaxIsoSpace Gives the maximum isoSpace number of the pattern reached by negative/independent nesting, clipped by LGSPElemFlags.MAX_ISO_SPACE which is the critical point of interest, this might happen by heavy nesting or by a subpattern call path with direct or indirect recursion on it including a negative/independent which gets passed.
Public fieldmaybeNullElementNames Names of the elements which may be null The following members are ordered along it/generated along this order.
Public fieldname The name of the pattern graph
Public fieldneededEdges The edges from the enclosing graph(s) used in this graph or one of it's subgraphs. Includes inlined elements after inlining. Map of names to pattern edges.
Public fieldneededNodes The nodes from the enclosing graph(s) used in this graph or one of it's subgraphs. Includes inlined elements after inlining. Map of names to pattern nodes.
Public fieldneededVariables The variables from the enclosing graph(s) used in this graph or one of it's subgraphs. Includes inlined elements after inlining. Map of names to pattern variables.
Public fieldnegativePatternGraphs An array of negative pattern graphs which make the search fail if they get matched (NACs - Negative Application Conditions).
Public fieldnegativePatternGraphsPlusInlined An array of all negative pattern graphs plus the negative pattern graphs inlined into this pattern.
Public fieldnestedIndependents The independents nested within this pattern graph, but only independents not nested within negatives. Map of pattern graphs to the fact whether they are contained in an iterated pattern with potentially more than 1 match. Then match building must occur on the call stack cause there are multiple matches living at a time, otherwise it can be limited to the matcher class (and done only as needed). Contains first the nested independents before inlinig, afterwards the ones after inlining.
Public fieldnodes An array of all pattern nodes.
Public fieldnodesPlusInlined An array of all pattern nodes plus the nodes inlined into this pattern.
Public fieldoriginalPatternGraph Links to the original pattern graph in case this pattern graph was inlined, otherwise null; the embeddingGraph of the original pattern graph references the original containing pattern
Public fieldoriginalSubpatternEmbedding Links to the original subpattern embedding which was inlined in case this (negative or independent) pattern graph was inlined, otherwise null.
Public fieldpackage null if this is a global pattern graph, otherwise the package the pattern graph is contained in.
Public fieldpackagePrefixedName The name of the pattern graph in case of a global type, the name of the pattern graph is prefixed by the name of the package otherwise (package "::" name).
Public fieldparallelizedSchedule Not-null in case of parallelization. Contains then exactly 2 entries. A parallelized matcher consists of a head (first, distributing and collecting work) and a body (following, doing real work). A pattern with maybe null action presets is not parallelized. The head and body schedules include negatives and independents, they are derived from schedulesIncludingNegativesAndIndependents by splitting at the first candidate-binding loop.
Public fieldparallelizedYieldings The yielding assignments used in this pattern graph or it's nested graphs, after parallelization Not-null in case of parallelization.
Public fieldpathPrefix Prefix for name from nesting path
Public fieldpatternGraphsOnPathToEnclosedPatternpath The names of the pattern graphs which are on a path to some enclosed negative/independent with patternpath modifier. Needed for patternpath processing setup (to write to patternpath matches stack).
Public fieldschedules The schedules for this pattern graph without any nested pattern graphs. Normally one, but each maybe null action preset causes doubling of schedules.
Public fieldschedulesIncludingNegativesAndIndependents The schedules for this pattern graph including negatives and independents. Normally one, but each maybe null action preset causes doubling of schedules.
Public fieldtotallyHomomorphicEdges An array telling which pattern edge is to be matched non-isomorphic(/independent) against any other edge. Including the additional information from inlined stuff (is extended during inlining).
Public fieldtotallyHomomorphicNodes An array telling which pattern node is to be matched non-isomorphic(/independent) against any other node. Including the additional information from inlined stuff (is extended during inlining).
Public fieldusedSubpatterns The subpatterns used by this pattern (directly as well as indirectly), only filled/valid if this is a top level pattern graph of a rule or subpattern. Set of matching patterns, with dummy null matching pattern due to lacking set class in c# Contains first the used subpatterns before inlinnig, afterwards the ones after inlining.
Public fieldvariables An array of all pattern variables.
Public fieldvariablesPlusInlined An array of all pattern variables plus the variables inlined into this pattern.
Public fieldYieldings The yielding assignments used in this pattern graph or it's nested graphs
Public fieldYieldingsPlusInlined An array of all yielding assignments plus the yielding assignments inlined into this pattern.
Top
See Also