Article View: comp.lang.prolog
Article #294Problems with ALS Prolog
From: Timo Knuutila
Date: Fri, 25 Aug 1989 13:34
Date: Fri, 25 Aug 1989 13:34
50 lines
2293 bytes
2293 bytes
This message is totally about the use of ALS Prolog, so readers not interested
may just press 'j' or whatever.
I had BIG difficulties when trying to use the foreign language interface with
Microsoft C (v. 5.1). The make-files given didn't make, and the examples and
instructions in read.me-files wouldn't just do the work they were supposed
to do. I spend long frustrating hours trying to link the obj-files and when
I finally got all the unresolved externals resolved, the result of
:- load_foreign('test.exe',user).
was one of the following:
- integer divide by 0, halting ALS worked (memory fragmented)
- whole machine jammed (power-off switch worked)
- best result: loading ok, but none of the foreign calls worked
Finally, I got things to work with the following procedure (small memory
model):
- compile source file(s) with /AS-switch (quite obvious)
- make a LIBRARY from the mscside.obj-file!!! (with lib)
- link with
obj: own file(s) main [extra if needed]
lib: [own libs] msoftc mscside
Any similar experiences? If somebody from the ALS-design group reads this,
please tell me (in this group or by e-mail) is there really some bug or
have I missed something.
Another question to the possible ALS-designer. I noticed that when compiling
clause of the form
head :- p(g(B)), q(B), r(B).
the compiler generated a put_unsafe_value-command for the last occurrence
of B. However, since B's first occurrence is inside a structure (g), it
should be globally bound later in the clause (I have ALS v. 1.2). Is this
a bug or a feature?
Don't take these flames too seriously. ALS is one of the best choices for a
PC-user. I just hope they will break the DOS memory barriers and make
something like ALS/386.
Timo Knuutila
e-mail to: knuutila@cs.utu.fi
Disclaimer: My opinions are my opinions.
Technical Details
Message-ID:
<934@tucos.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!sunic!tut!tucos!knuutilaShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!sunic!tut!tucos!knuutila From: knuutila@tucos.UUCP (Timo Knuutila) Newsgroups: comp.lang.prolog Subject: Problems with ALS Prolog Keywords: Foreign language interface, variable classification Message-ID: <934@tucos.UUCP> Date: 25 Aug 89 13:34:17 GMT Organization: University of Turku, Finland Lines: 50