STR-366: Check if problems with dynamic rule intersection and union are solved
Hi Eelco,
I have a new Stratego distribution, but i still find some errors for the
behaviour of dynamic rules.First for Copy propagation, see the example name-captured.tig in the
directory test:
I will decorate the example with the dunamic rules, i put the rule label
in capital letters:let var a := 8
var b := 2
var c := 3
in a := c; // A. a -> c
let var c := b // B. c -> b (This rules shadows the
previous one)
in b := c; // B. b-> c (this rule undefines previous rule)
a := a - c // This rule should undefine the first rule,
but this rule is shadowed and it is untoched, and
therefore the rule is still active in the outer scope, which is wrong.
end;
printint(b + c + a)
endFor the backwards optimizations, which in fact is related to the union
operator of dynamic rules i found the following errors:You may want to look at the examples: propconst2.tig and propconst3.tig
the first example shows an error in the if (fork) combinator for union:
The rules from different branches are united but the rules that are not
modified in the branches are not part of the resulting rule set.for the example of propconst3.tig, shows an exmaple for a while
expression and the operator for repetition is wrong as well. For union
rules should be included to the initial ruleset, as a difference with
intersection. In the current implementation, a new traversal over a loop
with the resulting rules after the last iteration is applied, in this
way the current ruleset can decrease the number of rules, which gives an
error.Well i hope this can help debug the current implementation.
At the moment i am trying to improve or extend the alias analysis to
handle fucntion calls and possible alias between parameters.enjoy easter,
Karina
Submitted on 25 July 2005 at 13:02
Issue Log
Log in to post comments