(Un)Solvable Loop Analysis

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Amrollahi, Daneshvar, Bartocci, Ezio, Kenison, George, Kovács, Laura, Moosbrugger, Marcel, Stankovič, Miroslav
Format: Preprint
Published: 2023
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910683950481408
author Amrollahi, Daneshvar
Bartocci, Ezio
Kenison, George
Kovács, Laura
Moosbrugger, Marcel
Stankovič, Miroslav
author_facet Amrollahi, Daneshvar
Bartocci, Ezio
Kenison, George
Kovács, Laura
Moosbrugger, Marcel
Stankovič, Miroslav
contents 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 Kapur and Rodríguez-Carbonell in 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.
format Preprint
id arxiv_https___arxiv_org_abs_2306_01597
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle (Un)Solvable Loop Analysis
Amrollahi, Daneshvar
Bartocci, Ezio
Kenison, George
Kovács, Laura
Moosbrugger, Marcel
Stankovič, Miroslav
Programming Languages
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 Kapur and Rodríguez-Carbonell in 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.
title (Un)Solvable Loop Analysis
topic Programming Languages
url https://arxiv.org/abs/2306.01597