(Un)Solvable loop analysis

Automatically generating invariants, key to computer-aided analysis of probabilistic and deterministic programs and compiler optimisation, is a challenging open problem. Whilst the problem is in general undecidable, the goal is settled for restricted classes of loops. For the class of solvable loops...

Full description

Saved in:
Bibliographic Details
Published inFormal methods in system design Vol. 65; no. 1; pp. 163 - 194
Main Authors Amrollahi, Daneshvar, Bartocci, Ezio, Kenison, George, Kovács, Laura, Moosbrugger, Marcel, Stankovič, Miroslav
Format Journal Article
LanguageEnglish
Published New York Springer US 01.04.2025
Springer Nature B.V
Subjects
Online AccessGet full text
ISSN0925-9856
1572-8102
1572-8102
DOI10.1007/s10703-024-00455-0

Cover

More Information
Summary:Automatically generating invariants, key to computer-aided analysis of probabilistic and deterministic programs and compiler optimisation, is a challenging open problem. Whilst the problem is in general undecidable, the goal is settled for restricted classes of loops. For the class of solvable loops, introduced by Rodríguez-Carbonell and Kapur (in: Proceedings of the ISSAC, pp 266–273, 2004), one can automatically compute invariants from closed-form solutions of recurrence equations that model the loop behaviour. In this paper we establish a technique for invariant synthesis for loops that are not solvable, termed unsolvable loops. Our approach automatically partitions the program variables and identifies the so-called defective variables that characterise unsolvability. Herein we consider the following two applications. First, we present a novel technique that automatically synthesises polynomials from defective monomials, that admit closed-form solutions and thus lead to polynomial loop invariants. Second, given an unsolvable loop, we synthesise solvable loops with the following property: the invariant polynomials of the solvable loops are all invariants of the given unsolvable loop. Our implementation and experiments demonstrate both the feasibility and applicability of our approach to both deterministic and probabilistic programs.
Bibliography:ObjectType-Article-1
SourceType-Scholarly Journals-1
ObjectType-Feature-2
content type line 14
ISSN:0925-9856
1572-8102
1572-8102
DOI:10.1007/s10703-024-00455-0