Hostname: page-component-76fb5796d-x4r87 Total loading time: 0 Render date: 2024-04-27T02:48:40.129Z Has data issue: false hasContentIssue false

iRho: an imperative rewriting calculus

Published online by Cambridge University Press:  01 June 2008

LUIGI LIQUORI
Affiliation:
INRIA Sophia Antipolis, 2004 Route des Lucioles, FR-06902France Email: Luigi.Liquori@inria.fr; Bernard.Serpette@inria.fr
BERNARD PAUL SERPETTE
Affiliation:
INRIA Sophia Antipolis, 2004 Route des Lucioles, FR-06902France Email: Luigi.Liquori@inria.fr; Bernard.Serpette@inria.fr

Abstract

We propose an imperative version of the Rewriting Calculus, a calculus based on pattern matching, pattern abstraction and side effects, which we call iRho.

We formulate both a static and big-step call-by-value operational semantics of iRho. The operational semantics is deterministic, and immediately suggests how an interpreter for the calculus may be built. The static semantics is given using a first-order type system based on a form of product types, which can be assigned to term-like structures (that is, records).

The calculus is à la Church, that is, pattern abstractions are decorated with the types of the free variables of the pattern.

iRho is a good candidate for the core of a pattern-matching imperative language, where a (monomorphic) typed store can be safely manipulated and where fixed points are built into the language itself.

Properties such as determinism of the interpreter and subject-reduction have been completely checked using a machine-assisted approach with the Coq proof assistant. Progress and decidability of type checking are proved using pen and paper.

