Linear Loop Synthesis for Quadratic Invariants

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Hitarth, S., Kenison, George, Kovács, Laura, Varonka, Anton
Natura: Preprint
Pubblicazione: 2023
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866929245111975936
author Hitarth, S.
Kenison, George
Kovács, Laura
Varonka, Anton
author_facet Hitarth, S.
Kenison, George
Kovács, Laura
Varonka, Anton
contents Invariants are key to formal loop verification as they capture loop properties that are valid before and after each loop iteration. Yet, generating invariants is a notorious task already for syntactically restricted classes of loops. Rather than generating invariants for given loops, in this paper we synthesise loops that exhibit a predefined behaviour given by an invariant. From the perspective of formal loop verification, the synthesised loops are thus correct by design and no longer need to be verified. To overcome the hardness of reasoning with arbitrarily strong invariants, in this paper we construct simple (non-nested) while loops with linear updates that exhibit polynomial equality invariants. Rather than solving arbitrary polynomial equations, we consider loop properties defined by a single quadratic invariant in any number of variables. We present a procedure that, given a quadratic equation, decides whether a loop with affine updates satisfying this equation exists. Furthermore, if the answer is positive, the procedure synthesises a loop and ensures its variables achieve infinitely many different values.
format Preprint
id arxiv_https___arxiv_org_abs_2310_05120
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Linear Loop Synthesis for Quadratic Invariants
Hitarth, S.
Kenison, George
Kovács, Laura
Varonka, Anton
Logic in Computer Science
Number Theory
Invariants are key to formal loop verification as they capture loop properties that are valid before and after each loop iteration. Yet, generating invariants is a notorious task already for syntactically restricted classes of loops. Rather than generating invariants for given loops, in this paper we synthesise loops that exhibit a predefined behaviour given by an invariant. From the perspective of formal loop verification, the synthesised loops are thus correct by design and no longer need to be verified. To overcome the hardness of reasoning with arbitrarily strong invariants, in this paper we construct simple (non-nested) while loops with linear updates that exhibit polynomial equality invariants. Rather than solving arbitrary polynomial equations, we consider loop properties defined by a single quadratic invariant in any number of variables. We present a procedure that, given a quadratic equation, decides whether a loop with affine updates satisfying this equation exists. Furthermore, if the answer is positive, the procedure synthesises a loop and ensures its variables achieve infinitely many different values.
title Linear Loop Synthesis for Quadratic Invariants
topic Logic in Computer Science
Number Theory
url https://arxiv.org/abs/2310.05120