Inferring Accumulative Effects of Higher Order Programs

📅 2024-08-05
🏛️ arXiv.org
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Existing automated techniques cannot verify general temporal safety properties—such as resource consumption, event counting, input dependence, event magnitude equality, and computational cost—expressed via register automata in higher-order programs. This paper introduces the first context-sensitive effect abstract domain for accumulator register automata, enabling precise effect summarization by jointly abstracting environments, automaton states, and accumulator values. Our approach integrates abstract interpretation, register automaton modeling, dataflow typing, and effect systems, specifically tailored for OCaml-style higher-order recursive programs. The prototype tool evDrift successfully verifies 19 out of 21 novel benchmarks—substantially outperforming Drift (9) and RCaml/PCSat (0)—with an average speedup of 30.5×. This work achieves the first efficient and precise automated verification of accumulator-driven safety properties in higher-order programs.

Technology Category

Application Category

📝 Abstract
Many temporal safety properties of higher-order programs go beyond simple event sequencing and require an automaton register (or"accumulator") to express, such as input-dependency, event summation, resource usage, ensuring equal event magnitude, computation cost, etc. Some steps have been made towards verifying more basic temporal event sequences via reductions to fair termination [Murase et al. 2016] or some input-dependent properties through deductive proof systems [Nanjo et al. 2018]. However, there are currently no automated techniques to verify the more general class of register-automaton safety properties of higher-order programs. We introduce an abstract interpretation-based analysis to compute dependent, register-automata effects of recursive, higher-order programs. We capture properties of a program's effects in terms of automata that summarizes the history of observed effects using an accumulator register. The key novelty is a new abstract domain for context-dependent effects, capable of abstracting relations between the program environment, the automaton control state, and the accumulator value. The upshot is a dataflow type and effect system that computes context-sensitive effect summaries. We demonstrate our work via a prototype implementation that computes dependent effect summaries (and validates assertions) for OCaml-like recursive higher order programs. As a basis of comparison, we describe reductions to assertion checking for effect-free programs, and demonstrate that our approach outperforms prior tools Drift and RCaml/PCSat. Overall, across a set of 21 new benchmarks, RCaml/PCSat could not verify any, Drift verified 9 benchmarks, and evDrift verified 19; evDrift also had a 30.5x over Drift on those benchmarks that both tools could solve.
Problem

Research questions and friction points this paper is trying to address.

Verifies register-automaton safety in higher-order programs.
Introduces abstract interpretation for context-dependent effects.
Computes effect summaries for recursive higher-order programs.
Innovation

Methods, ideas, or system contributions that make the work stand out.

Abstract interpretation-based analysis
Context-dependent effects abstract domain
Dataflow type and effect system
🔎 Similar Papers
No similar papers found.