Regular Path Clauses and Their Application in Solving Loops

09/10/2021
by   Bishoksan Kafle, et al.
0

A well-established approach to reasoning about loops during program analysis is to capture the effect of a loop by extracting recurrences from the loop; these express relationships between the values of variables, or program properties such as cost, on successive loop iterations. Recurrence solvers are capable of computing closed forms for some recurrences, thus deriving precise relationships capturing the complete loop execution. However, many recurrences extracted from loops cannot be solved, due to their having multiple recursive cases or multiple arguments. In the literature, several techniques for approximating the solution of unsolvable recurrences have been proposed. The approach presented in this paper is to define transformations based on regular path expressions and loop counters that (i) transform multi-path loops to single-path loops, giving rise to recurrences with a single recursive case, and (ii) transform multi-argument recurrences to single-argument recurrences, thus enabling the use of recurrence solvers on the transformed recurrences. Using this approach, precise solutions can sometimes be obtained that are not obtained by approximation methods.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/04/2019

An application of the Gyárfás path argument

We adapt the Gyárfás path argument to prove that t-2 cops can capture a ...
research
01/11/2018

Invariant Generation for Multi-Path Loops with Polynomial Assignments

Program analysis requires the generation of program properties expressin...
research
12/19/2019

Conjunctive Regular Path Queries with String Variables

We introduce the class CXRPQ of conjunctive xregex path queries, which a...
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
12/23/2017

Presburger-Definable Parameterized Typestates

Typestates are good at capturing dynamic states of a program as compared...
research
05/16/2019

Loop Summarization with Rational Vector Addition Systems (extended version)

This paper presents a technique for computing numerical loop summaries. ...
research
01/25/2022

A Special Case of Schematic Syntactic Unification

We present a unification problem based on first-order syntactic unificat...

Please sign up or login with your details

Forgot password? Click here to reset