Treating for-Loops as First-Class Citizens in Proofs

02/03/2020
by   Nathan Wasser, et al.
0

Indexed loop scopes have been shown to be a helpful tool in creating sound loop invariant rules in dynamic logic for programming languages with abrupt completion, such as Java. These rules do not require program transformation of the loop body, as other approaches to dealing with abrupt completion do. However, indexed loop scopes were designed specifically to provide a loop invariant rule for while loops and work rather opaquely. Here we propose replacing indexed loop scopes with a more transparent solution, which also lets us extend this idea from while loops to for loops. We further present sound loop unrolling rules for while, do and for loops, which require neither program transformation of the loop body, nor the use of nested modalities. This approach allows for loops to be treated as first-class citizens in proofs – rather than the usual approach of transforming for loops into while loops – which makes semi-automated proofs more transparent and easier to follow for the user, whose interactions may be required in order to close the proofs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/21/2019

Technical Report: Using Loop Scopes with for-Loops

Loop scopes have been shown to be a helpful tool in creating sound loop ...
research
04/24/2020

Algebra-based Loop Synthesis

We present an algorithm for synthesizing program loops satisfying a give...
research
11/01/2018

Loop Optimization Framework

The LLVM compiler framework supports a selection of loop transformations...
research
12/28/2010

On Elementary Loops of Logic Programs

Using the notion of an elementary loop, Gebser and Schaub refined the th...
research
12/22/2022

Towards Mechanised Proofs in Double-Pushout Graph Transformation

We formalise the basics of the double-pushout approach to graph transfor...
research
02/23/2018

Abstract Completion, Formalized

Completion is one of the most studied techniques in term rewriting and f...

Please sign up or login with your details

Forgot password? Click here to reset