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