Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#190 slx_compile does not find file

Performance problem
closed-out-of-date
nobody
5
2013-08-07
2012-02-23
Anonymous
No

I am trying to follow the example for using the slx module, as given in section 16.4 of http://xsb.sourceforge.net/manual2/manual2.pdf. I am getting an error when I try to run slx_compile.

When I try this on my Windows 7, 64 bit machine I get the following:

| ?- slx_compile('test.P').
++Error[XSB/Runtime/P]: [Permission (Operation) open on file: test.P] in open/3
Forward Continuation...
... machine:xsb_backtrace/1
... standard:open/3
... standard:see/1
... loadFile/1
... x_interp:_$call/1
... x_interp:call_query/1
... standard:call/1
... standard:catch/3
... x_interp:interpreter/0
... loader:ll_code_call/3
... standard:call/1
... standard:catch/3

When I try this on my iMac, running Snow Leopard 10.6.8, I get the same thing. I then tried giving it a full path to a file and noticed something different:

| ?- slx_compile('/stuff/XSB/test.P').
++Error[XSB/Runtime/P]: [Permission (Operation) open on file: tmp/stuff/XSB/test.P] in open/3
Forward Continuation...
... machine:xsb_backtrace/1
... standard:open/3
... openToCompile/1
... predicates_are_loaded/1
... loadFile/1
... x_interp:_$call/1
... x_interp:call_query/1
... standard:call/1
... standard:catch/3
... x_interp:interpreter/0
... loader:ll_code_call/3
... standard:call/1
... standard:catch/3

It now seems to pass the earlier "see" predicate, and is attempting to open the file to compile it. Looking through the source, it seems to be appending "tmp" onto the front of the file path. However, this doesn't seem to work.

Questions:

1) Does slx require you to put your .P files in a particular directory, and if so what is this directory?
2) Why is it appending a relative "tmp" to the path instead of an absolute "/tmp"?

Any help would be greatly appreciated.

Discussion

  • Michael Kifer
    Michael Kifer
    2013-08-07

    • status: open --> closed-out-of-date
    • Group: --> Performance problem