An attributed, typed and directed multigraph with multiple inheritance on node and edge types.
| C# |
public interface IGraph
| All Members | Methods | Properties | Events | ||
| Icon | Member | Description |
|---|---|---|
| Actions |
A currently associated actions object.
| |
| AddEdge(IEdge, String) |
Adds an existing IEdge object to the graph and assigns it to the given variable.
The edge must not be part of any graph, yet!
Source and target of the edge must already be part of the graph.
| |
| AddEdge(IEdge) |
Adds an existing IEdge object to the graph.
The edge must not be part of any graph, yet!
Source and target of the edge must already be part of the graph.
| |
| AddEdge(EdgeType, INode, INode, String) |
Adds a new edge to the graph and assigns it to the given variable.
| |
| AddEdge(EdgeType, INode, INode) |
Adds a new edge to the graph.
| |
| AddNode(INode, String) |
Adds an existing INode object to the graph and assigns it to the given variable.
The node must not be part of any graph, yet!
The node may not be connected to any other elements!
| |
| AddNode(INode) |
Adds an existing INode object to the graph.
The node must not be part of any graph, yet!
The node may not be connected to any other elements!
| |
| AddNode(NodeType, String) |
Adds a new node to the graph and assigns it to the given variable.
| |
| AddNode(NodeType) |
Adds a new node to the graph.
| |
| AllocateVisitedFlag()()() |
Allocates a clean visited flag on the graph elements.
If needed the flag is cleared on all graph elements, so this is an O(n) operation.
| |
| ApplyGraphRewriteSequence(Sequence) |
Apply a graph rewrite sequence.
| |
| ApplyRewrite(RuleObject, Int32, Int32, Boolean, Boolean) |
Apply a rewrite rule.
| |
| ChangingEdgeAttribute(IEdge, AttributeType, AttributeChangeType, Object, Object) |
Fires an OnChangingEdgeAttribute event.
To be called before changing an attribute of an edge,
with exact information about the change to occur,
to allow rollback of changes, in case a transaction is underway.
| |
| ChangingNodeAttribute(INode, AttributeType, AttributeChangeType, Object, Object) |
Fires an OnChangingNodeAttribute event.
To be called before changing an attribute of a node,
with exact information about the change to occur,
to allow rollback of changes, in case a transaction is underway.
| |
| Clear()()() |
Removes all nodes and edges (including any variables pointing to them) from the graph.
| |
| Clone(String) |
Duplicates a graph.
The new graph will use the same model and backend as the other.
The open transactions will NOT be cloned.
| |
| Custom(array<Object>[]()[]) |
Does graph-backend dependent stuff.
| |
| DestroyGraph()()() |
For persistent backends permanently destroys the graph.
| |
| Dump(IDumper, DumpInfo) |
Dumps the graph with a given graph dumper.
| |
| Dump(IDumper) |
Dumps the graph with a given graph dumper and default dump style.
| |
| DumpMatch(IDumper, DumpInfo, IMatches, DumpMatchSpecial) |
Dumps one or more matches with a given graph dumper.
| |
| Edges |
Enumerates all edges in the graph.
| |
| EmitWriter |
The writer used by emit statements. By default this is Console.Out.
| |
| EnteringSequence(Sequence) |
Fires an OnEnteringSequence event.
| |
| ExitingSequence(Sequence) |
Fires an OnExitingSequence event.
| |
| Finished(IMatches, Boolean) |
Fires an OnFinished event.
| |
| Finishing(IMatches, Boolean) |
Fires an OnFinishing event.
| |
| FreeVisitedFlag(Int32) |
Frees a visited flag.
This is an O(1) operation.
| |
| GetCompatibleEdges(EdgeType) |
Enumerates all edges compatible to the given edge type.
| |
| GetCompatibleNodes(NodeType) |
Enumerates all nodes compatible to the given node type.
| |
| GetEdgeVarValue(String) |
Retrieves the IEdge for a variable name or null, if the variable isn't set yet or anymore.
A InvalidCastException is thrown, if the variable is set and does not point to an IEdge object.
| |
| GetElementName(IGraphElement) |
Returns the first variable name for the given element it finds (if any).
| |
| GetElementVariables(IGraphElement) |
Returns a linked list of variables mapped to the given graph element
or null, if no variable points to this element
| |
| GetExactEdges(EdgeType) |
Enumerates all edges with the exact given edge type.
| |
| GetExactNodes(NodeType) |
Enumerates all nodes with the exact given node type.
| |
| GetNewestActionVersion(IAction) |
Retrieves the newest version of an IAction object currently available for this graph.
This may be the given object.
| |
| GetNodeVarValue(String) |
Retrieves the INode for a variable name or null, if the variable isn't set yet or anymore.
A InvalidCastException is thrown, if the variable is set and does not point to an INode object.
| |
| GetNumCompatibleEdges(EdgeType) |
Returns the number of edges compatible to the given edge type.
| |
| GetNumCompatibleNodes(NodeType) |
Returns the number of nodes compatible to the given node type.
| |
| GetNumExactEdges(EdgeType) |
Returns the number of edges with the exact given edge type.
| |
| GetNumExactNodes(NodeType) |
Returns the number of nodes with the exact given node type.
| |
| GetVariableValue(String) |
Retrieves the object for a variable name or null, if the variable isn't set yet or anymore
| |
| IsVisited(IGraphElement, Int32) |
Returns whether the given graph element has been visited.
| |
| LoadActions(String) |
Loads a BaseActions instance from the given file.
If the file is a ".cs" file it will be compiled first.
| |
| Matched(IMatches, Boolean) |
Fires an OnMatched event.
| |
| Mature()()() |
Mature a graph.
This method should be invoked after adding all nodes and edges to the graph.
The backend may implement analyses on the graph to speed up matching etc.
The graph may not be modified by this function.
| |
| MaxMatches |
The maximum number of matches to be returned for a RuleAll sequence element.
If it is zero or less, the number of matches is unlimited.
| |
| Model |
The model associated with the graph.
| |
| Name |
A name associated with the graph.
| |
| Nodes |
Enumerates all nodes in the graph.
| |
| NumEdges |
The total number of edges in the graph.
| |
| NumNodes |
The total number of nodes in the graph.
| |
| OnChangingEdgeAttribute |
Fired before an attribute of an edge is changed.
Note for LGSPBackend:
Because graph elements of the LGSPBackend don't know their graph a call to
LGSPGraphElement.SetAttribute will not fire this event. If you use this function
and want the event to be fired, you have to fire it yourself
using ChangingEdgeAttributes.
| |
| OnChangingNodeAttribute |
Fired before an attribute of a node is changed.
Note for LGSPBackend:
Because graph elements of the LGSPBackend don't know their graph a call to
LGSPGraphElement.SetAttribute will not fire this event. If you use this function
and want the event to be fired, you have to fire it yourself
using ChangingNodeAttributes.
| |
| OnClearingGraph |
Fired before the whole graph is cleared
| |
| OnEdgeAdded |
Fired after an edge has been added
| |
| OnEntereringSequence |
Fired when a sequence is entered.
| |
| OnExitingSequence |
Fired when a sequence is left.
| |
| OnFinished |
Fired after the rewrite step of a rule.
Note, that the given matches object may contain invalid entries,
as parts of the match may have been deleted!
| |
| OnFinishing |
Fired before the rewrite step of a rule, when at least one match has been found.
| |
| OnMatched |
Fired after all requested matches of a rule have been matched.
| |
| OnNodeAdded |
Fired after a node has been added
| |
| OnRemovingEdge |
Fired before an edge is deleted
| |
| OnRemovingEdges |
Fired before all edges of a node are deleted
| |
| OnRemovingNode |
Fired before a node is deleted
| |
| OnRetypingEdge |
Fired before the type of an edge is changed.
Old and new type and attributes are provided to the handler.
| |
| OnRetypingNode |
Fired before the type of a node is changed.
Old and new type and attributes are provided to the handler.
| |
| OnRewritingNextMatch |
Fired before the next match is rewritten. It is not fired before rewriting the first match.
| |
| OnSettingAddedEdgeNames |
Fired before each rewrite step (also rewrite steps of subpatterns) to indicate the names
of the edges added in this rewrite step in order of addition.
| |
| OnSettingAddedNodeNames |
Fired before each rewrite step (also rewrite steps of subpatterns) to indicate the names
of the nodes added in this rewrite step in order of addition.
| |
| PerformanceInfo |
If PerformanceInfo is non-null, this object is used to accumulate information about time, found matches and applied rewrites.
By default it should be null.
The user is responsible for resetting the PerformanceInfo object.
| |
| Remove(INode) |
Removes the given node from the graph.
| |
| Remove(IEdge) |
Removes the given edge from the graph.
| |
| RemoveEdges(INode) |
Removes all edges from the given node.
| |
| Replace(IMatches, Int32) |
Executes the modifications of the according rule to the given match/matches.
Fires OnRewritingNextMatch events before each rewrite except for the first one.
| |
| ResetVisitedFlag(Int32) |
Resets the visited flag with the given ID on all graph elements, if necessary.
| |
| Retype(INode, NodeType) |
Retypes a node by creating a new node of the given type.
All adjacent edges as well as all attributes from common super classes are kept.
| |
| Retype(IEdge, EdgeType) |
Retypes an edge by creating a new edge of the given type.
Source and target node as well as all attributes from common super classes are kept.
| |
| ReuseOptimization |
If true (the default case), elements deleted during a rewrite
may be reused in the same rewrite.
As a result new elements may not be discriminable anymore from
already deleted elements using object equality, hash maps, etc.
In cases where this is needed this optimization should be disabled.
| |
| RewritingNextMatch()()() |
Fires an OnRewritingNextMatch event.
| |
| SetNewestActionVersion(IAction, IAction) |
Sets the newest action version for a static action.
| |
| SetVariableValue(String, Object) |
Sets the value of the given variable to the given value.
If the variable name is null, this function does nothing.
If elem is null, the variable is unset.
| |
| SetVisited(IGraphElement, Int32, Boolean) |
Sets the visited flag of the given graph element.
| |
| TransactionManager |
Returns the graph's transaction manager.
For attribute changes using the transaction manager is the only way to include such changes in the transaction history!
Don't forget to call Commit after a transaction is finished!
| |
| Validate(Boolean, List<(Of <(ConnectionAssertionError>)>)%) |
Checks whether a graph meets the connection assertions.
In strict mode all occuring connections must be specified
by a connection assertion.
| |
| ValidateWithSequence(Sequence) |
Tests whether the given sequence succeeds on a clone of the associated graph.
|