We show that complexity analysis of probabilistic higher-order functional programs can be carried out compositionally by way of a type system. The introduced type system is a significant extension of refinement types. On the one hand, the presence of probabilistic effects requires adopting a form of dynamic distribution type, subject to a coupling-based subtyping discipline. On the other hand, recursive definitions are proved terminating by way of Lyapunov ranking functions. We prove not only that the obtained type system, called RPCF, provides a sound methodology for average case complexity analysis, but also that it is extensionally complete, in the sense that any average case polytime Turing machines can be encoded as a term typable in RPCF. ∀l : L K J (l).∀n : n ≤ K ∧ notElem(n, l). Nat(n) ⊗ List(l) List(g | L K CntLe(l,n) (g)) ⊗ List(g | L K CntGt(l,n) (g)) (a) Type of partition. ∀l : L K J+1 (l). List(l) 1 J+1 : List(g | L K CntLe(l,Nth(l,i)) (g)) ⊗ Nat(b | b ≤ K) ⊗ List(g | L K CntGt(l,Nth(l,i)) (g)) | i ≤ J (b) Type of ppartition. List(l | L K J+1 (l)). 1 J+1 : List(g | L K c (g)) ⊗ Nat(b | b ≤ K) ⊗ List(g | L K J−c (g)) | c ≤ J (c) Subtype of type ppartition.
Type systems as a technique to analyse or control programs have been extensively studied for functional programming languages. In particular some systems allow to extract from a typing derivation a complexity bound on the program. We explore how to extend such results to parallel complexity in the setting of the pi-calculus, considered as a communication-based model for parallel computation. Two notions of time complexity are given: the total computation time without parallelism (the work) and the computation time under maximal parallelism (the span). We define operational semantics to capture those two notions, and present two type systems from which one can extract a complexity bound on a process. The type systems are inspired both by size types and by input/output types, with additional temporal information about communications.
Type systems as a technique to analyse or control programs have been extensively studied for functional programming languages. In particular some systems allow to extract from a typing derivation a complexity bound on the program. We explore how to extend such results to parallel complexity in the setting of the pi-calculus, considered as a communication-based model for parallel computation. Two notions of time complexity are given: the total computation time without parallelism (the work) and the computation time under maximal parallelism (the span). We define operational semantics to capture those two notions, and present two type systems from which one can extract a complexity bound on a process. The type systems are inspired both by sized types and by input/output types, with additional temporal information about communications.
No abstract
Several type systems have been proposed to statically control the time complexity of lambda-calculus programs and characterize complexity classes such as FPTIME or FEXPTIME. A first line of research stems from linear logic and defines type systems based on restricted versions of the "!" modality controlling duplication. An instance of this is light linear logic for polynomial time computation [Girard98]. A second perspective relies on the idea of tracking the size increase between input and output, and together with a restricted use of recursion, to deduce from that time complexity bounds. This second approach is illustrated for instance by non-size-increasing types [Hofmann99]. However both approaches suffer from limitations. The first one, that of linear logic, has a limited intensional expressivity, that is to say some natural polynomial time programs are not typable. As to the second approach it is essentially linear, more precisely it does not allow for a non-linear use of functional arguments. In the present work we adress the problem of incorporating both approaches into a common type system. The source language we consider is a lambda-calculus with data-types and iteration, that is to say a variant of Godel's system T. Our goal is to design a system for this language allowing both to handle non-linear functional arguments and to keep a good intensional expressivity. We illustrate our methodology by choosing the system of elementary linear logic (ELL) and combining it with a system of linear size types. We discuss the expressivity of this new type system and prove that it gives a characterization of the complexity classes FPTIME and 2k-FEXPTIME, for k ě 0.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
hi@scite.ai
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.