Comments (3)
-s switches are accumulated in the CLInfo structure during ss_parse_command_line.
Then later
setup_search_dirs(CLInfo)
:-
arg(6, CLInfo, RevCmdLineSearch),
dreverse(RevCmdLineSearch, CmdLineSearch),
ss_init_searchdir(CmdLineSearch).
ss_init_searchdir(CmdLineList)::
ss_init_searchdir0([Path | Paths])
:-
assertz(searchdir(Path)),
ss_init_searchdir0(Paths).
The alspro files-on-commandline code eventually comes down to:
load_cl_files(CLInfo)
:-
arg(3, CLInfo, Files),
pbi_write(load_cl_files=Files),pbi_nl,
ss_load_files(Files).
The pbi_write (for the example with queens and a -s) shows:
load_cl_files=[queens.pro]
THEN:
ss_load_files([F | T])
:-
% catch( reconsult(F),
catch( simple_load(user, F),
Reason,
shell_exception(Reason)
),
ss_load_files(T).
Examining the code for simple_load, it makes no use of any searchdir assertions, but it does handle the no -s switch, but ‘<path-to….>/queens.pro’ case.
Of course, there’s no doc lying around for the change from
% catch( reconsult(F),
to
catch( simple_load(user, F),
On darwin, if I invert the % comment so that reconsult is used, the example with queens and a -s works correctly. I haven’t tried to check ubuntu or win32 yet.
I haven’t been able to imagine the reason for a change like this (probably in the 90’s), particularly for (sloppily) making such a change and not removing -s from the manual.
from alsprolog.
Note that the following works:
KB-SSD > alspro -s '/Users/ken/ALS/GitHub/ALSProlog/examples/als'
ALS Prolog (Threaded) Version v3.1.24-263-g234b474-dirty [darwin]
Copyright (c) 1987-2015 Applied Logic Systems, Inc.
?- [queens].
Attempting to consult queens...
... consulted /Users/ken/ALS/GitHub/ALSProlog/examples/als/queens.pro
yes.
from alsprolog.
Examining the old commit establishing % catch( reconsult(F), as well as surrounding commits (in time), doesn't reveal anything meaningful. Moreover, switching the % from the reconsult line to the simple_load line, makes things work ok (i.e., as desired) in all of darwin/linux/win32. So I'm going to enable the reconsult line and delete the simple_load line.
from alsprolog.
Related Issues (20)
- Improve left panel of alshelp
- Should all_procedures/4 also search the library? Or should we have companion procedure? HOT 2
- Tests for alslib
- Open options to control permissions on output streams HOT 2
- Modify default permissions for output streams
- Unknown command-line flags and/or non-existent files don't result in error code
- Output of listing/0 doesn't quoted atoms
- Develop an appealing example for the use of %p in printf HOT 3
- Freeze shell/write errors HOT 1
- put_atom/2, put_number/3 error in error display HOT 5
- printf('[]') doesn't print anything.
- Library preds should throw error when library not found
- Can't consult named-pipes via process substitution
- save_image fails if target image name contains a dash HOT 1
- Reference doc is missing for nth/3 HOT 2
- Status of interval constraint/CLP(BNR) support in ALS Prolog? HOT 2
- curl segment of 'make test' fails with call to echo server HOT 2
- Variable in export statement should raise Syntax Error
- Add basic unwind_protect doc to ref/catch.md
- length/2 loops HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alsprolog.