Reference. Polynomial Time and Dependent Types
We combine dependent types with linear type systems that soundly and completely capture polynomial time computation. We explore two systems for capturing polynomial time: one system that disallows construction of iterable data, and one, based on the LFPL system of Martin Hofmann, that controls construction via a payment method. Both of these are extended to full dependent types via Quantitative Type Theory, allowing for arbitrary computation in types alongside guaranteed polynomial time computation in terms. We prove the soundness of the systems using a realisability technique due to Dal Lago and Hofmann. Our long-term goal is to combine the extensional reasoning of type theory with intensional reasoning about the resources intrinsically consumed by programs. This paper is a step along this path, which we hope will lead both to practical systems for reasoning about programs’ resource usage, and to theoretical use as a form of synthetic computational complexity theory .
Cite
Cites 51 works (8 here)
With notes (8)
A cost-aware logical framework niu-2022-a
We present calf, a cost-aware logical framework for studying quantitative aspects of functional programs. Taking inspiration from recent work that reconstructs traditional aspects of programming languages in terms of a modal account of phase distinctions, we argue that the cost structure of programs motivates a phase distinction between intension and extension. Armed with this technology, we contribute a synthetic account of cost structure as a computational effect in which cost-aware programs enjoy an internal noninterference property: input/output behavior cannot depend on cost. As a full-spectrum dependent type theory, calf presents a unified language for programming and specification of both cost and behavior that can be integrated smoothly with existing mathematical libraries available in type theoretic proof assistants. We evaluate calf as a general framework for cost analysis by implementing two fundamental techniques for algorithm analysis: the method of recurrence relations and physicist’s method for amortized analysis. We deploy these techniques on a variety of case studies: we prove a tight, closed bound for Euclid’s algorithm, verify the amortized complexity of batched queues, and derive tight, closed bounds for the sequential and parallel complexity of merge sort, all fully mechanized in the Agda proof assistant. Lastly we substantiate the soundness of quantitative reasoning in calf by means of a model construction.
Syntax and Semantics of Quantitative Type Theory atkey-2018-syntax
I Got Plenty o’ Nuttin’ mcbride-2016-i
A Coq Library For Internal Verification of Running-Times mccarthy_etal_2016
Integrating Linear and Dependent Types krishnaswami_integrating_2015
Syntax and semantics of dependent types Hofmann_1997
A mixed linear and non-linear logic: Proofs, terms and models: Extended abstract bentonMixedLinearNonlinear1995
Intuitionistic linear logic regains the expressive power of intuitionistic logic through the ! (‘of course’) modality. Benton, Bierman, Hyland and de Paiva have given a term assignment system for ILL and an associated notion of categorical model in which the ! modality is modelled by a comonad satisfying certain extra conditions. Ordinary intuitionistic logic is then modelled in a cartesian closed category which arises as a full subcategory of the category of coalgebras for the comonad. This paper attempts to explain the connection between ILL and IL more directly and symmetrically by giving a logic, term calculus and categorical model for a system in which the linear and non-linear worlds exist on an equal footing, with operations allowing one to pass in both directions. We start from the categorical model of ILL given by Benton, Bierman, Hyland and de Paiva and show that this is equivalent to having a symmetric monoidal adjunction between a symmetric monoidal closed category and a cartesian closed category. We then derive both a sequent calculus and a natural deduction presentation of the logic corresponding to the new notion of model.
Linear logic girard_linear_1987
The familiar connective of negation is broken into two operations: linear negation which is the purely negative part of negation and the modality “of course” which has the meaning of a reaffirmation. Following this basic discovery, a completely new approach to the whole area between constructive logics and programmation is initiated.
External (43)
- A Graded Modal Dependent Type Theory with a Universe and Erasure, Formalized (2023)
- Agda formalisation of Polynomial Time and Dependent Types (2023)
- A General Noninterference Policy for Polynomial Time (2023)
- Linear Dependent Type Theory for Quantum Programming Languages (2022)
- Two decades of automatic amortized resource analysis (2022)
- Idris 2: Quantitative Type Theory in Practice (2021)
- A graded dependent type system with a usage-aware semantics (2021)
- A Recursion-Theoretic Characterization of the Probabilistic Class PP (2021)
- Graded Modal Dependent Type Theory (2021)
- A unifying type-theory for higher-order (amortized) cost analysis (2021)
- Quantitative program reasoning with graded modal types (2019)
- A Fistful of Dollars: Formalizing Asymptotic Complexity Claims via Deductive Program Verification (2018)
- Computation by interaction for space-bounded functional programming (2016)
- Towards automatic resource bound analysis for OCaml (2016)
- A Core Quantitative Coeffect Calculus (2014)
- A higher-order characterization of probabilistic polynomial time (2014)
- Bounded Linear Types in a Resource Semiring (2014)
- Syntax and Semantics of Linear Dependent Types (2014)
- A Short Introduction to Implicit Computational Complexity (2012)
- A PolyTime Functional Language from Light Linear Logic (2010)
- Bounded Linear Logic, Revisited (2010)
- Realizability models and implicit complexity (2010)
- Computational Complexity (2009)
- A Semantic Proof of Polytime Soundness of Light Affine Logic (2009)
- Dependently Typed Programming in Agda (2009)
- Lightweight semiformal time complexity analysis for purely functional data structures (2008)
- First Steps in Synthetic Computability Theory (2006)
- Containers: Constructing strictly positive types (2005)
- Soft lambda-Calculus: A Language for Polynomial Time Computation (2004)
- Static prediction of heap space usage for first-order functional programs (2003)
- Realizability models for BLL-like languages (2003)
- Soft linear logic and polynomial time (2003)
- Linear types and non-size-increasing polynomial time computation (Inf. Comput. journal version) (2003)
- A syntactical analysis of non-size-increasing polynomial time computation (2002)
- A Linear Logical Framework (2002)
- Typing Lambda Terms in Elementary Logic with Linear Constraints (2001)
- The expressive power of higher-order types or, life without CONS (2001)
- Linear Types and Non-Size-Increasing Polynomial Time Computation (1999)
- Light Linear Logic (1998)
- The Zipper (1997)
- Dual Intuitionistic Linear Logic (1996)
- A new recursion-theoretic characterization of the polytime functions (1992)
- Bounded linear logic: a modular approach to polynomial-time computability (1992)