[mercury-users] Assert/Retract

Ralph Becket rafe at cs.mu.OZ.AU
Fri Jan 27 15:48:12 AEDT 2006


Daniel Elenius, Thursday, 26 January 2006:
> No, because *new* policies can be loaded at runtime. New code has to be 
> loaded into the mercury or prolog engine, and I don't want to have to 
> reload all the policies whenever a new one comes in.

I'm assuming then you don't know all the policies ahead of time, and
therefore you can't just load them all at startup.

In that case you could use the code in extras/dynamic_linking which 
provides a Mercury interface to the C dlopen(), dlsym(), and dlclose()
functions.  Of course, you'd have to make sure your policy modules
were compiled before you dl.open'ed them.

There may be other solutions, but I don't know enough about your
application to suggest any with confidence.

Cheers,
-- Ralph
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list