Differential cost analysis with simultaneous potentials and anti-potentials

Zikelic D, Chang B-YE, Bolignano P, Raimondi F. 2022. Differential cost analysis with simultaneous potentials and anti-potentials. Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation. PLDI: Programming Language Design and Implementation, 442–457.

Download
OA 2022_PLDI_Zikelic.pdf 318.70 KB

Conference Paper | Published | English

Scopus indexed
Author
Zikelic, DjordjeISTA; Chang, Bor-Yuh Evan; Bolignano, Pauline; Raimondi, Franco
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.
Publishing Year
Date Published
2022-06-09
Proceedings Title
Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation
Acknowledgement
We thank Shaun Willows, Thomas Lugnet, and the Living Room Application Vending team for suggesting threshold bounds as a developer-friendly way to interact with a differential cost analyzer, and we thank Jim Christy, Daniel Schoepe, and the Prime Video Automated Reasoning team for their support and helpful suggestions throughout the project. We also thank Michael Emmi for feedback on an earlier version of this paper. And finally, we thank the anonymous reviewers for their useful feedback and Aws Albarghouthi for shepherding the final version of the paper. Ðorđe Žikelić was also partially supported by ERC CoG 863818 (FoRM-SMArt).
Page
442-457
Conference
PLDI: Programming Language Design and Implementation
Conference Location
San Diego, CA, United States
Conference Date
2022-06-13 – 2022-06-17
IST-REx-ID

Cite this

Zikelic D, Chang B-YE, Bolignano P, Raimondi F. Differential cost analysis with simultaneous potentials and anti-potentials. In: Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation. Association for Computing Machinery; 2022:442-457. doi:10.1145/3519939.3523435
Zikelic, D., Chang, B.-Y. E., Bolignano, P., & Raimondi, F. (2022). Differential cost analysis with simultaneous potentials and anti-potentials. In Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation (pp. 442–457). San Diego, CA, United States: Association for Computing Machinery. https://doi.org/10.1145/3519939.3523435
Zikelic, Dorde, Bor-Yuh Evan Chang, Pauline Bolignano, and Franco Raimondi. “Differential Cost Analysis with Simultaneous Potentials and Anti-Potentials.” In Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, 442–57. Association for Computing Machinery, 2022. https://doi.org/10.1145/3519939.3523435.
D. Zikelic, B.-Y. E. Chang, P. Bolignano, and F. Raimondi, “Differential cost analysis with simultaneous potentials and anti-potentials,” in Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, San Diego, CA, United States, 2022, pp. 442–457.
Zikelic D, Chang B-YE, Bolignano P, Raimondi F. 2022. Differential cost analysis with simultaneous potentials and anti-potentials. Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation. PLDI: Programming Language Design and Implementation, 442–457.
Zikelic, Dorde, et al. “Differential Cost Analysis with Simultaneous Potentials and Anti-Potentials.” Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, Association for Computing Machinery, 2022, pp. 442–57, doi:10.1145/3519939.3523435.
All files available under the following license(s):
Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0):
Main File(s)
File Name
Access Level
OA Open Access
Date Uploaded
2022-06-27
MD5 Checksum
7eb915a2ca5b5ce4729321f33b2e16e1


Export

Marked Publications

Open Data ISTA Research Explorer

Web of Science

View record in Web of Science®

Sources

arXiv 2204.00870

Search this title in

Google Scholar
ISBN Search