Type
Paper
Copyright
Copyright © Cambridge University Press 2008

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Abrial, J. R. (1996) The B-Book: Assigning Programs to Meanings, Cambridge University Press.CrossRefGoogle Scholar
Asf+Sdf Team (2005) The Asf+Sdf Meta-Environment Home Page. http://www.cwi.nl/htbin/sen1/twiki/bin/view/SEN1/MetaEnvironment.Google Scholar
Barthe, G., Cirstea, H., Kirchner, C. and Liquori, L. (2003) Pure Pattern Type Systems. In: Proc. of POPL'03, The ACM Press.CrossRefGoogle Scholar
Boudol, G. and Zimmer, P. (2002) Recursion in the Call-by-Value Lambda-Calculus. In: Proc. of FICS. Note Series NS-02-2. BRICS.Google Scholar
Cirstea, H. and Kirchner, C. (2001) The Rewriting Calculus – Parts I and II. Logic Journal of the Interest Group in Pure and Applied Logics 9 (3)427498.Google Scholar
Cirstea, H., Kirchner, C. and Liquori, L. (2001a) Matching Power. In: Proc. of RTA. Springer-Verlag Lecture Notes in Computer Science 2051 7792.CrossRefGoogle Scholar
Cirstea, H., Kirchner, C. and Liquori, L. (2001b) The Rho Cube. In: Proc. of FOSSACS. Springer-Verlag Lecture Notes in Computer Science 2030 166180.Google Scholar
Cirstea, H., Kirchner, C. and Liquori, L. (2002) Rewriting Calculus with(out) Types. In: Proc. of WRLA. Electronic Notes in Theoretical Computer Science.Google Scholar
Cirstea, H., Liquori, L. and Wack, B. (2004) Rho-calculus with Fixpoint: First-order system. In: Proc. of TYPES, Springer-Verlag.Google Scholar
Common Criteria Consortium (2005) The Common Criteria Home Page. http://www.commoncriteria.org.Google Scholar
Cousineau, G., Curien, P.-L. and Mauny, M. (1987) The Categorical Abstract Machine. Science of Computer Programming 8 (2)173202.CrossRefGoogle Scholar
Cristal Team (2003) Concert: Compilateurs Certifiés. ARC INRIA 2003-2004. http://www-sop.inria.fr/lemme/concert.Google Scholar
Cristal Team (2005) OCaml Home page. http://www.ocaml.org/.Google Scholar
Faure, G. and Moreau, P. (2002) Jrho: a Java Implementation of the Rho Calculus. http://elan.loria.fr/Soft/jrho-0.1.tar.gz.Google Scholar
Felleisen, M. and Friedman, D. P. (1989) A Syntactic Theory of Sequential State. Theoretical Computer Science 69 (3)243287.CrossRefGoogle Scholar
Frisch, A. (2005) The Cduce Home Page. http://www.cduce.org.Google Scholar
Gamma, E., Helm, R., Johnson, R. and Vlissides, J. M. (1994) Design Patterns Elements of Reusable Object-Oriented Software, Addison-Wesley.Google Scholar
Gimenez, E. (1998) Structural Recursive Definitions in Type Theory. In: Proc. of ICALP 397–408.CrossRefGoogle Scholar
Goguen, J. (2005) The OBJ Family Home Page. http://www.cs.ucsd.edu/users/goguen/sys/obj.html.Google Scholar
Hanus, M. (1997) A Unified Computation Model for Functional and Logic Programming. In: Proc. of POPL, The ACM Press 80–93.CrossRefGoogle Scholar
Hirschowitz, T., Leroy, X. and Wells, J. B. (2003) Compilation of Extended Recursion in Call-by-Value Functional Languages. In: In Proc. of PPDP, The ACM Press.CrossRefGoogle Scholar
Huet, G. (1976) Résolution d'equations dans les langages d'ordre 1,2,. . .,ω, Ph.D. thesis, Université de Paris 7 (France).Google Scholar
Kahn, G. (1987) Natural Semantics. In: Proc. of STACS. Springer-Verlag Lecture Notes in Computer Science 247 2239.CrossRefGoogle Scholar
Kelsey, R., Clinger, W. and Rees, J. (1998) Revised5 Report on the Algorithmic Language Scheme. Higher-Order and Symbolic Computation 11 (1). (Also in ACM SIGPLAN Notices (1998) 33 (9).)Google Scholar
Klop, J. (1980) Combinatory Reduction Systems, Ph.D. Thesis, CWI Amsterdam. (Mathematical Centre Tracts, CWI, Amsterdam 127.)Google Scholar
Kowalski, R. (1979) Logic for Problem Solving, Artificial Intelligence Series, North Holland.Google Scholar
Landin, P. J. (1964) The Mechanical Evaluation of Expression. The Computer Journal 6 308320.CrossRefGoogle Scholar
Lee, K., LaMarca, A. and Chambers, C. (2003) HydroJ: Object-Oriented Pattern Matching for Evolvable Distributed Systems. In: Proc. of OOPSLA, The ACM Press.CrossRefGoogle Scholar
Leroy, X. (2005) Formal certification of a compiler back-end, or: programming a compiler with a proof assistant. (Submitted.)CrossRefGoogle Scholar
Liquori, L. and Serpette, B. (2005) Web Appendix to the current paper. http://www-sop.inria.fr/members/Luigi.Liquori/iRho.CrossRefGoogle Scholar
Logical Team (2005) The Coq Home Page. http://coq.inria.fr.Google Scholar
Martin-Löf, P. (1984) Intuitionistic Type Theory, Studies in Proof Theory 1, Bibliopolis.Google Scholar
Mason, I. A. and Talcott, C. L. (1992) References, Local Variables and Operational Reasoning. In: In Proc. of LICS 66–77.CrossRefGoogle Scholar
Maude Team (2005) The Maude Home Page. http://maude.cs.uiuc.edu/.Google Scholar
Mendler, N. P. (1987) Inductive Definition in Type Theory, Ph.D. thesis, Cornell University.Google Scholar
Mendler, N. P., Panangaden, P. and Constable, R. L. (1986) Infinite Objects in Type Theory. In: Proc. of LICS 249–255.Google Scholar
Microsoft (2005) The C# Home Page. http://msdn.microsoft.com/vcsharp/.Google Scholar
Milner, R. (1986-87) CS 3 Language Semantics. Course notes, LFCS, University of Edinburgh.Google Scholar
Milner, R., Tofte, M., Harper, R. and MacQueen, D. et al. (1997) The Definition of Standard ML (Revised), The MIT Press.CrossRefGoogle Scholar
Morrisett, G., Felleisen, M. and Harper, R. (1995) Abstract Models of Memory Management. In: Proc. of FPCA, The ACM Press 66–77.CrossRefGoogle Scholar
Peyton-Jones, S. (2003) Haskell 98 Language and Libraries, Cambridge University Press. (Also as a special issue in The Journal of Functional Programming (2003) 13 (1).Google Scholar
Plotkin, G. D. (1981) A Structured Approach to Operational Semantics. Technical Report DAIMI FN-19, Aarhus University.Google Scholar
Plotkin, G. D. (2004) The Origins of Structural Operational Semantics. J. Log. Algebr. Program. 60-61 315.CrossRefGoogle Scholar
Protheo Team (2005) The Elan Home Page. http://elan.loria.fr.Google Scholar
Riehle, D. and Züllighoven, H. (1996) Understanding and Using Patterns in Software Development. In: Theory and Practice of Object Systems 2 (1)313.3.0.CO;2-#>CrossRefGoogle Scholar
Serrano, M. (2005) The Scheme Bigloo Home Page. http://www.sop.inria.fr/mimosa/fp/bigloo/.Google Scholar
Stratego Team (2005) The Stratego Home Page. http://www.stratego-language.org.Google Scholar
Stump, A., Barrett, C. W. and Dill, D. L. (2002) CVC: A Cooperating Validity Checker. In: 14th International Conference on Computer-Aided Verification.CrossRefGoogle Scholar
Stump, A. and Schürmann, C. (2005) The Rogue Home Page. http://www.cse.wustl.edu/stump/rogue.html.Google Scholar
Sun (2005) Java Technology. http://java.sun.com/.Google Scholar
Tofte, M. (1987) Operational Semantics and Polymorphic Type Inference, Ph.D. thesis, LFCS, University of Edinburgh.Google Scholar
Tom team (2003) The Tom Home Page. http://tom.loria.fr/.Google Scholar
Van Deursen, A., Heering, J. and Klint, P. (1996) Language Prototyping, World Scientific.Google Scholar
van Oostrom, V. (1990) Lambda Calculus with Patterns. Technical Report IR-228, Faculteit der Wiskunde en Informatica, Vrije Universiteit Amsterdam.Google Scholar
Xduce Team (2005) The Xduce Home Page. http://xduce.sourceforge.net.Google Scholar