WRS 2006 From functional programs to interaction nets via the Rewriting Calculus New evaluation strategies for functional languages Horatiu Cirstea a , Germain Faure a , Maribel Fern´andez b , Ian Mackie b,c,1 and Fran¸cois-R´egis Sinot c,1 a LORIA, BP 239 54506 Vandœuvre-l`es-Nancy Cedex, France b King’s College London, Department of Computer Science, Strand, London WC2R 2LS, U.K. c LIX, ´ Ecole Polytechnique, 91128 Palaiseau Cedex, France Abstract We use the ρ-calculus as an intermediate language to compile functional languages with pattern-matching features, and give an interaction net encoding of the ρ-terms arising from the compilation. This encoding gives rise to new strategies of evaluation, where pattern-matching and ‘traditional’ β-reduction can proceed in parallel without overheads. Keywords: pattern-matching, interaction nets, rewriting calculus 1 Introduction The λ-calculus is usually put forward as the abstract computational model un- derlying functional programming, and graph rewriting or environment machines are used to describe evaluation strategies and to derive concrete implementations (see for instance [26]). However, modern functional programming languages have pattern-matching features which cannot be directly expressed in the λ-calculus. To palliate this problem, pattern-calculi [23,22,4,6,8,13] have been introduced. The ρ- calculus [6,8] is a pattern calculus combining the expressiveness of pure functional calculi and algebraic term rewriting. It is an extension of the λ-calculus where we can abstract on patterns, not just on variables: abstractions are written (p t) Partially funded by the Alliance France-UK project “Implementation Techniques for the Rho Calculus”. 1 Projet Logical, Pˆole Commun de Recherche en Informatique du plateau de Saclay, CNRS, ´ Ecole Poly- technique, INRIA, Universit´e Paris-Sud. This paper is electronically published in Electronic Notes in Theoretical Computer Science URL: www.elsevier.nl/locate/entcs