Abstract

The C-program verification is an urgent problem of modern programming. To apply known methods of deductive verification it is necessary to provide loop invariants which might be a challenge in many cases. In this paper we consider the C-light language [18] which is a powerful subset of the ISO C language. To verify C-light programs the two-level approach [19, 20] and the mixed axiomatic semantics method [1, 3, 11] were suggested. At the first stage, we translate [17] the source C-light program into Ckernel one. The C-kernel language [19] is a subset of C-light. The theorem of translation correctness was proved in [10, 11]. The C-kernel has less statements with respect to the C-light, this allows to decrease the number of inference rules of axiomatic semantics during its development. At the second stage of this approach, the verification conditions are generated by applying the rules of mixed axiomatic semantics [10, 11] which could contain several rules for the same program statement. In such cases the inference rules are applied depending on the context. Let us note that application of the mixed axiomatic semantics allows to significantly simplify verification conditions in many cases. This article represents an extension of this approach which includes our verification method for definite iteration over unchangeable data structures without loop exit in C-light programs. The method contains a new inference rule for the deifinite iteration without invariants. This rule was implemented in verification conditions generator. At the proof stage the SMT-solver Z3 [12] is used. An example which illustrates the application of this technique is considered. he article is published in the authors’ wording.

Highlights

  • C program verification is an urgent problem at the present time

  • In this paper we suggest a method of loop invariants elimination for definite iteration of special form [14]

  • We extend our mixed axiomatic semantics of C-light language by a new rule which allows verification of such loops without invariants provided by user

Read more

Summary

Introduction

C program verification is an urgent problem at the present time. Many projects (for example [4, 5, 6, 8, 9]) suggest different solutions. In this paper we suggest a method of loop invariants elimination for definite iteration of special form [14]. We extend our mixed axiomatic semantics of C-light language by a new rule which allows verification of such loops without invariants provided by user. 1. Definite Iteration over Unchangeable Data Structures and Replacement Operation. The method of loop invariants elimination for definite iteration was suggested in [14]. It includes four cases [13, 15]: 1. 2. Definite iteration over unchangeable data structures with loop exit. 3. Definite iteration over changeable data structures possibly with loop exit.

The Inference Rule and Its Implementation
Example
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call