Stratego/XT JIRA  History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: STR-615
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Eelco Visser
Reporter: Eelco Visser
Votes: 0
Watchers: 0
Operations

Clone this issue
Create sub-task
If you were logged in you would be able to see more operations.
Stratego/XT

Call to non-existing aux-R rule in definition of undefine-R

Created: 2006-08-09 13:17   Updated: 2008-03-31 20:43
Component/s: None
Affects Version/s: 0.16 (Stratego Core Compiler)
Fix Version/s: 0.17

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
The definition of undefine-R for a dynamic rule R, contains a call to aux-R, assuming the
definition of a dynamic rule

   rules( f(|).x1 :+ DR_UNDEFINE(x2) -> (y0, y1, y2) )

which is part of the implementation of dependent dynamic rules. For non-dependent dynamic
rules, undefine-R is generated with the call to aux-R, even while it does not exist. This is not
a problem when (a) the dynamic rule is has no dummy subterms (the entire lhs is used as
key) (thus, the number of arguments passed to aux-R is 2), and/or (b) the dynamic rule is not
defined in a library. When defined in a program, all definitions that are not used are ignored,
which is why this problem has gone unnoticed. When used in a library all definitions are preserved.

The solution is to generate a dummy undefine-R definition when for non-dependent rules R as

  undefine-R = fail

 This will be harmless in the case a proper undefine-R is generated (the fail alternatives will be
ignored). It will however change the 'calling convention' of undefine-R in case it is used for
non-dependent dynamic rules; that is, undefine-R will fail in those cases.

 

 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.