gcc config
[prop.git] / prop-src / T2.pcc
blobcc96abed935527a5e16bb289089bc65444408563
1 datatype Exp = INT int        => _
2              | ADD (Exp, Exp) => _ "+" _
3              | SUB (Exp, Exp) => _ "-" _
4              | MUL (Exp, Exp) => _ "*" _
5              | DIV (Exp, Exp) => _ "/" _ 
6              ;
8 graphtype Foo 
9 ( nodes: Node Exp 
10   edges: edge Node -> Node
15 instantiate datatype Exp;
17 graphrewrite Transform (e : Exp)
19    ADD(x,y), ADD(x,y)
20    ------------------
21    INT(1);