Type-Theoretic Functional Semantics
We describe the operational and denotational semantics of a small imperative language in type theory with inductive and recursive definitions. The operational semantics is given by natural inference rules, implemented as an inductive relation. The realization of the denotational semantics is more delicate: The nature of the language imposes a few difficulties on us. First, the language is Turing-complete, and therefore the interpretation function we consider is necessarily partial. Second, the language contains strict sequential operators, and therefore the function necessarily exhibits nested recursion. Our solution combines and extends recent work by the authors and others on the treatment of general recursive functions and partial and nested recursive functions. The first new result is a technique to encode the approach of Bove and Capretta for partial and nested recursive functions in type theories that do not provide simultaneous induction-recursion. A second result is a clear understanding of the characterization of the definition domain for general recursive functions, a key aspect in the approach by iteration of Balaa and Bertot. In this respect, the work on operational semantics is a meaningful example, but the applicability of the technique should extend to other circumstances where complex recursive functions need to be described formally.
Unable to display preview. Download preview PDF.
- 2.Yves Bertot and Ranan Fraer. Reasoning with executable specifications. In International Joint Conference of Theory and Practice of Software Development (TAPSOFT/FASE’95), volume 915 of LNCS. Springer-Verlag, 1995.Google Scholar
- 4.Ana Bove and Venanzio Capretta. Nested general recursion and partiality in type theory. In Richard J. Boulton and Paul B. Jackson, editors, Theorem Proving in Higher Order Logics: 14th International Conference, TPHOLs 2001, volume 2152 of Lecture Notes in Computer Science, pages 121–135. Springer-Verlag, 2001.CrossRefGoogle Scholar
- 5.Catherine Dubois and Véronique Viguié Donzeau-Gouge. A step towards the mechanization of partial functions: Domains as inductive predicates. Presented at CADE-15, Workshop on Mechanization of Partial Functions, 1998.Google Scholar
- 6.Peter Dybjer. A general formulation of simultaneous inductive-recursive definitions in type theory. Journal of Symbolic Logic, 65(2), June 2000.Google Scholar
- 7.Simon Finn, Michael Fourman, and John Longley. Partial functions in a total setting. Journal of Automated Reasoning, 18(1):85–104, February 1997.Google Scholar
- 9.Tobias Nipkow. Winskel is (almost) right: Towards a mechanized semantics textbook. In V. Chandru and V. Vinay, editors, Foundations of Software Technology and Theoretical Computer Science, volume 1180 of LNCS, pages 180–192. Springer, 1996.Google Scholar
- 12.The Coq Development Team. LogiCal Project. The Coq Proof Assistant. Reference Manual. Version 7.2. INRIA, 2001.Google Scholar
- 14.Freek Wiedijk and Jan Zwanenburg. First order logic with domain conditions. Available at http://www.cs.kun.nl/~freek/notes/partial.ps.gz, 2002.
- 15.Glynn Winskel. The Formal Semantics of Programming Languages, an introduction. Foundations of Computing. The MIT Press, 1993.Google Scholar