# Liquid resource types

@article{Knoth2020LiquidRT, title={Liquid resource types}, author={Tristan Knoth and Di Wang and Adam Reynolds and Jan Hoffmann and Nadia Polikarpova}, journal={Proceedings of the ACM on Programming Languages}, year={2020}, volume={4}, pages={1 - 29} }

This article presents liquid resource types, a technique for automatically verifying the resource consumption of functional programs. Existing resource analysis techniques trade automation for flexibility – automated techniques are restricted to relatively constrained families of resource bounds, while more expressive proof techniques admitting value-dependent bounds rely on handwritten proofs. Liquid resource types combine the best of these approaches, using logical refinements to…

## Figures and Tables from this paper

## 6 Citations

### Mechanizing Refinement Types (extended)

- Computer ScienceArXiv
- 2022

A core reﬁnement calculus that combines semantic subtyping and parametric polymorphism is presented, a metatheory for this calculus is developed, and soundness of the type system is proved.

### Statically verified refinements for multiparty protocols

- Computer ScienceProc. ACM Program. Lang.
- 2020

With distributed computing becoming ubiquitous in the modern era, safe distributed programming is an open challenge. To address this, multiparty session types (MPST) provide a typing discipline for…

### Mechanizing Refinement Types

- Mathematics
- 2022

Practical checkers based on reﬁnement types use the combination of implicit semantic subtyping and parametric polymorphism to simplify the speciﬁcation and automate the veriﬁcation of sophisticated…

### Denotational semantics as a foundation for cost recurrence extraction for functional languages

- Computer ScienceJournal of Functional Programming
- 2022

This work gives a formal account of a standard informal method to extract a recurrence that describes its cost in terms of the size of its input and then to compute a closed-form upper bound on that recurrence.

### Continuous Verification of Machine Learning: a Declarative Programming Approach

- Computer SciencePPDP
- 2020

It is argued that methods of continuous verification must rely on robust programming language infrastructure (refinement types, automated proving, type-driven program synthesis), which provides a major opportunity for the declarative programming language community.

### Grammatical Evolution Mapping for Semantically-Constrained Genetic Programming

- Genetic and Evolutionary Computation
- 2022

## References

SHOWING 1-10 OF 52 REFERENCES

### Towards automatic resource bound analysis for OCaml

- Computer SciencePOPL
- 2017

This article presents a resource analysis system for OCaml programs that automatically derives worst-case resource bounds for higher-order polymorphic programs with user-defined inductive types and preserves the expressivity and efficiency of existing AARA techniques.

### Static determination of quantitative resource usage for higher-order programs

- Computer SciencePOPL '10
- 2010

A new automatic static analysis for determining upper-bound functions on the use of quantitative resources for strict, higher-order, polymorphic, recursive programs dealing with possibly-aliased data is described, using a type-based approach.

### Liquid types

- Computer SciencePLDI '08
- 2008

We present Logically Qualified Data Types, abbreviated to Liquid Types, a system that combines Hindley-Milner type inference with Predicate Abstraction to automatically infer dependent types precise…

### Resource-guided program synthesis

- Computer SciencePLDI
- 2019

The experiments show that ReSyn synthesizes programs that are asymptotically more efficient than those generated by a resource-agnostic synthesizer, and is faster than a naive combination of synthesis and resource analysis.

### TiML: a functional language for practical complexity analysis with invariants

- Computer ScienceProc. ACM Program. Lang.
- 2017

TiML, though lacking full automation and theoretical completeness, is versatile enough to verify worst-case and/or amortized complexities for algorithms and data structures like classic list operations, merge sort, Dijkstra's shortest-path algorithm, red-black trees, Braun trees, functional queues, and dynamic tables with bounds like m n logn.

### Quantitative program reasoning with graded modal types

- Computer ScienceProc. ACM Program. Lang.
- 2019

This work proposes the umbrella notion of graded modal types, encompassing coeffect types and dual notions of type-based effect reasoning via graded monads, and demonstrates this approach via a type system embodied in a fully-fledged functional language called Granule.

### Static prediction of heap space usage for first-order functional programs

- Computer SciencePOPL '03
- 2003

It is shown how to efficiently obtain linear a priori bounds on the heap space consumption of first-order functional programs and that integral solutions to the linear programs derived correspond to programs that can be evaluated without any operating system support for memory management.

### Bounded Linear Types in a Resource Semiring

- Computer Science, MathematicsESOP
- 2014

This paper introduces a bounded linear typing discipline on a general notion of resource which can be modeled in a semiring, and provides both a general type-inference procedure and a coherent categorical semantics for this type system.

### Control-flow refinement and progress invariants for bound analysis

- Computer SciencePLDI '09
- 2009

This paper describes two techniques, control-flow refinement and progress invariants, that together enable estimation of precise bounds for procedures with nested and multi-path loops, and presents an algorithm that uses progress invariant to compute precise limits for nested loops.

### Refinement types for ML

- Computer SciencePLDI '91
- 1991

A type system called refinement types is described, which is an example of a new way to make this tradeoff, as well as a potentially useful system in itself.