Abstract

We present a new approach to deductive program verification based on auxiliary programs called ghost monitors . This technique is useful when the syntactic structure of the target program is not well suited for verification, for example, when an essentially recursive algorithm is implemented in an iterative fashion. Our approach consists in implementing, specifying, and verifying an auxiliary program that monitors the execution of the target program, in such a way that the correctness of the monitor entails the correctness of the target. The ghost monitor maintains the necessary data and invariants to facilitate the proof. It can be implemented and verified in any suitable framework, which does not have to be related to the language of the target programs. This technique is also applicable when we want to establish relational properties between two target programs written in different languages and having different syntactic structure. We then show how ghost monitors can be used to specify and prove fine-grained properties about the infinite behaviors of target programs. Since this cannot be easily done using existing verification frameworks, we introduce a dedicated language for ghost monitors, with an original construction to catch and handle divergent executions. The soundness of the underlying program logic is established using a particular flavor of transfinite games. This language and its soundness are formalized and mechanically checked.

Highlights

  • We show how ghost monitors can be used to specify and prove fine-grained properties about the infinite behaviors of target programs

  • The traditional approach to deductive program verification, as embodied by the Floyd-Hoare logic and the weakest precondition calculus, ties the verification process to the syntactic structure of the program under consideration: contracts are attached to subprogram boundaries, loop invariants are placed at a fixed place in the loop body, the program state at previous loop iterations is inaccessible, etc

  • The first contribution of our paper is a new method of deductive program verification that relies on an external auxiliary program, a ghost monitor, to make explicit the underlying algorithm of the target program

Read more

Summary

INTRODUCTION

The traditional approach to deductive program verification, as embodied by the Floyd-Hoare logic and the weakest precondition calculus, ties the verification process to the syntactic structure of the program under consideration: contracts are attached to subprogram boundaries, loop invariants are placed at a fixed place in the loop body, the program state at previous loop iterations is inaccessible, etc. The first contribution of our paper is a new method of deductive program verification that relies on an external auxiliary program, a ghost monitor, to make explicit the underlying algorithm of the target program This liberty to choose a different syntactic structure can significantly simplify the discovery of appropriate contracts and invariants, as shown in Section 2 on a new proof of the Schorr-Waite in-place graph traversal algorithm [Schorr and Waite 1967]. We need to provide the monitor program with the means to catch and handle divergent executions This motivates the second contribution of this paper: a dedicated programming language for ghost monitors that allows us to specify and prove properties of infinite executions of target programs, after a transfinite number of calls to NEXT. This development is available online [Clochard 2018a]

EXTENDED EXAMPLE
RELATIONAL PROPERTIES AND INFINITE BEHAVIORS
Equivalence of Non-Deterministic Programs
Infinite Behaviors
A VERIFICATION LANGUAGE SUPPORTING INFINITE BEHAVIORS
Syntax and Typing
Predicate Transformer Semantics
Linking a Monitor to Target Programs
UNIFYING TRANSFER PROPERTIES USING GAMES
Games and Strategies
Encoding Transition Systems as Games
From Weakest Preconditions to Winning Strategies
Relative Completeness
RELATED AND FUTURE WORK
Full Text
Paper version not known

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

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.