[m-dev.] Proposal: support for module initialisation and state

Peter Hawkins peter at hawkins.emu.id.au
Mon Jul 11 11:18:27 AEST 2005


Ralph Becket wrote:

>INITIALISATION AND FINALISATION
>
>	:- initialisation(pred_name).
>
>Ensures that at start-of-day (i.e., before main is called)
>pred_name(!IO) is called.  No initialisation order can be assumed.
>  
>
It would be nice to be able specify an initialisation order.
For example, in the BDD set solver the BDD library might need to be 
initialised before the solver itself. For the sake of keeping libraries 
self-contained, it would be convenient if the BDD library initialised 
itself rather than requiring explicit initialisation from the solver. 
However if you can't guarantee the initialisation order then you 
couldn't use this mechanism.

Perhaps you could topologically sort the module inclusion graph to 
obtain an initialisation order? (But then what do you do about circular 
dependencies?)

=)
Peter
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list