Resource Specifications for Resource-Manipulating Programs

04/25/2023
by   Zachary Grannan, et al.
0

Specifications for modular program verifiers are expressed as constraints on program states (e.g. preconditions) and relations on program states (e.g. postconditions). For programs whose domain is managing resources of any kind (e.g. cryptocurrencies), such state-based specifications must make explicit properties that a human would implicitly understand for free. For example, it's clear that depositing into your bank account will not change other balances, but classically this must be stated as a frame condition. As a result, specifications for resource-manipulating programs quickly become verbose and difficult to interpret, write and debug. In this paper, we present a novel methodology that introduces user-defined first-class resources in the specification language, allowing resource-related operations and properties to be expressed directly and eliminating the need to reify implicit knowledge in the specifications. We implement our methodology as an extension of the program verifier Prusti, and use it to verify a key part of a real-world blockchain application. As we demonstrate in our evaluation, specifications written with our methodology are more concise, syntactically simpler, and easier to understand than alternative specifications written purely in terms of program states.

READ FULL TEXT

page 1

page 3

research
06/21/2023

Automatic Inference of Resource Leak Specifications

A resource leak occurs when a program fails to free some finite resource...
research
01/29/2020

Concise Read-Only Specifications for Better Synthesis of Programs with Pointers – Extended Version

In program synthesis there is a well-known trade-off between concise and...
research
06/12/2020

Pointer Data Structure Synthesis from Answer Set Programming Specifications

We develop an inductive proof-technique to generate imperative programs ...
research
04/15/2019

Specifying Concurrent Programs in Separation Logic: Morphisms and Simulations

In addition to pre- and postconditions, program specifications in recent...
research
09/05/2020

Computer Program Decomposition and Dynamic/Behavioral Modeling

Decomposition, statically dividing a program into multiple units, is a c...
research
07/05/2017

Information-gain computation

Despite large incentives, ecorrectness in software remains an elusive go...
research
11/06/2014

The Spaces of Data, Information, and Knowledge

We study the data space D of any given data set X and explain how functi...

Please sign up or login with your details

Forgot password? Click here to reset