Lune

PLDI2022Top-tier venue

Differential cost analysis with simultaneous potentials and anti-potentials

Dorde Zikelic, Bor-Yuh Evan Chang, Pauline Bolignano, Franco Raimondi

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 summariesa 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 * This paper describes work performed in part while Ðorđe Žikelić was an Applied Scientist Intern at Amazon. † Bor-Yuh Evan Chang holds concurrent appointments at the University of Colorado Boulder and as an Amazon Scholar. This paper describes work performed at Amazon and is not associated with CU Boulder. ‡ Franco Raimondi holds concurrent appointments at Middlesex University and as an Amazon Scholar. This paper describes work performed at Amazon and is not associated with Middlesex. the literature, and we find that our method computes tight threshold values on relative cost in most examples.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Proving non-termination by program reversal cites Polynomial invariant generation for non-deterministic recursive programs
  • Complete ω-Regular Supermartingale Certificates cites Quantitative Supermartingale Certificates
  • Complete ω-Regular Supermartingale Certificates cites Equivalence and Similarity Refutation for Probabilistic Programs
  • Complete ω-Regular Supermartingale Certificates cites Polynomial reachability witnesses via Stellensätze
  • Quantitative Supermartingale Certificates cites Quantitative Bounds on Resource Usage of Probabilistic Programs
  • Quantitative Supermartingale Certificates cites Equivalence and Similarity Refutation for Probabilistic Programs
  • Quantitative Supermartingale Certificates cites Polynomial reachability witnesses via Stellensätze
  • Quantitative Bounds on Resource Usage of Probabilistic Programs cites Proving non-termination by program reversal
  • Quantitative Bounds on Resource Usage of Probabilistic Programs cites Polynomial invariant generation for non-deterministic recursive programs
  • Quantitative Bounds on Resource Usage of Probabilistic Programs cites Polynomial reachability witnesses via Stellensätze
  • Equivalence and Similarity Refutation for Probabilistic Programs cites Polynomial invariant generation for non-deterministic recursive programs
  • Equivalence and Similarity Refutation for Probabilistic Programs cites A modular cost analysis for probabilistic programs
  • Equivalence and Similarity Refutation for Probabilistic Programs cites Polynomial reachability witnesses via Stellensätze
  • A modular cost analysis for probabilistic programs cites Verifying and Synthesizing Constant-Resource Implementations with Types
  • Polynomial reachability witnesses via Stellensätze cites Polynomial invariant generation for non-deterministic recursive programs
  • MDPs as Distribution Transformers: Affine Invariant Synthesis for Safety Objectives cites Proving non-termination by program reversal
  • MDPs as Distribution Transformers: Affine Invariant Synthesis for Safety Objectives cites Polynomial invariant generation for non-deterministic recursive programs
  • MDPs as Distribution Transformers: Affine Invariant Synthesis for Safety Objectives cites Polynomial reachability witnesses via Stellensätze
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. Quantitative Bounds on Resource Usage of Probabilistic ProgramsKrishnendu Chatterjee, Amir Kafshdar Goharshady, Tobias Meggendorfer, Dorde ZikelicOOPSLA 2024 · 16 citations
  2. Quantitative Supermartingale CertificatesAlessandro Abate, Mirco Giacobbe, Diptarko RoyCAV 2025 · 7 citations
  3. Equivalence and Similarity Refutation for Probabilistic ProgramsKrishnendu Chatterjee, Ehsan Kafshdar Goharshady, Petr Novotný, Dorde ZikelicPLDI 2024 · 6 citations
  4. MDPs as Distribution Transformers: Affine Invariant Synthesis for Safety ObjectivesS. Akshay, Krishnendu Chatterjee, Tobias Meggendorfer, Dorde ZikelicCAV 2023 · 2 citations
  5. Complete ω-Regular Supermartingale CertificatesAlessandro Abate, Mirco Giacobbe, Sergey Ichtchenko, Diptarko RoyLICS 2026

Builds on5

  1. Verifying and Synthesizing Constant-Resource Implementations with TypesVan Chan Ngo, Mario Dehesa-Azuara, Matthew Fredrikson, Jan HoffmannS&P 2017 · 51 citations
  2. Polynomial invariant generation for non-deterministic recursive programsKrishnendu Chatterjee, Hongfei Fu, Amir Kafshdar Goharshady, Ehsan Kafshdar GoharshadyPLDI 2020 · 46 citations
  3. A modular cost analysis for probabilistic programsMartin Avanzini, Georg Moser, Michael SchaperOOPSLA 2020 · 41 citations
  4. Polynomial reachability witnesses via StellensätzeAli Asadi, Krishnendu Chatterjee, Hongfei Fu, Amir Kafshdar Goharshady et al.PLDI 2021 · 28 citations
  5. Proving non-termination by program reversalKrishnendu Chatterjee, Ehsan Kafshdar Goharshady, Petr Novotný, Dorde ZikelicPLDI 2021 · 18 citations

Related papers

  1. HyDiff: hybrid differential software analysisYannic Noller, Corina S. Pasareanu, Marcel Böhme, Youcheng Sun et al.ICSE 2020 · 37 citations
  2. Precise Detection of Side-Channel Vulnerabilities using Quantitative Cartesian Hoare LogicJia Chen, Yu Feng, Isil DilligCCS 2017 · 74 citations
  3. Quantifying and Mitigating Cache Side Channel Leakage with Differential SetCong Ma, Dinghao Wu, Gang Tan, Mahmut Taylan Kandemir et al.OOPSLA 2023 · 2 citations
  4. Risk Estimation in Differential Fuzzing via Extreme Value TheoryRafael Baez, Alejandro Olivas, Nathan K. Diamond, Marcelo F. Frias et al.ASE 2025
  5. Non-Distinguishable Inconsistencies as a Deterministic Oracle for Detecting Security BugsQingyang Zhou, Qiushi Wu, Dinghao Liu, Shouling Ji et al.CCS 2022 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines