The failure of one of the branches of a dynamic rule intersection or union are currently not
treated. In all applications developed so far these branches always succeed. But the operations
should actually treat the failure situation as well.

The action to take: restore the ruleset to its original state (by removing the changesets) and
then fail.

Submitted on 14 February 2005 at 17:55

On 9 July 2005 at 09:09 Jira commented:

STR-258, visser:
These becomes even more important as problems can arise in normal circumstances. I wrote the
following definition, as part of a dead code elimination transformation:

dce-if =
(IfElse(id,dce-stats,id) /VarNeeded,VarUsed IfElse(id,id,dce-stats))
; IfElse(declare-var-needed, id, id)

The application of dce-if to other constructors than IfElse caused the insertion of spurious
ChangeSets in the rule set, causing failure much later in the case of leaving the scope.

Of course, the following repairs this:

dce-if =
?IfElse(,,_)
; (IfElse(id,dce-stats,id) /VarNeeded,VarUsed IfElse(id,id,dce-stats))
; IfElse(declare-var-needed, id, id)

and is more efficient. But, the behaviour of the first version is unexpected and hard to detect.


On 29 October 2005 at 23:20 Jira commented:

STR-258, visser:
The dr-fork-and-merge and dr-fix-and-merge strategies now apply their
argument transformation strategies with a restore, which takes care of
discarding the cahnge sets on failure, and then propagating the
failure. This should be relatively cheap on normal behaviour.

Log in to post comments