02_user_tutorials:03_graph_xl:common_rewriting_rules
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| 02_user_tutorials:03_graph_xl:common_rewriting_rules [2025/01/24 15:51] – ↷ Page moved from 02_user_tutorials:graph_xl:common_rewriting_rules to 02_user_tutorials:03_graph_xl:common_rewriting_rules tim2 | 02_user_tutorials:03_graph_xl:common_rewriting_rules [2025/12/10 12:54] (current) – removed gaetan | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Structural rules ====== | ||
| - | ===== L-System style ===== | ||
| - | |||
| - | Of the two structural rules this one is much more commonly used in GroIMP. | ||
| - | It replaces each instance of the pattern defined on the left side with the new created graph structure on the right side. | ||
| - | < | ||
| - | < | ||
| - | </ | ||
| - | |||
| - | So if all A's in the model should be replaced by F's the patterns a the A's and the new structure is an F: | ||
| - | |||
| - | < | ||
| - | A ==> F; | ||
| - | </ | ||
| - | ==== pattern side ==== | ||
| - | |||
| - | |||
| - | The definition of the pattern that should be replaced can be defined by using [[01_user_documentation: | ||
| - | |||
| - | < | ||
| - | A[F] ==> F; | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | first((*A*)) ==> F; | ||
| - | </ | ||
| - | |||
| - | Additionally the pattern can be defined using conditions: | ||
| - | |||
| - | < | ||
| - | A(1)==> | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | a: | ||
| - | </ | ||
| - | |||
| - | ==== structure side ==== | ||
| - | |||
| - | A more complex structure can be created by using the [[01_user_documentation: | ||
| - | < | ||
| - | A ==> F [RL(90) F A] F +> A; | ||
| - | </ | ||
| - | With the addition of modules and 3d objects more object oriented nodes can be added: | ||
| - | < | ||
| - | A ==> F [RL(90) Cylinder(1, | ||
| - | </ | ||
| - | |||
| - | |||
| - | |||
| - | ===== SPO style ===== | ||
| - | |||
| - | SPO: Single pushout graph rewriting | ||
| - | |||
| - | |||
| - | |||
| - | ====== Execution rule ====== | ||
| - | |||
| - | <code java> | ||
| - | |||
| - | [ < | ||
| - | |||
| - | </ | ||
| - | |||
| - | e.g. | ||
| - | |||
| - | <code java> | ||
| - | |||
| - | [ a:A ::> println( a ); ] | ||
| - | |||
| - | </ | ||
02_user_tutorials/03_graph_xl/common_rewriting_rules.1737730316.txt.gz · Last modified: 2025/01/24 15:51 by tim2
