(Un)Solvable Loop Analysis

06/02/2023
by   Daneshvar Amrollahi, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/14/2022

Solving Invariant Generation for Unsolvable Loops

Automatically generating invariants, key to computer-aided analysis of p...
research
05/08/2017

Automated Generation of Non-Linear Loop Invariants Utilizing Hypergeometric Sequences

Analyzing and reasoning about safety properties of software systems beco...
research
08/16/2018

Aligator.jl - A Julia Package for Loop Invariant Generation

We describe the Aligator.jl software package for automatically generatin...
research
07/18/2020

Analysis of Bayesian Networks via Prob-Solvable Loops

Prob-solvable loops are probabilistic programs with polynomial assignmen...
research
01/11/2018

Invariant Generation for Multi-Path Loops with Polynomial Assignments

Program analysis requires the generation of program properties expressin...
research
05/05/2022

Moment-based Invariants for Probabilistic Loops with Non-polynomial Assignments

We present a method to automatically approximate moment-based invariants...
research
08/21/2020

How to Design While Loops

Beginning students find the syntactic construct known as a while loop di...

Please sign up or login with your details

Forgot password? Click here to reset