User Tools

Site Tools


01_user_documentation:07_rgg_xl:02_xl:08_object:01_module

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
01_user_documentation:07_rgg_xl:02_xl:08_object:01_module [2025/08/20 10:32] – ↷ Page moved from 01_user_documentation:07_rgg_xl:02_xl:04_object:01_module to 01_user_documentation:07_rgg_xl:02_xl:08_object:01_module gaetan01_user_documentation:07_rgg_xl:02_xl:08_object:01_module [2025/09/04 15:24] (current) gaetan
Line 1: Line 1:
 ====== Module ====== ====== Module ======
  
-Module are base nodes used in model. They extends Node by default, but can extend another object if specified.+Modules are base nodes used in XL models. They extends [[https://javadoc.grogra.de/graph/de/grogra/graph/impl/Node.html|Node]] by default, but can extend another object if specified. To be used in a project modules are classes defined with:  
 +  - A public constructor with all its fields as variables 
 +  - Fields for each of the module [[:01_user_documentation:06_graph:02_node:01_attribute|attributes]] 
 +  - Accessor methods for these fields 
 +  - A [[:01_user_documentation:07_rgg_xl:02_xl:03_query:01_predicate:01_node:02_parametrized|parametrized pattern]] with all of its attributes as variable
  
 +======  ======
  
- +{{namespace>:01_user_documentation:07_rgg_xl:02_xl:08_object:01_module}}
-===== Constructor ===== +
- +
-Additionally modules are created with a default constructor (aka a way for groimp to create them without parameters)  +
- +
-e.g. module A(int len) {} can be added in a production rule with A(), A, A(1), ... +
- +
-===== Pattern ===== +
-  +
-Module are also compiled with a default pattern. e.g. they can be added in predicate with an attribute pattern: +
-(with the same A as before) +
- +
-[ A(x, y) == ;] +
- +
-x will be the instanceof the A, and y, the (int) len. +
01_user_documentation/07_rgg_xl/02_xl/08_object/01_module.1755678741.txt.gz · Last modified: 2025/08/20 10:32 by gaetan