Lecture Notes in Computer Science 5083 Commenced Publication in 1973 Founding and Former Series Editors: Gerhard Goos, Juris Hartmanis, and Jan van Leeuwen Editorial Board David Hutchison Lancaster University, UK Takeo Kanade Carnegie Mellon University, Pittsburgh, PA, USA Josef Kittler University of Surrey, Guildford, UK Jon M. Kleinberg Cornell University, Ithaca, NY, USA Alfred Kobsa University of California, Irvine, CA, USA Friedemann Mattern ETH Zurich, Switzerland John C. Mitchell Stanford University, CA, USA Moni Naor Weizmann Institute of Science, Rehovot, Israel Oscar Nierstrasz University of Bern, Switzerland C. Pandu Rangan Indian Institute of Technology, Madras, India Bernhard Steffen University of Dortmund, Germany Madhu Sudan Massachusetts Institute of Technology, MA, USA Demetri Terzopoulos University of California, Los Angeles, CA, USA Doug Tygar University of California, Berkeley, CA, USA Gerhard Weikum Max-Planck Institute of Computer Science, Saarbruecken, Germany
Olaf Chitil Zoltán Horváth Viktória Zsók (Eds.) Implementation and Application of Functional Languages 19th International Symposium, IFL 2007 Freiburg, Germany, September 2007 Revised Selected Papers 13
Volume Editors Olaf Chitil Canterbury, Kent CT2 7NF, United Kingdom E-mail: O.Chitil@kent.ac.uk Zoltán Horváth Viktória Zsók Eötvös Loránd University Faculty of Informatics Department of Programming Languages and Compilers 1117 Budapest, Hungary E-mail: {hz, zsv}@inf.elte.hu Library of Congress Control Number: 2008932855 CR Subject Classification (1998): D.3, D.1.1, D.1, F.3, C.4 LNCS Sublibrary: SL 1 Theoretical Computer Science and General Issues ISSN 0302-9743 ISBN-10 3-540-85372-3 Springer Berlin Heidelberg New York ISBN-13 978-3-540-85372-5 Springer Berlin Heidelberg New York 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 any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer. Violations are liable to prosecution under the German Copyright Law. Springer is a part of Springer Science+Business Media springer.com Springer-Verlag Berlin Heidelberg 2008 Printed in Germany Typesetting: Camera-ready by author, data conversion by Scientific Publishing Services, Chennai, India Printed on acid-free paper SPIN: 12447244 06/3180 543210
Preface This volume contains the revised selected papers of the 19th International Symposium on Implementation and Application of Functional Languages (IFL 2007) held during September 27 29, 2007 in Freiburg, Germany. IFL brings together researchers active in the area of functional programming, with an emphasis on the implementation and application of the same. IFL provides an annual open forum for researchers who wish to present and discuss new ideas and concepts, work in progress, preliminary results, etc. IFL covers a wide range of topics from theoretical aspects over language design and implementation towards applications and tool support. IFL has been held throughout Europe in The Netherlands, UK, Germany, Sweden, Spain, Ireland and Hungary. In 2007 for the first time IFL was colocated with the ACM SIGPLAN International Conference on Functional Programming (ICFP 2007) and seven affiliated workshops. IFL 2007 had a record number of 87 participants from 4 continents giving 44 presentations. These presentations were organized into 11 sessions on applications, types, contracts, compilation, parallelism, algorithms and data structures, program development, and foundations. The draft proceedings distributed during the symposium contain 44 papers and abstracts. They were published as Technical Report No. 12-07 of the Computing Laboratory, University of Kent, UK. This volume follows the IFL tradition since 1996 in publishing a high-quality subset of papers presented at the symposium in the Springer Lecture Notes in Computer Science series. All participants who gave presentations at the symposium were invited to resubmit revised versions of their contributions after the symposium. We received 33 papers, each of which was reviewed by 4 members of the Programme Committee according to normal conference standards. Following an intensive one-week discussion the Programme Committee selected 15 papers for this volume. Since 2002 the Peter Landin Prize has been awarded annually to the authors of the best paper. For 2007 the Programme Committee was pleased to award this prestigious prize to Neil Mitchell and Colin Runciman for their paper A Supercompiler for Core Haskell. IFL 2007 was generously sponsored by the Deutsche Forschungsgemeinschaft (DFG). The local organizers of the Programming Languages Group of the Department of Computer Science of the University of Freiburg ensured that the whole event ran smoothly. The Programme Committee members wrote 132 reviews in a short time frame. The conference management system EasyChair substantially simplified the work of the Programme Chair and communication
VI Preface within the Programme Committee. Last but not least we thank all participants of IFL 2007 who made it such a successful event. April 2008 Olaf Chitil Zoltán Horváth Viktória Zsók
Organization Programme Committee Peter Achten Kenichi Asai Manuel Chakravarty Olaf Chitil (chair) Martin Erwig Marc Feeley Martin Gasbichler Kevin Hammond Zoltán Horváth John Hughes Ken Friis Larsen Rita Loogen Michel Mauny Sven-Bodo Scholz Clara María Segura Díaz Tim Sheard Glenn Strong Doaitse Swierstra Malcolm Wallace Radboud University Nijmegen, The Netherlands Ochanomizu University, Japan University of New South Wales, Australia University of Kent, UK Oregon State University, Oregon, USA Université demontréal, Canada Zühlke Engineering AG, Switzerland University of St. Andrews, UK Eötvös Loránd University, Budapest, Hungary Chalmers University of Technology, Sweden University of Copenhagen, Denmark Philipps-Universität Marburg, Germany ENSTA, France University of Hertfordshire, UK Universidad Complutense de Madrid, Spain Portland State University, Oregon, USA Trinity College, Dublin, Ireland Utrecht University, The Netherlands University of York, UK Local Organization Markus Degen Peter Thiemann Stefan Wehr Albert-Ludwigs-Universität Freiburg, Germany Albert-Ludwigs-Universität Freiburg, Germany Albert-Ludwigs-Universität Freiburg, Germany Sponsoring Institutions Deutsche Forschungsgemeinschaft (DFG) Albert-Ludwigs-Universität Freiburg Additional Reviewers Tim Bauer Jost Berthold Edwin Brady Emmanuel Chailloux Chris Chambers Mischa Dieterle
VIII Organization Gabriel Ditu Péter Diviánszky Clemens Grelck Stephan Herhut Joseph Hermens Christoph Herrmann Stefan Holdermans Arthur Hughes Tom Hvitved JanMartinJansen Steffen Jost Gabriele Keller Eric Knauel Alexander Konovalov Pieter Koopman Tamás Kozsik Roman Leshchinskiy Nathan Linger László Lövei Andres Löh Bruno Monsuez Hidehiko Masuhara Morten Ib Nielsen Michael Nissen Yolanda Ortega-Mallén Miguel Palomino Ricardo Peña-Marí Yann Régis-Gianas Didier Rémy Fernando Rubio Jakob Grue Simonsen Michael Sperber Máté Tejfel Eric Walkingshaw Viktória Zsók Marko van Eekelen John van Groningen
Table of Contents Graph Parser Combinators... 1 Steffen Mazanek and Mark Minas Testing Erlang Refactorings with QuickCheck... 19 Huiqing Li and Simon Thompson Optimal Lambda Lifting in Quadratic Time... 37 Marco T. Morazán and Ulrik P. Schultz The Structure of the Essential Haskell Compiler, or Coping with Compiler Complexity... 57 Atze Dijkstra, Jeroen Fokker, and S. Doaitse Swierstra XHaskell Adding Regular Expression Types to Haskell... 75 Martin Sulzmann and Kenny Zhuo Ming Lu Partial Parsing: Combining Choice with Commitment... 93 Malcolm Wallace Lazy Contract Checking for Immutable Data Structures... 111 Robert Bruce Findler, Shu-yu Guo, and Anne Rogers The Reduceron: Widening the von Neumann Bottleneck for Graph Reduction Using an FPGA... 129 Matthew Naylor and Colin Runciman A Supercompiler for Core Haskell... 147 Neil Mitchell and Colin Runciman Checking Dependent Types Using Compiled Code: Preliminary Report... 165 Dirk Kleeblatt Debugging Lazy Functional Programs by Asking the Oracle... 183 Bernd Braßel and Holger Siegel Uniqueness Typing Simplified... 201 Edsko de Vries, Rinus Plasmeijer, and David M. Abrahamson Tabular Expressions and Total Functional Programming... 219 Baltasar Trancón y Widemann and David Lorge Parnas Speculative Inlining of Predefined Procedures in an R5RS Scheme to C Compiler... 237 Marc Feeley
X Table of Contents From Contracts Towards Dependent Types: Proofs by Partial Evaluation... 254 Stephan Herhut, Sven-Bodo Scholz, Robert Bernecky, Clemens Grelck, and Kai Trojahner Author Index... 275