This section presents the model graphs. Model graphs (or query graphs) are used at runtime to perform queries onto a data graph. The query graph is responsible for matching the pattern on the data graph and executing the production statements. Each instance of a model graph is linked to a data graph, thus, it is possible to use different model graph of the same type, to run rules on different data graphs. Also, several model graph can be linked to the same data graph.
It is possible to specify which model graph is to be used for a given rule with the syntax:
RGGGraph qgraph = rgggraph(); // get or create a rgggraph qgraph.[ /* a rule block */]; // to use the model graph on the rule block qgraph.(* /* a query expr */ *); // or on a query expression
Rules of the XL programming language are executed when the control flow reaches them. The execution of a rule finds all matches of the left-hand side and, for each match, performs the statements of the right-hand side. Thus, for a producer implementation which constructs a parallel production, the control flow in the sense of relational growth grammars the family of all executed rules and applies each rule via every possible match in the current graph. This is a true parallel mode of derivation. The different derivation modes enable to use a different control flow.
The default rgg model graph.
Multi scale model graph. This query graph use the Type graph to resolve the query predicates and production statements. When the TypeAxiom node get replaced, the project automatically switch to use the MSGraph as current model graph.