Affine Invariant Generation via Matrix Algebra - Archive ouverte HAL
Pré-Publication, Document De Travail Année : 2022

Affine Invariant Generation via Matrix Algebra

Résumé

Loop invariant generation, which automates the generation of assertions that always hold inside loops, has many important applications such as safety analysis, reachability analysis and complexity-bound analysis. However, automated invariant generation for arbitrary loops is an undecidable problem. In this paper, we target at an important category of loops, namely affine loops, which widely exist in many programs but still lack general approach to invariant generation. We, however, provide a sound and complete approach based on matrix algebra to automatically synthesizing inductive invariants in the form of an affine inequality. Specifically, for the situation when the loop guard is tautological (i.e., ‘true’), we show that the eigenvalues and their eigenvectors generate all meaningful affine inductive invariants. Moreover, when the loop guard consists of one or more affine inequalities, we solve the invariant generation problem by (i) first establishing through matrix inverse the relationship between the invariants and a key parameter in the application of Farkas’ Lemma, then (ii) solving the feasible domain of the key parameter, and finally (iii) showing that the key parameter can be addressed by a finite set of values w.r.t a tightness condition on the constraints for the invariants. Experimental results using existing and new cases show that our approach can generate affine invariants over linear dynamic systems that inherently involve the non-trivial choices (e.g., eigenvalues, boundary points of the feasible domain, etc.) of the key parameter.
Fichier principal
Vignette du fichier
main.pdf (509.57 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03494611 , version 1 (19-12-2021)
hal-03494611 , version 2 (25-05-2022)

Identifiants

  • HAL Id : hal-03494611 , version 1

Citer

Yucheng Ji, Hongfei Fu, Bin Fang. Affine Invariant Generation via Matrix Algebra. 2022. ⟨hal-03494611v1⟩
387 Consultations
266 Téléchargements

Partager

More