load_dync reads data canonically, which means its reader is very fast, but
rather picky. So it considers
a(1,b([])).
canonical, but
a(1,b([ ])).
not canonical. load_dyn has a reader that handles general prolog and
hilog terms (at least
as well as XSB's reader handles prolog terms :-) but is somewhat slower
as a result. David is the main author of load_dync, so let's see if he
considers it a bug or a feature.
Depending on what you are doing, load_dync can load a lot of code very
quickly -- We've had applications of XSB where load-dyncing lots of CDF
code in XSB
took only a few seconds. But multi-file with dynamic code is a reasonable
request, and I don't think it should be too hard to incorporate
into load_dyn(c). Again, let's see what David says, but I'm sure we can
find some solution for you.
Terry
On Sun, 7 Oct 2007, sudhakar govindavajhala wrote:
> Hello,
>
> Is this a bug in load_dync?
>
>
> --Sudhakar
>
> File contents:
> a( 1, b([ ]) ).
>
>
>
> | ?- load_dync(n).
>
> ++Error[XSB]: [Runtime/C] READ_CAN_ERROR: illegal format. Next tokens:
> ] ) ) .
> [C:\work\windows\scanner\xsb\n.P dynamically loaded, cpu time used:
> 0.0000secon
> ds]
>
> yes
> | ?-
>
>
>
> new file:
>
> a( 1, b([]) ).
>
> | ?- load_dync(n).
> [C:\work\windows\scanner\xsb\n.P dynamically loaded, cpu time used:
> 0.0000secon
> ds]
>
> yes
> | ?-
>
>
>
>
>
> The only difference is [ ] and []. An extra space between [ and ] in
> failure case.
>
-------------------------------------------------------------------------
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/
|