[NEW] LocDeltaList + LocDeltaList => LocDeltaList
[ohcount] / test / detect_files / stratego.str
1 /** 
2  * Sample code from Stratego XT Manual
3  */
4
5 rules
6   InlineF :
7     |[ let f(xs) = e in e'[f(es)] ]| ->
8     |[ let f(xs) = e in e'[e[es/xs]] ]|
9
10   InlineV :
11     |[ let x = e in e'[x] ]| -> |[ let x = e in e'[e] ]|
12
13   Dead :
14     |[ let x = e in e' ]| -> |[ e' ]|
15     where <not(in)> (x,e')
16
17   Extract(f,xs) :
18     |[ e ]| -> |[ let f(xs) = e in f(xs) ]|
19
20   Hoist :
21     |[ let x = e1 in let f(xs) = e2 in e3 ]| ->
22     |[ let f(xs) = e2 in let x = e1 in e3 ]|
23     where <not(in)> (x, <free-vars> e2)