An Exercise in Invariant-based Programming with Interactive and Automatic Theorem Prover Support
Invariant-Based Programming (IBP) is a diagram-based correct-by-construction programming methodology in which the program is structured around the invariants, which are additionally formulated before the actual code. Socos is a program construction and verification environment built specifically to...
Main Authors: | , |
---|---|
Format: | Article |
Language: | English |
Published: |
Open Publishing Association
2012-02-01
|
Series: | Electronic Proceedings in Theoretical Computer Science |
Online Access: | http://arxiv.org/pdf/1202.4829v1 |
id |
doaj-d5597be2eab841c7856d72904c8f0d2c |
---|---|
record_format |
Article |
spelling |
doaj-d5597be2eab841c7856d72904c8f0d2c2020-11-24T22:59:09ZengOpen Publishing AssociationElectronic Proceedings in Theoretical Computer Science2075-21802012-02-0179Proc. THedu 2011294810.4204/EPTCS.79.2An Exercise in Invariant-based Programming with Interactive and Automatic Theorem Prover SupportRalph-Johan BackJohannes ErikssonInvariant-Based Programming (IBP) is a diagram-based correct-by-construction programming methodology in which the program is structured around the invariants, which are additionally formulated before the actual code. Socos is a program construction and verification environment built specifically to support IBP. The front-end to Socos is a graphical diagram editor, allowing the programmer to construct invariant-based programs and check their correctness. The back-end component of Socos, the program checker, computes the verification conditions of the program and tries to prove them automatically. It uses the theorem prover PVS and the SMT solver Yices to discharge as many of the verification conditions as possible without user interaction. In this paper, we first describe the Socos environment from a user and systems level perspective; we then exemplify the IBP workflow by building a verified implementation of heapsort in Socos. The case study highlights the role of both automatic and interactive theorem proving in three sequential stages of the IBP workflow: developing the background theory, formulating the program specification and invariants, and proving the correctness of the final implementation.http://arxiv.org/pdf/1202.4829v1 |
collection |
DOAJ |
language |
English |
format |
Article |
sources |
DOAJ |
author |
Ralph-Johan Back Johannes Eriksson |
spellingShingle |
Ralph-Johan Back Johannes Eriksson An Exercise in Invariant-based Programming with Interactive and Automatic Theorem Prover Support Electronic Proceedings in Theoretical Computer Science |
author_facet |
Ralph-Johan Back Johannes Eriksson |
author_sort |
Ralph-Johan Back |
title |
An Exercise in Invariant-based Programming with Interactive and Automatic Theorem Prover Support |
title_short |
An Exercise in Invariant-based Programming with Interactive and Automatic Theorem Prover Support |
title_full |
An Exercise in Invariant-based Programming with Interactive and Automatic Theorem Prover Support |
title_fullStr |
An Exercise in Invariant-based Programming with Interactive and Automatic Theorem Prover Support |
title_full_unstemmed |
An Exercise in Invariant-based Programming with Interactive and Automatic Theorem Prover Support |
title_sort |
exercise in invariant-based programming with interactive and automatic theorem prover support |
publisher |
Open Publishing Association |
series |
Electronic Proceedings in Theoretical Computer Science |
issn |
2075-2180 |
publishDate |
2012-02-01 |
description |
Invariant-Based Programming (IBP) is a diagram-based correct-by-construction programming methodology in which the program is structured around the invariants, which are additionally formulated before the actual code. Socos is a program construction and verification environment built specifically to support IBP. The front-end to Socos is a graphical diagram editor, allowing the programmer to construct invariant-based programs and check their correctness. The back-end component of Socos, the program checker, computes the verification conditions of the program and tries to prove them automatically. It uses the theorem prover PVS and the SMT solver Yices to discharge as many of the verification conditions as possible without user interaction. In this paper, we first describe the Socos environment from a user and systems level perspective; we then exemplify the IBP workflow by building a verified implementation of heapsort in Socos. The case study highlights the role of both automatic and interactive theorem proving in three sequential stages of the IBP workflow: developing the background theory, formulating the program specification and invariants, and proving the correctness of the final implementation. |
url |
http://arxiv.org/pdf/1202.4829v1 |
work_keys_str_mv |
AT ralphjohanback anexerciseininvariantbasedprogrammingwithinteractiveandautomatictheoremproversupport AT johanneseriksson anexerciseininvariantbasedprogrammingwithinteractiveandautomatictheoremproversupport AT ralphjohanback exerciseininvariantbasedprogrammingwithinteractiveandautomatictheoremproversupport AT johanneseriksson exerciseininvariantbasedprogrammingwithinteractiveandautomatictheoremproversupport |
_version_ |
1725645500582985728 |