Execution Time of lambda-Terms via Denotational Semantics and Intersection Types

Daniel de Carvalho
DOI: https://doi.org/10.48550/arXiv.0905.4251
2009-05-27
Abstract:The multiset based relational model of linear logic induces a semantics of the type free lambda-calculus, which corresponds to a non-idempotent intersection type system, System R. We prove that, in System R, the size of the type derivations and the size of the types are closely related to the execution time of lambda-terms in a particular environment machine, Krivine's machine.
Logic in Computer Science,Computational Complexity
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to obtain information about the execution time of lambda - terms by means of semantics. Specifically, the author aims to explore the close relationship between the size of types and the size of type derivations in the non - idempotent intersection type system (System R) and the execution time of lambda - terms in a specific environment machine (Krivine's machine). ### Core Problems of the Paper 1. **Definition of Execution Time**: Execution time refers to the number of steps in a computational model. The computational model adopted in this paper is Krivine's machine, which is more realistic than beta - reduction because Krivine's machine implements weak - head linear reduction and performs at most one substitution in each step. 2. **Main Objectives**: - Determine whether the combination \((v)u\) of two closed normal lambda - terms \(v\) and \(u\) can be reduced to a head normal form. - If it can be reduced, determine the number of steps required from the initial term to the main head normal form. ### Solutions The author uses the multiset - based relational model to provide semantics for untyped lambda - calculus and introduces a non - idempotent intersection type system (System R). In this way, the author is able to relate the execution time of lambda - terms to the size of type derivations in System R. Specifically: - **Variants of Krivine Machines**: The paper presents two variants of Krivine machines, which are used to calculate the head normal form and the normal form (if they exist) of any lambda - term respectively. - **Relationship between Semantics and Execution Time**: The author proves that in the first machine, the number of execution steps of a lambda - term is equal to the size of its minimum type derivation in System R (Theorem 6.11), and obtains a similar result in the second machine (Theorem 6.18). - **True Semantic Measure**: In Subsections 6.4 and 6.5, the author further proves the true semantic measure of execution time. ### Summary The main contribution of this paper lies in establishing a semantic framework that enables the prediction of the execution time of lambda - terms by analyzing their type information. This not only helps to understand the computational complexity of lambda - calculus, but also provides a new perspective for implicitly characterizing complexity classes (such as the PTIME class).