Currently, the compiler doesn’t generate code for rules and strategies that are never called. With dynamic loading, a program/module can have multiple entry points, and the compiler needs to ensure that code is generated for all of them and that their symbols are exported.

A simple hack would be to add a –dynamic-main which would name the main entry point. This would take care of the simple case were a loadable module has only one entry point (which is different from the normal main).

A better solution would be to provide some sort of ‘export’ declaration; which we’ll probably need anyway for the module system. For example,

export s = foo + bar


exported strategies

 s = ...

Submitted on 25 July 2005 at 10:20

On 16 August 2005 at 21:47 Jira commented:

STR-365, visser:
This isssue is (temporarily) solved by the DYNAMIC-CALLS hack from issue STR-346. A cleaner solution should be designed eventually. Therefore, leaving this issue open (but moving it to a future release).

On 12 January 2011 at 13:45 Lennart Kats commented:

The --library option also disables the dead code elimination optimization. Note that strategies that are marked internal can still be eliminated in this case, and are not exported to other libraries.

On 15 December 2011 at 00:52 Adil Akhter tagged !adil

On 9 January 2013 at 16:56 Eelco Visser removed tag 0.19M1

On 9 January 2013 at 16:56 Eelco Visser tagged interesting

Log in to post comments