Table Of ContentLecture Notes in Computer Science 825
Edited by G. Goos and J. Hartmanis
Advisory Board: W. Brauer D. Gries J. Stoer
.J Maluszyfiski .M Wirsing (Eds.)
gnimmargorP egaugnaL
noitatnemelpmI dna
cigoL gnimmargorP
PLILP '91 Symposium, International 3rd
August Germany, Passau, 26-28, 1991
Proceedings
galreV-regnirpS
Berlin Heidelberg kroYweN
London Paris Tokyo
gnoH Kong Barcelona
tsepaduB
Series Editors
Gerhard Goos Juris Hartmanis
GMD Forschungsstelle Department of Computer Science
Universit~it Karlsruhe Cornell University
Vincenz-Priessnitz-StraBe 1 Upson Hall
W-7500 Karlsruhe, FRG Ithaca, NY 14853, USA
Volume Editors
Jan Maluszyfiski
Department of Computer and Information Science
Linkrping University, S-581 83 Linkrping, Sweden
Martin Wirsing
Fakult~it for Mathematik und Informatik, Universitat Passau
Postfach 25 40, W-8390 Passau, FRG
CR Subject Classification (1991): F.4.1-2, D.3.1, D.3.4, F.3.3, 1.2.3
ISBN 3-540-54444-5 Springer-Verlag Berlin Heidelberg New York
ISBN 0-387-54444-5 Springer-Verlag New York Berlin Heidelberg
This work is subject to copyright. All rights are reserved, whether the whole or part of
the material is concerned, specifically the rights of translation, reprinting, re-use of
illustrations, recitation, broadcasting, reproduction on microfilms or in other ways, and
storage in data banks. Duplication of this publication or parts thereof is only permitted
under the provisions of the GermanC opyright Law of September 9, 1965, in its current
version, and a copyright fee must always be paid.V iolations fall under the prosecution
act of the German Copyright Law.
© Springer-Verlag Berlin Heidelberg 1991
Printed in Germany
Typesetting: Camera ready by author
Printing and binding: Druckhaus Beltz, HemsbachfBergstr.
2145/3140-543210 - Printed on acid-free paper
Preface
This volume contains the papers which have been accepted for presentation at the Third In-
ternational Symposium on Programming Language Implementation and Logic Programming
(PLILP '91) held in Passau, Germany, August 26-28, 1991. The Symposium was preceded
by two workshops which took place in Orldans, France, May 16-18, 1988 and in Link6plng,
Sweden, August 20-22, 1990 (their proceedings were published as LNCS volumes 348 and 456
respectively).
The aim of the Symposium was to explore new declarative concepts, methods and techniques
relevant for the implementation of all kinds of programming languages, whether algorithmic
or declarative ones. The intention was to gather researchers from the fields of algorithmic
programming languages as well as logic, functional and object-oriented programming.
In response to the call for papers, 96 papers were submitted. The Program Committee met
on April 30 and selected 32 papers, chosen on the basis of their scientific quality and relevance
to the Symposium. At the Symposium, two invited talks were given by Hassan Ai't-Kaci and
David B. MacQueen. Several software systems were presented, showing new developments in
the implementation of programming languages and logic programming.
This volume contains the two invited presentations, the selected papers and abstracts of the
system demonstrations.
On behalf of the Program Committee the Program Chairmen would like to thank all those who
submitted papers and the referees who helped to evaluate the papers.
The support of
ALP (Association of Logic Programming),
FORWISS (Bayer. Forschungszentrum flit Wissensbasierte Systeme),
INRIA (Institut National de Recherche en Informatique et en Automatique),
University of Passau
is gratefully acknowledged. Andy Miick, Margit Berger, Heidrun Walker and several other mem-
bers of the department provided invaluable help throughout the preparation and organization
of the Symposium. We also would like to thank Springer-Verlag for their excellent cooperation
concerning the publication of this volume.
June 1991
gnip6kniL Jan iksiIyzsulaM
Passau Wirsing Martin
IV
Conference Chairmen
Martin Wirsing, Univ. of (FItG) Passau
Jan Maluszyfiski, LinkSping University (Sweden)
Program Committee
Maurice Bruynooghe, Katholieke Univ. Leuven (Belgium)
Pierre Deransart, INRIA, Itocquencourt (France)
Seif Haridi, SICS, Stockholm (Sweden)
Stefan J~nichen, GMD, Univ. of Karlsruhe (FRG)
Claude Kirchner, INRIA Lorraine, CItIN, Nancy (France)
Bernard Lang, INRIA, P~cquencourt (France)
Giorgio Levi, Univ. of Pisa (Italy)
Gary Lindstrom, Univ. of Utah, Salt Lake City (USA)
Heikki Mannila, Univ. of Helsinki (Finland)
Torben Mogensen, Univ. Copenhagen (Denmark)
Jaan Penjam, Estonian Academy of Sciences, TaUin (USSIt)
Masataka Sassa, Univ. of Tsukuba (Japan)
Pdter Szeredi, SzKI Budapest (Hungary)
Iteinhard Wilhelm, Univ. of Saa~briicken (FItG)
List of Referees
Many other referees helped the Program Committee in evaluating papers. Their assistance is
gratefully acknowledged.
V. AkeUa B. Briiderlin V. Dumortier
K. Ali J. Burghardt T. Ehler
M. Alpuente M. Carlsson C. Eisenbeis
M. Alt D. Caromel H. Emmelmann
N. Andersen V. Cengarle M. Falaschl
U. Assmann P.H. Cheoag C. Fecht
E. Astesiano H. Christiansen A. Felty
K. Balogh S. Cluet A. Feng
It. Barbuti M. Codish C. Ferdinand
E. Bertino P. Codognet G. Ferrand
B. Bertolino D. Craeynest D. Fortin
A. Blikle F. Dederichs U. Fraus
It. Bol E. De La Clergerie L. Fribourg
P. Bonatti D. De Schreye Y. Futamura
A. Bondoff B. Demoen M. GabbrieUi
S. Bonnier M. Denecker It. Gabriel
A. Bossi L. Dewez H. Ganzinger
J.-L. Bouquard Y. DeviUe M. Gengenbach
M. Breu It. Dietrich L. George
A. Brogi W. Drabent A. Geser
IIV
R. izzabocaiG T. Langer A. Qu4r4
.Y-.P Gloess J. Leszczylowski M. Raber
G. Gonthier H. Lock T. Rapcsgk
.J Goossenaerts J. Loeckx F. Regensburger
N. Graham A. Lomp P. R&y
R. Grosu P. Mancarella B. Reus
S. Grumbach L. Mandel M. Rosendahl
M. Hanus S. Mantha F. Rossi
A. Haxaldsson L. Maranget F. Rouaix
B. Hausman A. Mari~n M. RusinowRch
R. Heckmann A. M~rkus K. Sa~ai
F. Henglein B. Martens D. Saktin
R. Hennicker M. Martelli G. Sander
J. Henno M. Matskin B. Schieder
A. Hui Boll Hoa M. Mazaud R. Schott
H. Hugmann A. Megrelis H. Sddl
T. Ida P. Mello R. Stabl
J.M. Jacquet D. Mery T. Streicher
R. Jagadeesan B. MSller M. Suarez
S. Janson D. Montesi D. Subramanian
G. snessnaJ R. Moolenaar M. st6zS
B. Jayaraman T. Moore O.-M. Tammepuu
M. Jourdan A. Mfick T. Tammet
R. Kaivola .F M~ller N. Tamura
U. Kastens A. N~mmura J. Tarhio
R. Kegler H. Nakamura J. Tepandi
P. KUpelginen D. Nazareth T. Tokuda
H. Kirchner .F lkciN F. Turini
Y. Kiyoki U. nossliN E. Ukkonen
F. Kluzniak K. Ohmald A. Van Acker
G. Koch .S Okui K. Verschaetse
G. Kock J. Paakki P. Viry
L.B. Kov~cs P. Padawitz J. VoUmer
S. Krisher D. Parigot K. Wada
K. Kuchcinski D. Pedreschi .P Weemeeuw
K. Kuse V. Pollara D. Yves
A. LMouet Queinnec C. .J Zachary
Table of Contents
Invited Lecture: Standard ML of New Jersey
A.W. Appel and D.B. MacQueen ................................................... 1
Session: Functional and Logic Programming
Adding Equations to NU-Prolog
L. Naish .......................................................................... 51
Extraction of Functionalf rom Logic Program
S. Yamasaki ...................................................................... 27
Session: Integration of Programming Concepts I
The Mas Specification Component
H. Kredel ......................................................................... 39
Domesticating Imperative Constructs so that They Can Live in a Functional World
T.C.N. Graham and G. Kock ...................................................... 15
Session: Compiler Construction I
Logic-Based Specification of Visibility Rules
A. Poetzsch-Heffter ............................................................... 63
Optimal Instruction Scheduling Using Constraint Logic Programming
M.A. grtl and A. Krall ........................................................... 75
Session: Parallel Implementations
An Architectural Model for OR-Parallellism on Distributed Memory Systems
F. Baiardi and D.M. Di Bella ..................................................... 87
FRATS: A Parallel Reduction Strategy for Shared Memory
K.G. Langendoen and W.G. Vree .................................................. 99
Session: Narrowing
Narrowing as an Incremental Constraint Satisfaction Algorithm
M. Alpuente and .1/11 Falaschi ..................................................... 111
The Implementation of Lazy Narrowing
.1/11.11t T. Chakravart 9 and H.C.R. Lock ............................................ 321
Session: Semantics
Semantics-Directed Generation of a Prolog Compiler
C. Consel and Siau Cheng Khoo .................................................. 531
A Framework to Specify Database Update Views for Prolog
E. Boerger and B. Demoen ....................................................... 147
X
Session: Modular Logic Programming
Concepts for a Modular and Distributed Prolog Language
S. Ferenczi ...................................................................... 951
From Parlog to Polka in Two Easy Steps
A. Davison ...................................................................... 171
Session: Compiler Construction II
Precedences in Specifications and Implementations of Programming Languages
A. Aasa ......................................................................... 381
A Randomized Heuristic Approach to Register Allocation
C. .rH Kefller, W.J. Paul and T. Rauber .......................................... 591
Generating Efficient Code from Data-Flow Programs
N. Halbwachs, P. Raymond and C. Ratel ......................................... 702
Session: Grammars
On the Borderline Between Grammars and Programs
C.H.A. Koster and J.G. Beney ................................................... 912
Efficient Incremental Evaluation of Higher Order Attribute Grammars
H. Vog~ D. Swierstra and M. Kuiper ............................................. 132
PROFIT: A System Integrating Logic Prograrnming and Attribute Grammars
J. Paakki ........................................................................ 243
Invited Lecture: Towards a Meaning of LIFE
H. Ai't-Kaci and A. Podelski ..................................................... 552
Session: Extension of Logic Programming
U-Log, an Ordered Sorted Logic with Typed Attributes
P. Y. Gloess ...................................................................... 572
Compilation of Predicate Abstractions in Higher-Order Logic Programming
H .r Chen and D.S. Warren ....................................................... 782
Session: Abstract Interpretation
Abstract Interpretation: A Kind of Magic
U. Nilsson ....................................................................... 299
Abstract Interpretation for Type Checking
G. FiI~ and P. Sottero ........................................................... 113
A Technique for Recursive Invariance Detection and Selective Program
Specialization
F. Giannotti and M. Hermenegildo ............................................... 323
1×
Session: Optimization Techniques
Dynamic Detection of Determinism in Functional Logic Languages
R. Loogen and S. Winkler ........................................................ 533
Unfolding-Definition-Folding, in this Order, for Avoiding
Unnecessary Variables in Logic Programs
M. Proietti and A. Pettorossi .................................................... 743
Session: Integration of Programming Concepts II
Efficient Integration of Simplification into Prolog
P.H. Cheon9 and L. Fribour9 ..................................................... 953
Lazy Evaluation in Logic
S. Antoy ......................................................................... 173
S-SLD-Resolution - An Operational Semantics for Logic Programs
with External Procedures
J. Boye .......................................................................... 383
Session: Constraint Logic Programming
Operational Semantics of Constraint Logic Programming over Finite Domains
P. Van Hentenryck and Y. DevilIe ............................................... 593
Constraints for Synchronizing Coarse-gained Sequential Logic Processes
A. Brogi and M. Gabbrielli ....................................................... 704
System Demonstrations:
Extending Execution Trees for Debugging and Animation in Logic Programming
D. Loyola ........................................................................ 914
A Narrowing-Based Theorem Prover
U. Fruus and H. Huflmann ....................................................... 124
The ALF System
M. Hanus ........................................................................ 324
Experiences with Gentle: Efficient Compiler Construction Based on
Logic Programming
J. Vollmer ....................................................................... 524
The System FLR (Fast Laboratory for Recomposition)
B. Baum and P. Forbrig ......................................................... 724
Multilanguage Interoperability
G. Attardi and M. Gaspari ....................................................... 924
Short Overview of the CLPS System
B. Legeard and E. Legros ......................................................... 134
Standard LM of New Jersey
Andrew W. Appel* David B. MacQueen
Princeton University AT&T Bell Laboratories
Abstract translated into a lower-level intermediate language.
This is the ~ront end" of the compiler. Then
The Standard ML of New Jersey compiler has been the intermediate language--Continuation-Passing
under development for five years now. We have Style-is "optimized," closures are introduced to
developed a robust and complete environment for implement lexical scoping, registers are allocated,
Standard ML that supports the implementation of target-machine instructions are generated, and (on
large software systems and generates code. efficient RISC machines) instructions are scheduled to avoid
The compiler has also served as a laboratory for de- pipeline delays; these together constitute the "back
veloping novel implementation te~hn|ques for a so- end."
phisticated type and module system, continuation
based code generation, efficient pattern matching, Parsing
2
and concurrent programming features.
Early in the development of the compiler ew used
1 Introduction a hand-written lexical analyzer and a recursive-
descent parser. In both of these components the
Standard ML o/ New Jersey is a compiler and code for semantic analysis was intermixed with
programming environment for the Standard LM the parsing code. This made error recovery dif-
language[26] that has been continuously developed ficult, and it was difficult to understand the syn-
tax or semantics individually. We now have ex-
since early 1986. Our initial goal was to produce
a working ML front end and interpreter for pro- ceilent tools[8, ]23 for the automatic generation of
gramming language research, but the scope of the lexical analyzers and error-correcting parsers. Syn-
projechta s expanded considerably. believe We that tactic error recovery is handled automatically by
Standard ML may be the best general-Imrpose pro- the parser generator, and semantic actions are only
gramming language yet developed; to demonstrate evaluated on correct (or corrected) parses. This has
this, we must provide high-quality, robust, and -iffe greatly improved both the quality of the error mes-
cient tools for software engineering. sages and the robustness of the compiler on incor-
rect inputs. eW remark that it would have been
Along the way ew have learned many useful
helpful if the definition of Standard ]62[LM had in-
things about the design and implementation of
"modern" programming langlm.ges. There were cluded an LR(1) grammar for the language.
There are two places in the ML grammar that
some unexpected interactions between the mod-
appear not to be context free. One is the treat-
ule system, type system, code generator, debugger,
ment of data constructors: according to the def-
garbage collector, runtime data format, and hard-
inition, constructor names are in a different lexi-
,;eraw and some things were much easier than ex-
ca] class than variable names, even though the dis-
pected. We wrote an early description of the com-
tinction depends on the semantic analysis of pre-
piler in the sporfi ng ,]717891 but almost every com-
vious datat3rpe definitions. However, by putting
ponent of the compiler has since been redesigned
constructors and variables into the same class of
and reimplemented at least once, so it is worthwhile
lexical tokens, and the same name space, parsing
to provide an updated overview of the system and
can be done correctly and tresolved he difference in
our implementation experience.
semantic analysis.
Our compiler is structured in a rather conven-
The other context-dependent aspect of syntax is
tional way: the input stream is broken into tokens
thep arsing of infix identifiers. ML allows the pro-
by a lexical analyzer, parsed according to a context-
grammer to specify any identifier as infix, with an
free grammar, semantically analyzed into an an-
operator precedence ranging from 0 to 9. Our solu-
notated abstract syntax tree, type-checked, and
tion to this problem is to completely ignore operator
*Supported in part by NSF grant .6872009~ICC precedence in writing our LALB.(1) grammar; the