User Tools

Site Tools


01_user_documentation:07_rgg_xl:02_xl:08_object:02_pattern:01_inrgg:04_open_ends

Open ends

Custom patterns do not require to define a “closed” pattern. It means that the pattern can start/ end with an “open” predicate (e.g. an edge pattern). The pattern will match the existence of such open predicate using implicitly a default Node object to close the pattern. The Node used implicitly is then considered as “bound” and cannot be matched again by the same pattern. For instance:

class p(@In @Out Node n) ( n > ) // Test if the variable @In@Out has a successor edge toward anything

It is important to pay attention to the bounds of the custom patterns, because the “open” pattern matching bounds Node implicitly.

class p(@In @Out Node n) ( n > )
void rule()[
 A -p-> B ::>; // is equivalent to
 A [> Node] > B ::>; // Node and B cannot be the same 
]
01_user_documentation/07_rgg_xl/02_xl/08_object/02_pattern/01_inrgg/04_open_ends.txt · Last modified: 2025/09/03 17:18 by gaetan