de.grogra.rgg.model
@HasModel(value=Compiletime.class) public class RGGGraph extends Graph
Graph.QState, Graph.ThreadDataEXCLUDE_DELETED_FLAG, INTERPRETIVE_FLAG, MODE_MASK, PARALLEL_MODE, PARALLEL_NON_DETERMINISTIC_MODE, SEQUENTIAL_MODE, SEQUENTIAL_NON_DETERMINISTIC_MODE| Modifier and Type | Method and Description |
|---|---|
static void |
addQueues(QueueCollection qc,
ObjectList<? extends Queue> queues) |
protected void |
beginModifications() |
boolean |
canEnumerateEdges(EdgeDirection dir,
boolean constEdge,
java.io.Serializable edge) |
boolean |
canEnumerateNodes(Type type)
Can nodes of the specified
type be enumerated? |
protected void |
commitModifications() |
Producer |
createProducer(QueryState match)
Creates an instance of
Producer. |
GraphQueue |
createQueue(QueueCollection qc,
QueueDescriptor descr) |
protected Graph.ThreadData |
createThreadData() |
long |
derive() |
void |
enumerateEdges(java.lang.Object node,
EdgeDirection dir,
Type edgeType,
QueryState qs,
int toIndex,
int patternIndex,
java.io.Serializable pattern,
int matchIndex,
MatchConsumer consumer,
int arg) |
void |
enumerateNodes(Type type,
QueryState qs,
int index,
MatchConsumer consumer,
int arg)
This methods enumerates all nodes of this graph of the given
type to the given
MatchConsumer via the given query state. |
GraphManager |
getGraphManager() |
ObjectList<GRSVertex> |
getNewGRSVertices() |
protected java.lang.Object |
getPredecessor(java.lang.Object node) |
java.lang.Object |
getRoot()
Returns the root node of this graph.
|
java.lang.Object |
getTypeGraphNode(Node node)
Search the type graph for the representative type graph node of the input node.
|
java.lang.Object |
getTypeRoot()
Returns the root node of the type graph for this graph
|
static ObjectList<Queue> |
readQueues(QueueCollection qc,
java.io.DataInput in,
java.lang.ClassLoader loader) |
void |
removeInterpretiveNodes() |
void |
removeInterpretiveNodesOnDerivation() |
void |
setProductionCallback(java.lang.Runnable c) |
void |
setVisibleExtents(int indices) |
static void |
writeQueues(ObjectList<? extends Queue> list,
java.io.DataOutput out) |
allowNoninjectiveMatchesByDefault, allowNoninjectiveMatchesForNextQuery, areComparableScales, createMatcher, createQueryState, enumerateSpaces, getDerivationMode, getMinimumEncoarseDepthDiff, getModel, getQueues, getScaleValue, getThreadData, getTypeNode, getTypeNode, isInTypeGraph, isSameScale, setDerivationMode, sortedTypeGraphpublic static void addQueues(QueueCollection qc, ObjectList<? extends Queue> queues)
protected void beginModifications()
beginModifications in class Graphpublic boolean canEnumerateEdges(EdgeDirection dir, boolean constEdge, java.io.Serializable edge)
public boolean canEnumerateNodes(Type type)
Graphtype be enumerated? This
method returns true iff this graph can enumerate
nodes of the given type using the method
Graph.enumerateNodes(de.grogra.reflect.Type, de.grogra.xl.query.QueryState, int, de.grogra.xl.query.MatchConsumer, int).canEnumerateNodes in interface GraphcanEnumerateNodes in class Graphtype - the type of nodestrue iff nodes of type can be enumeratedprotected void commitModifications()
commitModifications in class Graphpublic Producer createProducer(QueryState match)
GraphProducer. This factory
method creates an instance of a subclass of
Producer which will be exclusively used later on
in the context of the current match represented by
qs. The instance must be an
instance of the class returned by
CompiletimeModel.getProducerType()
for the corresponding compile-time model.
The usage of producers is specified by the XL programming language.
match - query state which holds current match for which the producer
shall produce a replacementqspublic GraphQueue createQueue(QueueCollection qc, QueueDescriptor descr)
createQueue in class Graphprotected Graph.ThreadData createThreadData()
createThreadData in class Graphpublic void enumerateEdges(java.lang.Object node,
EdgeDirection dir,
Type edgeType,
QueryState qs,
int toIndex,
int patternIndex,
java.io.Serializable pattern,
int matchIndex,
MatchConsumer consumer,
int arg)
enumerateEdges in interface GraphenumerateEdges in class Graphpublic void enumerateNodes(Type type, QueryState qs, int index, MatchConsumer consumer, int arg)
GraphMatchConsumer via the given query state.
I.e., for every
node c of this extent that has type type,
the following statement is executed:
qs.amatch (tp, c, consumer, arg);
type - the type of nodesqs - the query state on which the amatch-method has to be invokedindex - the index-parameter for the amatch-methodconsumer - the consumer-parameter for the amatch-methodarg - the arg-parameter for the amatch-methodpublic GraphManager getGraphManager()
public ObjectList<GRSVertex> getNewGRSVertices()
protected java.lang.Object getPredecessor(java.lang.Object node)
getPredecessor in class Graphpublic java.lang.Object getRoot()
Graphpublic java.lang.Object getTypeGraphNode(Node node)
node - public java.lang.Object getTypeRoot()
Graphpublic static ObjectList<Queue> readQueues(QueueCollection qc, java.io.DataInput in, java.lang.ClassLoader loader) throws java.io.IOException
java.io.IOExceptionpublic void removeInterpretiveNodes()
public void removeInterpretiveNodesOnDerivation()
public void setProductionCallback(java.lang.Runnable c)
public void setVisibleExtents(int indices)
public static void writeQueues(ObjectList<? extends Queue> list, java.io.DataOutput out) throws java.io.IOException
java.io.IOException