Facial reconstruction

Search LJMU Research Online

Browse Repository | Browse E-Theses

Simple Linear Loops: Algebraic Invariants and Applications

Ait El Manssour, R, Kenison, G, Shirmohammadi, M and Varonka, A Simple Linear Loops: Algebraic Invariants and Applications. Proceedings of the ACM on Programming Languages. (Accepted)

[img]
Preview
Text
main.pdf - Accepted Version

Download (698kB) | Preview

Abstract

The automatic generation of loop invariants is a fundamental challenge in software verification. While this task is undecidable in general, it is decidable for certain restricted classes of programs. This work focuses on invariant generation for (branching-free) loops with a single linear update. Our primary contribution is a polynomial-space algorithm that computes the strongest algebraic invariant for simple linear loops, generating all polynomial equations that hold among program variables across all reachable states. The key to achieving our complexity bounds lies in mitigating the blow-up associated with variable elimination and Gröbner basis computation, as seen in prior works (see [25, 40, 64] among others). Our procedure runs in polynomial time when the number of program variables is fixed. We examine various applications of our results on invariant generation, focusing on invariant verification and loop synthesis. The invariant verification problem investigates whether a polynomial ideal defining an algebraic set serves as an invariant for a given linear loop. We show that this problem is coNP-complete and lies in PSPACE when the input ideal is given in dense or sparse representations, respectively. In the context of loop synthesis, we aim to construct a loop with an infinite set of reachable states that upholds a specified algebraic property as an invariant. The strong synthesis variant of this problem requires the construction of loops for which the given property is the strongest invariant. In terms of hardness, synthesising loops over integers (or rationals) is as hard as Hilbert’s Tenth problem (or its analogue over the rationals). When the constants of the output are constrained to bit-bounded rational numbers, we demonstrate that loop synthesis and its strong variant are both decidable in PSPACE, and in NP when the number of program variables is fixed.

Item Type: Article
Additional Information: © The Authors | ACM 2024. This is the author's version of the work which has been accepted to be published in Proceedings of the ACM on Programming Languages. It is posted here for your personal use. Not for redistribution.
Uncontrolled Keywords: Algebraic Invariant; Program Synthesis; Loop Invariant; Zariski Closure; Polynomial Space; Algebraic Reasoning
Subjects: Q Science > QA Mathematics > QA75 Electronic computers. Computer science
Q Science > QA Mathematics > QA76 Computer software
Divisions: Computer Science and Mathematics
SWORD Depositor: A Symplectic
Date Deposited: 19 Nov 2024 14:57
Last Modified: 19 Nov 2024 14:57
DOI or ID number: 10.1145/3704862
URI: https://researchonline.ljmu.ac.uk/id/eprint/24814
View Item View Item