Prolog - SWI specifically - where is pl located?
I'm trying开发者_运维技巧 to set up an environment with interprolog and SWI prolog, interprolog needs the location of swi's "pl" but i cant find it. All i can find is swipl or plrc and neither work with interprolog. If i type pl into the terminal(this should run swi-prolog) it says
bash: pl :command not found
but if i type in
swipl
or
prolog
it runs swiprolog fine.
the thing is interprolog requires pl, which i cant seem to find.
anyone have any ideas how i can get around this?
thanks
which swipl
will tell you where the swipl binary lives.
However, you need some way to make "pl" mean the same thing as "swipl"
To do that, you need to alias pl to swipl.
The code alias pl='swipl'
will do that in BASH.
so after aliasing, you could start interprolog from the command line and see if it works.
I am not sure if you have it worked out. Ideally, this is what you should do:
- Open
runSWISPListener.sh
. - Change
${SWI_BIN_DIRECTORY}/pl
to${SWI_BIN_DIRECTORY}/swipl
It will then work fine.
Have I understood your question, Is pl a symbolic link to the prolog software? Check the location of the pl
executable by where pl
or
maybe you need to make the prolog source code .pl
executable and add a header at the top of it...
#! /bin/swiprolog -f ; Prolog code here...
And use chmod u+x some_file.pl
. Then when bash executes, it checks to see the top bit of the file '#! /bin/swiprolog -f', I'm using the '-f' switch to say pass it into the prolog interpreter...check your documentation...
Hope this helps, Best regards, Tom.
精彩评论