Liquid Resource Types

06/29/2020
by   Tristan Knoth, et al.
0

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 automatically prove precise bounds on a program's resource consumption. The type system augments refinement types with potential annotations to conduct an amortized resource analysis. Importantly, users can annotate data structure declarations to indicate how potential is allocated within the type, allowing the system to express bounds with polynomials and exponentials, as well as more precise expressions depending on program values. We prove the soundness of the type system, provide a library of flexible and reusable data structures for conducting resource analysis, and use our prototype implementation to automatically verify resource bounds that previously required a manual proof.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/16/2019

Resource-Guided Program Synthesis

This article presents resource-guided synthesis, a technique for synthes...
research
01/05/2018

Verifying and Synthesizing Constant-Resource Implementations with Types

We propose a novel type system for verifying that programs correctly imp...
research
04/26/2023

Automatic Amortized Resource Analysis with Regular Recursive Types

The goal of automatic resource bound analysis is to statically infer sym...
research
08/18/2021

Selectively-Amortized Resource Bounding (Extended Version)

We consider the problem of automatically proving resource bounds. That i...
research
08/06/2019

A Transformational Approach to Resource Analysis with Typed-norms Inference

In order to automatically infer the resource consumption of programs, an...
research
01/28/2021

Type-Based Analysis of Logarithmic Amortised Complexity

We introduce a novel amortised resource analysis couched in a type-and-e...
research
07/22/2018

Analysis of Logarithmic Amortised Complexity

We introduce a novel amortised resource analysis based on a potential-ba...

Please sign up or login with your details

Forgot password? Click here to reset