Run-time Complexity Bounds Using Squeezers

Oren Ish-Shalom*, Shachar Itzhaky, Noam Rinetzky, Sharon Shoham

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

1 Scopus citations

Abstract

Determining upper bounds on the time complexity of a program is a fundamental problem with a variety of applications, such as performance debugging, resource certification, and compile-time optimizations. Automated techniques for cost analysis excel at bounding the resource complexity of programs that use integer values and linear arithmetic. Unfortunately, they fall short when execution traces become more involved, esp. when data dependencies may affect the termination conditions of loops. In such cases, state-of-the-art analyzers have shown to produce loose bounds, or even no bound at all. We propose a novel technique that generalizes the common notion of recurrence relations based on ranking functions. Existing methods usually unfold one loop iteration, and examine the resulting relations between variables. These relations assist in establishing a recurrence that bounds the number of loop iterations. We propose a different approach, where we derive recurrences by comparing whole traces with whole traces of a lower rank, avoiding the need to analyze the complexity of intermediate states. We offer a set of global properties, defined with respect to whole traces, that facilitate such a comparison, and show that these properties can be checked efficiently using a handful of local conditions. To this end, we adapt state squeezers, an induction mechanism previously used for verifying safety properties. We demonstrate that this technique encompasses the reasoning power of bounded unfolding, and more. We present some seemingly innocuous, yet intricate, examples where previous tools based on cost relations and control flow analysis fail to solve, and that our squeezer-powered approach succeeds.

Original languageEnglish
Title of host publicationProgramming Languages and Systems - 30th European Symposium on Programming, ESOP 2021 Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2021, Proceedings
EditorsNobuko Yoshida
PublisherSpringer Science and Business Media Deutschland GmbH
Pages320-347
Number of pages28
ISBN (Print)9783030720186
DOIs
StatePublished - 2021
Event30th European Symposium on Programming, ESOP 2021 Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2021 - Luxembourg, Luxembourg
Duration: 27 Mar 20211 Apr 2021

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume12648 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference30th European Symposium on Programming, ESOP 2021 Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2021
Country/TerritoryLuxembourg
CityLuxembourg
Period27/03/211/04/21

Funding

FundersFunder number
Vetenskapsrådet in Sweden2016-06204
National Science Foundation1521523, 1421243
Defense Advanced Research Projects AgencyHR0011-18-C-0011
U.S. Air ForceFA8750-16-C-0022
Horizon 2020 Framework Programme759102
European Commission
United States-Israel Binational Science Foundation2016260, 2018675
Israel Science Foundation243/19, 1996/18, 2740/19, 1810/18
Vetenskapsrådet
PAZY Foundation

    Fingerprint

    Dive into the research topics of 'Run-time Complexity Bounds Using Squeezers'. Together they form a unique fingerprint.

    Cite this