While using a term project in an identity dynamic rule

rules( Needed : <id>  )

is not a good idea, it should NOT lead to exposing the closure hash when applying the
rule.

Reported by Mark Snyder


module java-dead
imports libstrategolib

signature
constructors
ExprName : Id -> Expr
Assign : Expr -> Expr

strategies

main-java-dead =
<map(processExpr)> [ ExprName(“x”), Assign(ExprName(“x”))]

processExpr =
processAssignExpr
<+ saveVarExpr
<+ all(try(processExpr))
<+ id

processAssignExpr =
?Assign(a)
; where (!a; Needed < debug(!"valued before removing ") + debug(!“nothing”))
; rules(Needed :- a)
; where (!a; Needed < debug(!"valued after removing ") + debug(!“nothing”))

saveVarExpr =
?ExprName(a)
; debug(!“adding var before”)
; rules(Needed : )

Submitted on 20 March 2006 at 14:20

On 28 January 2013 at 14:45 Eelco Visser removed tag 0.18M4

On 28 January 2013 at 14:45 Eelco Visser tagged interesting

Log in to post comments