Lecture Notes in Computer Science
5161
Commenced Publication in 1973Founding 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
Zoltán Horváth Rinus Plasmeijer
Anna Soós Viktória Zsók (Eds.)
Central European
Functional Programming
School
Second Summer School, CEFP 2007
Cluj-Napoca, Romania, June 23-30, 2007
Revised Selected Lectures
Volume Editors Zoltán Horváth Viktória Zsók
Eötvös Loránd University, Faculty of Informatics 1117 Budapest, Hungary
E-mail: {hz, zsv}@inf.elte.hu Rinus Plasmeijer
University of Nijmegen, Faculty of Science 6500 GL Nijmegen, The Netherlands E-mail: rinus@cs.ru.nl
Anna Soós
Babe¸s-Bolyai University 400084 Cluj-Napoca, Romania E-mail: asoos@math.ubbcluj.ro
Library of Congress Control Number: 2008935561
CR Subject Classification (1998): D.1.1, D.3.2, F.3.3, D.2, D.1.5
LNCS Sublibrary: SL 1 – Theoretical Computer Science and General Issues
ISSN 0302-9743
ISBN-10 3-540-88058-5 Springer Berlin Heidelberg New York ISBN-13 978-3-540-88058-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: 12525737 06/3180 5 4 3 2 1 0
Preface
This volume presents the revised lecture notes of selected talks given at the second Central European Functional Programming School, CEFP 2007, held June 23–30, 2007 at Babe¸s-Bolyai University, Cluj-Napoca, Romania.
The summer school was organized in the spirit of the advanced program-ming schools. CEFP focuses on involving an ever-growing number of students, researchers, and teachers from central, and eastern European countries. We were glad to welcome the invited lecturers and the participants: 15 professors and 30 students from 9 different universities. The intensive program offered a creative and inspiring environment and a great opportunity to present and exchange ideas in new topics of functional programming.
The lectures covered a wide range of topics like interactive work flows for the Web, proving properties of lazy functional programs, lambda calculus and ab-stract lambda calculus machines, programming inΩmega, object-oriented func-tional programming, and refactoring in Erlang.
We are very grateful to the lecturers and researchers for the time and the effort they devoted to the talks and the revised lecture notes. The lecture notes were each carefully checked by reviewers selected from experts of functional programming. Afterwards the papers were revised once more by the lecturers. This revision process guaranteed that only high-quality papers are accepted in the volume of the lecture notes.
The PhD students were provided with a workshop, held in conjunction with the summer school. The workshop was an ideal opportunity to exchange ideas and get feedback from the lecturers about their research work. The reviewers decided to include the best papers in the revised volume of the summer school. Finally, the paper of Jan Martin Jansen was chosen as the student paper out of six presentations.
We would like to thank the work of all the members of the Program Com-mittee and the Organizing ComCom-mittee.
The web page for the summer school can be found at http://cs.ubbcluj.ro/ cefp2007/.
June 2008 Zolt´an Horv´ath Rinus Plasmeijer Anna So´os Vikt´oria Zs´ok
Organization
CEFP 2007 was organized by the Faculty of Mathematics and Computer Science, Babe¸s-Bolyai University, Cluj-Napoca, Romania.
Executive Committee
Program Chair Zolt´an Horv´ath
(E¨otv¨os Lor´and University, Hungary) Organizing Chair Anna So´os
(Babe¸s-Bolyai University, Romania) Organizing Committee Zolt´an Cs¨ornyei
(E¨otv¨os Lor´and University, Hungary) Zal´an Bod´o
Lehel Csat´o Zsolt Minier Horia F. Pop
(Babe¸s-Bolyai University, Romania)
Program Committee
Kevin Hammond University of St. Andrews, UK Zolt´an Horv´ath E¨otv¨os Lor´and University, Hungary
Rinus Plasmeijer Radboud University Nijmegen, The Netherlands Horia F. Pop Babe¸s-Bolyai University, Romania
Anna So´os Babe¸s-Bolyai University, Romania Vikt´oria Zs´ok E¨otv¨os Lor´and University, Hungary
Sponsoring Institutions
The summer school was supported by the CEEPUS program (via the CEEPUS CII-HU-19 Network) and by the Faculty of Mathematics and Computer Science, Babe¸s-Bolyai University, Cluj-Napoca.
Table of Contents
An Introduction toiTasks: Defining Interactive Work Flows for the
Web. . . . 1
Rinus Plasmeijer, Peter Achten, and Pieter Koopman
Proving Properties of Lazy Functional Programs withSparkle. . . . 41 Maarten de Mol, Marko van Eekelen, and Rinus Plasmeijer
An Introduction to the Lambda Calculus . . . . 87
Zolt´an Cs¨ornyei and Gergely D´evai
Abstractλ-Calculus Machines . . . . 112
Werner E. Kluge
Programming inΩmega . . . . 158
Tim Sheard and Nathan Linger
A Tutorial on Object-Oriented Functional Programming . . . . 228
Horia F. Pop
Use Cases for Refactoring in Erlang . . . . 250
Tam´as Kozsik, Zolt´an Cs¨ornyei, Zolt´an Horv´ath, Roland Kir´aly, R´obert Kitlei, L´aszl´o L¨ovei, Tam´as Nagy, Melinda T´oth, and Anik´o V´ıg
From Interpretation to Compilation . . . . 286
Jan Martin Jansen, Pieter Koopman, and Rinus Plasmeijer