java.lang.Object
de.grogra.xl.impl.base.Graph
de.grogra.rgg.model.RGGGraph
-
Nested Class Summary
Nested classes/interfaces inherited from class de.grogra.xl.impl.base.Graph
Graph.QState, Graph.ThreadData
-
Field Summary
Fields inherited from class de.grogra.xl.impl.base.Graph
EXCLUDE_DELETED_FLAG, INTERPRETIVE_FLAG, MODE_MASK, PARALLEL_MODE, PARALLEL_NON_DETERMINISTIC_MODE, SEQUENTIAL_MODE, SEQUENTIAL_NON_DETERMINISTIC_MODE
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addQueues
(QueueCollection qc, ObjectList<? extends Queue> queues) protected void
boolean
canEnumerateEdges
(EdgeDirection dir, boolean constEdge, Serializable edge) boolean
canEnumerateNodes
(Type type) Can nodes of the specifiedtype
be enumerated?protected void
createProducer
(QueryState match) Creates an instance ofProducer
.createQueue
(QueueCollection qc, QueueDescriptor descr) protected Graph.ThreadData
long
derive()
void
enumerateEdges
(Object node, EdgeDirection dir, Type edgeType, QueryState qs, int toIndex, int patternIndex, 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 givenMatchConsumer
via the given query state.protected Object
getPredecessor
(Object node) getRoot()
Returns the root node of this graph.getTypeGraphNode
(Node node) Search the type graph for the representative type graph node of the input node.Returns the root node of the type graph for this graphstatic ObjectList<Queue>
readQueues
(QueueCollection qc, DataInput in, ClassLoader loader) void
void
void
void
setVisibleExtents
(int indices) static void
writeQueues
(ObjectList<? extends Queue> list, DataOutput out) Methods inherited from class de.grogra.xl.impl.base.Graph
allowNoninjectiveMatchesByDefault, allowNoninjectiveMatchesForNextQuery, areComparableScales, createMatcher, createQueryState, enumerateSpaces, getDerivationMode, getMinimumEncoarseDepthDiff, getModel, getQueues, getScaleValue, getThreadData, getTypeNode, getTypeNode, isInTypeGraph, isSameScale, setDerivationMode, sortedTypeGraph
-
Method Details
-
createThreadData
- Overrides:
createThreadData
in classGraph
-
getNewGRSVertices
-
createProducer
Description copied from interface:Graph
Creates an instance ofProducer
. This factory method creates an instance of a subclass ofProducer
which will be exclusively used later on in the context of the current match represented byqs
. The instance must be an instance of the class returned byCompiletimeModel.getProducerType()
for the corresponding compile-time model.The usage of producers is specified by the XL programming language.
- Parameters:
match
- query state which holds current match for which the producer shall produce a replacement- Returns:
- a producer for use in the context of
qs
-
setProductionCallback
-
getGraphManager
-
enumerateNodes
Description copied from interface:Graph
This methods enumerates all nodes of this graph of the given type to the givenMatchConsumer
via the given query state. I.e., for every nodec
of this extent that has typetype
, the following statement is executed:qs.amatch (tp, c, consumer, arg);
- Parameters:
type
- the type of nodesqs
- the query state on which theamatch
-method has to be invokedindex
- the index-parameter for theamatch
-methodconsumer
- the consumer-parameter for theamatch
-methodarg
- the arg-parameter for theamatch
-method
-
canEnumerateNodes
Description copied from interface:Graph
Can nodes of the specifiedtype
be enumerated? This method returnstrue
iff this graph can enumerate nodes of the giventype
using the methodGraph.enumerateNodes(de.grogra.reflect.Type, de.grogra.xl.query.QueryState, int, de.grogra.xl.query.MatchConsumer, int)
.- Specified by:
canEnumerateNodes
in interfaceGraph
- Overrides:
canEnumerateNodes
in classGraph
- Parameters:
type
- the type of nodes- Returns:
true
iff nodes oftype
can be enumerated
-
getRoot
Description copied from interface:Graph
Returns the root node of this graph.- Returns:
- the root
-
getTypeRoot
Description copied from interface:Graph
Returns the root node of the type graph for this graph- Returns:
- the root of the type graph
-
canEnumerateEdges
-
enumerateEdges
public void enumerateEdges(Object node, EdgeDirection dir, Type edgeType, QueryState qs, int toIndex, int patternIndex, Serializable pattern, int matchIndex, MatchConsumer consumer, int arg) - Specified by:
enumerateEdges
in interfaceGraph
- Overrides:
enumerateEdges
in classGraph
-
createQueue
- Specified by:
createQueue
in classGraph
-
beginModifications
protected void beginModifications()- Specified by:
beginModifications
in classGraph
-
commitModifications
protected void commitModifications()- Specified by:
commitModifications
in classGraph
-
getPredecessor
- Overrides:
getPredecessor
in classGraph
-
removeInterpretiveNodes
public void removeInterpretiveNodes() -
removeInterpretiveNodesOnDerivation
public void removeInterpretiveNodesOnDerivation() -
setVisibleExtents
public void setVisibleExtents(int indices) -
derive
public long derive() -
writeQueues
- Throws:
IOException
-
readQueues
public static ObjectList<Queue> readQueues(QueueCollection qc, DataInput in, ClassLoader loader) throws IOException - Throws:
IOException
-
addQueues
-
getTypeGraphNode
Search the type graph for the representative type graph node of the input node.- Parameters:
node
-- Returns:
- node in type graph representing the type of the given node.
-