User Tools

Site Tools


01_user_documentation:06_graph:05_derivation:04_modes

This is an old revision of the document!


Derivation Modes

RGG can be used with different derivation modes, that influence the effects the rules have on the graph. The derivation modes them self can be specified with additional flags.

Usage

The derivation mode is defined using the setDerivationMode() function in the query graph with the value of the modes and masks. e.g.

public void run(){
rggGraph().setDerivationMode(SEQUENTIAL_NON_DETERMINISTIC_MODE);
[
 A ==> B;
 A ==> C;
]
}

The default value used in RGG is PARALLEL_MODE with the addition of the EXCLUDE_DELETED_FLAG.

 rggGraph().setDerivationMode(PARALLEL_MODE|EXCLUDE_DELETED_FLAG);

Modes and Flags

PARALLEL_MODE

The a true parallel derivation mode. All rules are applied via every possible match parallel. A single node may be deleted/replaced by several rule applications.

→ Read more...

PARALLEL_NON_DETERMINISTIC_MODE

The parallel non-deterministic derivation mode ensures that a single node is deleted by at most one actual rule application. If several rule applications delete the same node, one actual application is chosen pseudo-randomly.

→ Read more...

SEQUENTIAL_MODE

In this mode one rule application is performed in a single step. If several applications are possible, only the first one is chosen. One rule application means replacing one match.

→ Read more...

SEQUENTIAL_NON_DETERMINISTIC_MODE

In none deterministic sequential derivation mode only one rule application is performed in each step. If several applications are possible, one is chosen pseudo-randomly.

→ Read more...

INTERPRETIVE_FLAG

A flag which indicates that rules have to be applied as interpretive rules.

EXCLUDE_DELETED_FLAG

Bit mask for the derivation mode which indicates that nodes which were already deleted by previous rule applications of the current derivation step shall be excluded from matches of the same step.

01_user_documentation/06_graph/05_derivation/04_modes.1765983904.txt.gz · Last modified: 2025/12/17 16:05 by Tim