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

Key: STR-509
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Eelco Visser
Reporter: Martin Bravenboer
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

Use of DYNAMIC_CALLS in DR incompatible with separate compilation

Created: 2006-02-10 18:38   Updated: 2008-03-31 20:43
Component/s: strc - Stratego compiler
Affects Version/s: 0.16 (Stratego Core Compiler)
Fix Version/s: 0.17

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


 Description  « Hide
Dynamic rules generate DYNAMIC_CALLS strategy definitions for undefine-f and new-f. This is incompatible with separate compilation: the DYNAMIC_CALLS with end up in the external definitions of a library that uses dynamic rules and they will be in the C code as well. If a program that uses the library, applies dynamic rules as well, then the result will be an overriding external definition error.

I can think of two solutions for this:

1) DYNAMIC_CALLS do not need not produce C code, nor do they have to be in the external definitions. So, they can just be left out in the code generation of C and external definitions

2) DYNAMIC_CALLS are only necessary for programs (there is no dead code elimination for libraries), so the DYNAMIC_CALLS in the dynamic rules lifter only have to be generated if the compiler is working on a program.

This is a critical issue: unlike the definition of the same dynamic rule name over a library boundary (which is not supported), this DYNAMIC_CALLS issue affects *any* dynamic rule. So, you cannot use dynamic rules if you import the Dryad library.

Reported by Bogdan.

 All   Comments   Work Log   Change History      Sort Order:
Eelco Visser [2006-02-10 21:20]
The strategy definition is now ignored when generating external definitions and C code.
Please test.

Bogdan Dumitriu [2006-02-13 11:03]
The code I originally had problems with now compiles.

Martin Bravenboer [2006-03-03 17:11]
I assume that this issue can be closed now?