Staged Specifications for Automated Verification of Higher-Order Imperative Programs

08/02/2023
by   Darius Foo, et al.
0

Higher-order functions and imperative references are language features supported by many mainstream languages. Their combination enables the ability to package references to code blocks with the captured state from their environment. Higher-order imperative programs are expressive and useful, but complicate formal specification and reasoning due to the use of yet-to-be-instantiated function parameters, especially when their invocations may mutate memory captured by or reachable from their arguments. Existing state-of-the-art works for verifying higher-order imperative behaviors are restricted in two ways: achieving strong theoretical results without automated implementations, or achieving automation with the help of strong assumptions from dedicated type systems (e.g. Rust). To enable an automated verification solution for imperative languages without the above restrictions, we introduce Higher-order Staged Separation Logic (HSSL), an extension of Hoare logic for call-by-value higher-order functions with ML-like local references. In this paper, we design a novel staged specification logic, prove its soundness, develop a new automated higher-order verifier, Heifer, for a core OCaml-like language, report on experimental results, and present various case studies investigating its capabilities.

READ FULL TEXT
research
11/28/2020

A Deductive Verification Framework For Higher Order Programs

In this report, we present the preliminary work developed for our resear...
research
11/21/2022

Higher-Order, Data-Parallel Structured Deduction

State-of-the-art Datalog engines include expressive features such as ADT...
research
10/18/2022

Compositional Reasoning for Side-effectful Iterators and Iterator Adapters

Iteration is a programming operation that traditionally refers to visiti...
research
07/25/2019

Learning higher-order logic programs

A key feature of inductive logic programming (ILP) is its ability to lea...
research
08/31/2016

Knowledge Representation Analysis of Graph Mining

Many problems, especially those with a composite structure, can naturall...
research
01/21/2021

Complete trace models of state and control

We consider a hierarchy of four typed call-by-value languages with eithe...
research
05/05/2021

Refinements of Futures Past: Higher-Order Specification with Implicit Refinement Types (Extended Version)

Refinement types decorate types with assertions that enable automatic ve...

Please sign up or login with your details

Forgot password? Click here to reset