Thomas Sjöland's LPL page

I got interested in logic programming by a call for a seminar at UPMAIL arranged by Sten-Åke Tärnlund in 1981. I didn't understand much, but later read in the Stackpointer magazine an article by Martin Nilsson titled "Sticka Lill-Babs Prolog" (Lill-Babs is/was a popular singer constantly in the tabloids); "Sticka means "to knit" in swedish. Martin also published a few Prolog interpreters in LISP, which I didn't know at the time, but pedagogically enough also in Pascal, the C++ of those days. I typed in the code and with a little help from my friend Lennart Fahlén got it to run on the Pascal Microengine. The code is here.

From 1982 to 1985 I worked with CSALAB at the Royal Institute of Technology with the LPL project. I implemented a "transformer" in the experimental functional logic programming language LPL0 (by Haridi & Sahlin) that generated a p-code style code with emulated machine intructions.
I also spent some effort on translating lpl0-program into early versions of SICStus, mu-prolog and others by transforming the functional code into ordinary clausal form. This includes code for common subexpression elimination but no code for emulating the intricate heuristics used in LPL0 to select a clause based on the "degree of instantiation". The very useful I/O-predicate char_in_file of LPL0 that binds a file to a lazy list where the reading of the file is driven by the needs of the unification algorithm, is not emulated either in the generated prolog code. Sahlin tried to keep LPL0 living on his sparetime at SICS but unfortunately it was never reliably executable on machines more modern than the VAX.
You might enjoy looking at some of the documents, a.o. a short tutorial report on LPL0, report on transformation of LPL0 programs (doc-format) , or the code: LPL.

Thomas Sjöland