[comp.lang.prolog] Problems with ALS Prolog

knuutila@tucos.UUCP (Timo Knuutila) (08/25/89)

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.