Runtime Complexity Bounds Using Squeezers

被引:0
|
作者
Ish-Shalom, Oren [1 ]
Itzhaky, Shachar [2 ]
Rinetzky, Noam [1 ]
Shoham, Sharon [1 ]
机构
[1] Tel Aviv Univ, Tel Aviv, Israel
[2] Technion, Haifa, Israel
基金
欧洲研究理事会;
关键词
Runtime complexity analysis; recurrence equations; squeezers; simulation; synthesis; TERMINATION; PROGRAMS;
D O I
10.1145/3527632
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 the complexity depends more intricately on the evolution of data during execution. 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 arithmetic 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 that previous tools based on cost relations and control flow analysis fail to solve, and that our squeezer-powered approach succeeds.
引用
收藏
页数:36
相关论文
共 50 条
  • [1] Run-time Complexity Bounds Using Squeezers
    Ish-Shalom, Oren
    Itzhaky, Shachar
    Rinetzky, Noam
    Shoham, Sharon
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, ESOP 2021, 2021, 12648 : 320 - 347
  • [2] Lower Bounds for Runtime Complexity of Term Rewriting
    Florian Frohn
    Jürgen Giesl
    Jera Hensel
    Cornelius Aschermann
    Thomas Ströder
    [J]. Journal of Automated Reasoning, 2017, 59 : 121 - 163
  • [3] Lower Bounds for Runtime Complexity of Term Rewriting
    Frohn, Florian
    Giesl, Juergen
    Hensel, Jera
    Aschermann, Cornelius
    Stroeder, Thomas
    [J]. JOURNAL OF AUTOMATED REASONING, 2017, 59 (01) : 121 - 163
  • [4] Predicting Code Runtime Complexity Using ML Techniques
    Deepa Shree, C.V.
    Kotian, Jaaswin D.
    Gupta, Nidhi
    Adyapak, Nikhil M.
    Ananthanagu, U.
    [J]. Lecture Notes in Electrical Engineering, 1876, (377-399):
  • [5] Lower bounds using Kolmogorov complexity
    Laplante, Sophie
    [J]. LOGICAL APPROACHES TO COMPUTATIONAL BARRIERS, PROCEEDINGS, 2006, 3988 : 297 - 306
  • [6] Runtime bounds prediction for the Kemeny problem
    Rico N.
    Vela C.R.
    Díaz I.
    [J]. Journal of Ambient Intelligence and Humanized Computing, 2024, 15 (1) : 175 - 185
  • [7] Complexity Lower Bounds using Linear Algebra
    Lokam, Satyanarayana V.
    [J]. FOUNDATIONS AND TRENDS IN THEORETICAL COMPUTER SCIENCE, 2008, 4 (1-2): : 1 - 155
  • [8] Lower Runtime Bounds for Integer Programs
    Frohn, F.
    Naaf, M.
    Hensel, J.
    Brockschmidt, M.
    Giesl, J.
    [J]. AUTOMATED REASONING (IJCAR 2016), 2016, 9706 : 550 - 567
  • [9] Transforming Derivational Complexity of Term Rewriting to Runtime Complexity
    Fuhs, Carsten
    [J]. FRONTIERS OF COMBINING SYSTEMS (FROCOS 2019), 2019, 11715 : 348 - 364
  • [10] Inferring Lower Runtime Bounds for Integer Programs
    Frohn, Florian
    Naaf, Matthias
    Brockschmidt, Marc
    Giesl, Juergen
    [J]. ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2020, 42 (03):