This is an old revision of the document!
Table of Contents
Extent visibility
When looking for matches, queries only consider Node that are in their set of visible extents.
A special feature of the graph management is the manipulation of extents. For each used node class in the graph, there exists an Extent which collects all nodes of this class and also has a link to the extent of its superclass and to the extents of its subclasses. This feature is currently used within the RGG plug-in for a fast processing of queries which specify node type patterns like in the rule F(x) ==> F(2*x);. Instead of having to scan the whole graph for nodes of class F, the corresponding extent is used together with its sub-extents to directly iterate over all nodes of class F.
Default visibility
Every query whose visibility is not explicitly declared will use the default visibility. The default value for RGG models is 127 (i.e. 0b1111111).
The default extent visibility can be set with:
{de.grogra.rgg.model.Runtime.INSTANCE.currentGraph().setVisibleExtents( 0b1111111 );}
Explicit visibility declaration
It is also possible to change the extent visibility for only one query. The extent visibility can declared explicitly with: @ VAL ; QVDECL; QUERY where VAL is the visibility value. (QVDECL is the query variable declaration, and QUERY the query).
For example: <code java> void rule() [
@5; A ==> B; // match all A in the extents 1, 2, and 3 @1; A ==> B; // match all A in the extent 1 A ==> B; // match all A in the default extents (i.e. 1 to 7)
] void meth(){
(* @21; F *); // match all F in the extents 1, 3, and 5
} <code>
