Re: Quintus to Gnu Prolog conversion

[email protected]
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
Dear Thierry,
I very much appreciate your patience and suggestions.

I am testing now with a simple file that has no errors, and unlike 
lexsemact, does not give stack overflow.
The following is the result:

C:\RAPPORT\gnutesting> set TMP="C:\RAPPORT\gnutesting"

C:\RAPPORT\gnutesting>gplc -v lexsemacta.pl
Prolog compiler (GNU Prolog) 1.3.0
By Daniel Diaz
Copyright (C) 1999-2007 Daniel Diaz
GNU Prolog comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Prolog
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING.

Path used: c:\gnu-prolog

*** Compiling

--- file: lexsemacta.pl
pl2wam -o \gplc2.wam lexsemacta.pl
wam2ma -o \gplc3.ma \gplc2.wam
delete \gplc2.wam
ma2asm -o \gplc4.s \gplc3.ma
delete \gplc3.ma
mingw-as -o \gplc5.obj \gplc4.s
delete \gplc4.s

*** Linking

cl -nologo -F8000000 -Felexsemacta \gplc5.obj 
c:\gnu-prolog\lib\all_pl_bips.obj
c:\gnu-prolog\lib\all_fd_bips.obj c:\gnu-prolog\lib\top_level.obj 
c:\gnu-prolog\
lib\debugger.obj c:\gnu-prolog\lib\libbips_fd.lib 
c:\gnu-prolog\lib\libengine_fd
.lib c:\gnu-prolog\lib\libbips_pl.lib c:\gnu-prolog\lib\libengine_pl.lib 
c:\gnu-
prolog\lib\liblinedit.lib advapi32.lib user32.lib ws2_32.lib /link 
/ignore:4089
/subsystem:console
Command line error D2018 : cannot create linker response file
compilation failed
deleting temporary files before exit
delete \gplc5.obj
delete \gplc5.obj

Pauline



On Mon, 28 Apr 2008, Thierry Martinez wrote:

> 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:
>> krapaul@PAULINE_D2 /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:
>> krapaul@adgate1:/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.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.