# Algebra-Based Reasoning for Loop Synthesis

Provably correct software is one of the key challenges of our software-driven society. Program synthesis – the task of constructing a program satisfying a given specification – is one strategy for achieving this. The result of this task is then a program which is correct by design. As in the domain of program verification, handling loops is one of the main ingredients to a successful synthesis procedure. We present an algorithm for synthesizing loops satisfying a given polynomial loop invariant. The class of loops we are considering can be modeled by a system of algebraic recurrence equations with constant coefficients, encoding thus program loops with affine operations among program variables. We turn the task of loop synthesis into a polynomial constraint problem, by precisely characterizing the set of all loops satisfying the given invariant. We prove soundness of our approach, as well as its completeness with respect to an a priori fixed upper bound on the number of program variables. Our work has applications towards synthesizing loops satisfying a given polynomial loop invariant, program verification, as well as generating number sequences from algebraic relations. To understand viability of the methodology and heuristics for synthesizing loops, we implement and evaluate the method using the Absynth tool.

• 6 publications
• 3 publications
• 6 publications
• 31 publications
research
04/24/2020

### Algebra-based Loop Synthesis

We present an algorithm for synthesizing program loops satisfying a give...
research
03/05/2021

### Algebra-based Synthesis of Loops and their Invariants (Invited Paper)

Provably correct software is one of the key challenges in our softwaredr...
research
07/16/2021

### Enhancing Loop-Invariant Synthesis via Reinforcement Learning

Loop-invariant synthesis is the basis of every program verification proc...
research
01/11/2018

### Invariant Generation for Multi-Path Loops with Polynomial Assignments

Program analysis requires the generation of program properties expressin...
research
10/27/2020

### Deciding ω-Regular Properties on Linear Recurrence Sequences

We consider the problem of deciding ω-regular properties on infinite tra...
research
04/25/2016

### Generalized Homogeneous Polynomials for Efficient Template-Based Nonlinear Invariant Synthesis

The template-based method is one of the most successful approaches to al...
research
05/20/2019

### Efficient Synthesis with Probabilistic Constraints

We consider the problem of synthesizing a program given a probabilistic ...