users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quintus to Gnu Prolog conversion


From: Thierry Martinez
Subject: Re: Quintus to Gnu Prolog conversion
Date: Mon, 28 Apr 2008 18:51:09 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Dear Pauline,

For Windows commmand-line:
> C:\RAPPORT\gnutesting>gplc -v lexsemact.pl
> [...]
> pl2wam -o C:\Documents and Settings\pauline\Local
> Settings\Temp\gplc2.wam prep53
> 0.pl
> input file already specified (and)
> compilation failed
> [...]

The command produced by Gnu-Prolog to run pl2wam is ill-escaped and
"and" is taken as a third argument instead of a part of "Documents and
Settings" (which explains the "(and)" output as a filename in the
error message).

Try to set TMP="C:\RAPPORT\gnutesting" before running gplc.  (Just run
the command:
    TMP="C:\RAPPORT\gnutesting"
then:
    gplc -v lexsemact.pl
)

For Cygwin:
> address@hidden /cygdrive/c/RAPPORT/gnutesting
> $ gplc prep530.pl
> prep530.pl:9: warning: singleton variables [W] for chkforpuncttag/2
> link: extra operand `/out:prep530'
> Try `link --help' for more information.

(Please check the definition of the predicate pointed out by the
warning, it is often strange to have a singleton variable in a Prolog
clause...)

Are you sure to use the Cygwin version of gplc?  If you have already
installed this version, try to execute "which gplc" to know which
version is used and change your PATH if necessary.

On Unix:
> address@hidden:/adtera/users2/krapaul > gplc prep530.pl
> prep530.pl:9: warning: singleton variables [W] for chkforpuncttag/2
> /tmp/gplcOWJSKa.o(.text+0x682): In function `predicate(write_list/2)':
> : undefined reference to `predicate(chkforpunct/2)'
> [...]

Is the predicate chkforpunct/2 defined somewhere in prep530.pl?  gplc
requires that every predicate appearing in a goal has at least one
clause which defines it.  The top-level does not require this to
produce bytecode, but the execution of a goal with such an undefined
predicate will lead to an exception anyway.

However, if chkforpunct/2 is dynamically generated by asserts, then
add ":- dynamic(chkforpunct/2)." somewhere in your code to make gplc
generate a moke for it.

-- 
Thierry.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]