Table of Contents
General
A rule
can be used to define rewrite rules. It covers the pattern specification (left-handside graph) and the rewrite specification (right-hand side) and allows recalculating attributes of graph elements during rule application. Further, rule parameters, return values and rule constraints can be defined.
Example code:
1 rule createBOMHierarchy{ //LHS 2 3 child:Part; 4 parent:BomNode; 5 6 if {parent.id == child.parentid && parent.productid == child.productid; } 7 8 modify{ //RHS 9 parent -:Contains-> child; 10 } 11 }
This code example can be found in our Soley Studio Tutorial.
How to use it:
More Examples can be found in these Packages: