blob: 45a8f21daa970e14660edb83305ea069e82b6af9 [file] [log] [blame]
pre {
var x = 5;
}
rule Tree2Node
transform t : Tree!Tree
to n : Graph!Node {
guard {
x; // Check that x is accessible here
return true;
}
n.name := t.label;
if (t.parent.isDefined()) {
var e : new Graph!Edge;
e.source ::= t.parent;
e.target := n;
}
// Check that x is accessible here
x.foo();
}
operation Any foo() {
// Check that x is accessible here
x;
}