Differential cost analysis with simultaneous potentials and anti-potentials

Žikelić, Ðorđe, Chang, Bor-Yuh Evan, Bolignano, Pauline and Raimondi, Franco ORCID logoORCID: https://orcid.org/0000-0002-9508-7713 (2022) Differential cost analysis with simultaneous potentials and anti-potentials. PLDI 2022: Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation. In: Programming Language Design and Implementation (PLDI 2022), 13-17 June 2022, San Diego, USA. ISBN 9781450392655. [Conference or Workshop Item] (doi:10.1145/3519939.3523435)

[img]
Preview
PDF - Published version (with publisher's formatting)
Available under License Creative Commons Attribution-NonCommercial-NoDerivatives 4.0.

Download (318kB) | Preview
[img] PDF - Final accepted version (with author's formatting)
Restricted to Repository staff and depositor only
Available under License Creative Commons Attribution-NonCommercial-NoDerivatives 4.0.

Download (318kB)

Abstract

We present a novel approach to differential cost analysis that, given a program revision, attempts to statically bound the difference in resource usage, or cost, between the two program versions. Differential cost analysis is particularly interesting because of the many compelling applications for it, such as detecting resource-use regressions at code-review time or proving the absence of certain side-channel vulnerabilities. One prior approach to differential cost analysis is to apply relational reasoning that conceptually constructs a product program on which one can over-approximate the difference in costs between the two program versions. However, a significant challenge in any relational approach is effectively aligning the program versions to get precise results. In this paper, our key insight is that we can avoid the need for and the limitations of program alignment if, instead, we bound the difference of two cost-bound summaries rather than directly bounding the concrete cost difference. In particular, our method computes a threshold value for the maximal difference in cost between two program versions simultaneously using two kinds of cost-bound summaries---a potential function that evaluates to an upper bound for the cost incurred in the first program and an anti-potential function that evaluates to a lower bound for the cost incurred in the second. Our method has a number of desirable properties: it can be fully automated, it allows optimizing the threshold value on relative cost, it is suitable for programs that are not syntactically similar, and it supports non-determinism. We have evaluated an implementation of our approach on a number of program pairs collected from the literature, and we find that our method computes tight threshold values on relative cost in most examples

Item Type: Conference or Workshop Item (Paper)
Sustainable Development Goals:
Research Areas: A. > School of Science and Technology > Computer Science
Item ID: 35217
Useful Links:
Depositing User: Franco Raimondi
Date Deposited: 09 Jun 2022 16:26
Last Modified: 09 Jun 2022 16:28
URI: https://eprints.mdx.ac.uk/id/eprint/35217

Actions (login required)

View Item View Item

Statistics

Activity Overview
6 month trend
7Downloads
6 month trend
9Hits

Additional statistics are available via IRStats2.