[mercury-users] Assert/Retract

Daniel Elenius elenius at csl.sri.com
Fri Jan 27 15:56:31 AEDT 2006


Ralph Becket wrote:
> 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.
>
>   
That's correct.

> 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.
>
>   
Ok, that sounds like something worth looking at.

> There may be other solutions, but I don't know enough about your
> application to suggest any with confidence.
>
>   
You've been very helpful, thanks.
Daniel

> 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
> --------------------------------------------------------------------------
>   

--------------------------------------------------------------------------
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