logo       

Question of dynamic loading and multifile: msg#00434

Subject: Question of dynamic loading and multifile
 
 
Hi all,
 
 
I desperately need to use multifile declaration. I am loading large amount of data.  Imagine I am loading 70MB of data. Obviously this takes too much time. A solution would be that I split the data into 1MB each, and load only the portion that changed.  Otherwise, it takes too much time to load data. I *need* to use multifile.

 

 
 
Page 29 of XSB 3.1 manual says that
 
"The multifile declaration should be trusted only for static code. Multifile declarations are

not supported for code that is dynamically loaded (via

load dyn/[1,2] or load dync/[1,2] )."

 

 

I did a small test.   multifile seems to work for dynamic predicates. Can one of you help me understand whether the documentation is wrong or if there is some finer point..).

 

thanks,

Sudhakar.

 

code.p:


:- multifile trans/2.

trans(A,A) :-
atomic(A).

 

a.p:


:- multifile trans/2.
trans(apple, banana).

 

b.p:

 


:- multifile trans/2.
trans(apple, banana).

 

 

Running session:

 

C:\work\windows\scanner\xsb>bash
bash-3.2$ xsb
[xsb_configuration loaded]
[sysinitrc loaded]

XSB Version 3.1 (Incognito) of August 10, 2007
[x86-pc-windows; mode: optimal; engine: slg-wam; gc: indirection; scheduling: lo
cal]

| ?- [code].
[Compiling .\code]
[code compiled, cpu time used: 0.0780 seconds]
[code loaded]

yes
| ?- load_dyn(a).
[C:\work\windows\scanner\xsb\a.P dynamically loaded, cpu time used: 0.0000 secon
ds]

yes
| ?- load_dyn(b).
[C:\work\windows\scanner\xsb\b.P dynamically loaded, cpu time used: 0.0000 secon
ds]

yes
| ?- trans(apple, SecondArg).

SecondArg = apple;

SecondArg = banana;

SecondArg = orange;

no
| ?-

 

 

 

 

 

 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Xsb-development mailing list
Xsb-development-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xsb-development
<Prev in Thread] Current Thread [Next in Thread>