Relational Cost Analysis for Functional-Imperative Programs
Weihao Qu, Marco Gaboardi, Deepak Garg

TL;DR
This paper introduces ARel, a type-and-effect system for relational cost analysis of array-manipulating functional-imperative programs, enabling precise bounds on evaluation cost differences between program executions.
Contribution
It presents a novel lightweight type refinement discipline integrated with Hoare triples to reason about relative costs in array-based programs.
Findings
Successfully establishes bounds on cost differences for array manipulations.
Enables reasoning about cost differences in higher-order functional-imperative programs.
Provides a formal framework for relational cost analysis using ARel.
Abstract
Relational cost analysis aims at formally establishing bounds on the difference in the evaluation costs of two programs. As a particular case, one can also use relational cost analysis to establish bounds on the difference in the evaluation cost of the same program on two different inputs. One way to perform relational cost analysis is to use a relational type-and-effect system that supports reasoning about relations between two executions of two programs. Building on this basic idea, we present a type-and-effect system, called ARel, for reasoning about the relative cost of array-manipulating, higher-order functional-imperative programs. The key ingredient of our approach is a new lightweight type refinement discipline that we use to track relations (differences) between two arrays. This discipline combined with Hoare-style triples built into the types allows us to express and…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
