Re: (follow) Re: swi prolog script problem
Jan Wielemaker <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
Hi Dominique, On 01/08/2014 03:16 PM, db wrote: > It is curious because some predefined swi operators > can be used in the script without problem : > > test.pl -f > displays : [-f] (ok) > > test.pl -s > displays : [-s] (ok) > > but > test.pl -b > gives the mentioned error : > > essage: error(syntax_error(operator_expected), > file(/home/dominique/Bureau/Recherche/LEa1/Lea1_work > /test.pl,1,1,1)) > [PROLOG SYSTEM ERROR: Thread 1 > Undefined predicate: initialization/1 Yes, that is because -f and -s are handled by the Prolog toplevel initialization, while -b is handled very early in the C main() to decide this is a special boot-compilation run. This should be considered a bug. I'm afraid I don't have time to look into this soon. Cheers --- Jan > > Dominique > > > Le 08/01/2014 15:10, db a �crit : >> >> You are right. >> >> These parameters are used by swi prolog >> I thought (wrongly) that we could redefine them >> when using a swi prolog script. >> >> Thanks a lot >> >> Dominique >> >> >> >> Le 08/01/2014 15:07, Boris Vassilev a �crit : >>> Has something to do with the meaning of the -x and -b flags, maybe? >>> Look at >>> the very bottom of the relevant section in the manual: >>> >>> http://www.swi-prolog.org/pldoc/man?section=cmdline >>> >>> >>> On Wed, Jan 8, 2014 at 3:59 PM, db >>> <[email protected] >>>> wrote: >>> >>>> Hello, >>>> >>>> The following script "test.pl" has a strange behavior : >>>> >>>> __________________________________________ >>>> #! /usr/bin/swipl >>>> >>>> :- set_prolog_stack(local, limit(10**9)). >>>> >>>> :- initialization top. >>>> >>>> top :- >>>> current_prolog_flag(argv,LArgs), >>>> writeln(LArgs), >>>> halt. >>>> __________________________________________ >>>> >>>> >>>> When I run "test.pl -x" >>>> the result : >>>> [-x] >>>> >>>> When I run "test.pl -b" >>>> I obtain the following error : >>>> >>>> Message: error(syntax_error(operator_expected), >>>> file(/home/dominique/Bureau/Recherche/LEa1/Lea1_work >>>> /test.pl,1,1,1)) >>>> [PROLOG SYSTEM ERROR: Thread 1 >>>> Undefined predicate: initialization/1 >>>> >>>> >>>> Why ? >>>> >>>> Thanks for your ideas. >>>> >>>> I use SWI-Prolog (Multi-threaded, 64 bits, Version 7.1.4) >>>> under Ubuntu. >>>> >>>> >>>> Dominique >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> SWI-Prolog mailing list >>>> [email protected] >>>> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog >>>> >>> >>> >>> >> >> _______________________________________________ >> SWI-Prolog mailing list >> [email protected] >> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog >> >> !DSPAM:152,52cd5d1069027972618508! >> > > _______________________________________________ > SWI-Prolog mailing list > [email protected] > https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog _______________________________________________ SWI-Prolog mailing list [email protected] https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog