Rule – Manipulate graphs with rules


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
3    child:Part;
4    parent:BomNode;
6    if { == child.parentid && parent.productid == child.productid; }
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:


Was this article helpful?

Related Articles