Abstract Execution: Automatically Proving Infinitely Many Programs
Abstract programs contain schematic placeholders representing potentially infinitely many concrete programs. They naturally occur in multiple areas of computer science concerned with correctness: rule-based compilation and optimization, code refactoring and other source-to-source transformations, pr...
Main Author: | |
---|---|
Format: | Others |
Language: | en |
Published: |
2020
|
Online Access: | https://tuprints.ulb.tu-darmstadt.de/8540/1/ThesisSteinhoefel.pdf Steinhöfel, Dominic <http://tuprints.ulb.tu-darmstadt.de/view/person/Steinh=F6fel=3ADominic=3A=3A.html> (2020): Abstract Execution: Automatically Proving Infinitely Many Programs.Darmstadt, Technische Universität, DOI: 10.25534/tuprints-00008540 <https://doi.org/10.25534/tuprints-00008540>, [Ph.D. Thesis] |
id |
ndltd-tu-darmstadt.de-oai-tuprints.ulb.tu-darmstadt.de-8540 |
---|---|
record_format |
oai_dc |
collection |
NDLTD |
language |
en |
format |
Others
|
sources |
NDLTD |
description |
Abstract programs contain schematic placeholders representing potentially infinitely many concrete programs. They naturally occur in multiple areas of computer science concerned with correctness: rule-based compilation and optimization, code refactoring and other source-to-source transformations, program synthesis, Correctness-by-Construction, and more. Mechanized correctness arguments about abstract programs are frequently conducted in interactive environments. While this permits expressing arbitrary properties quantifying over programs, substantial effort has to be invested to prove them manually by writing proof scripts. Existing approaches to proving abstract program properties automatically, on the other hand, lack expressiveness. Frequently, they only support placeholders representing all possible instantiations; in some cases, minor refinements are supported.
This thesis bridges that gap by presenting Abstract Execution (AE), an automatic reasoning technique for universal behavioral properties of abstract programs. The restriction to universal (no existential quantification) and behavioral (not addressing internal structure) properties excludes certain applications; however, it is the key to automation. Our logic for Abstract Execution uses abstract state changes to represent unknown effects on local variables and the heap, and models abrupt completion by symbolic branching. In this logic, schematic placeholders have names: It is possible to re-use them at several places, representing the same program elements in potentially different contexts. Furthermore, the represented concrete programs can be constrained by an expressive specification language, which is a unique feature of AE. We use the theory of dynamic frames to scale between full abstraction and total precision of frame specifications, and support fine-grained pre- and postconditions for (abrupt) completion.
We implemented AE by extending the program verifier KeY. Specifically for relational verification of abstract Java programs, we developed REFINITY, a graphical KeY frontend. We used REFINITY it in our signature application of AE: to model well-known statement-level refactoring techniques and prove their conditional safety. Several yet undocumented behavioral preconditions for safe refactorings originated in this case study, which is one of very few attempts to statically prove behavioral correctness of statement-level refactorings, and the only one to cover them to that extent.
AE extends Symbolic Execution (SE) for abstract programs. As a foundational contribution, we propose a general framework for SE based on the semantics of symbolic states. It natively integrates state merging by supporting m-to-n transitions. We define two orthogonal correctness notions, exhaustiveness and precision, and formally prove their relation to program proving and bug detection.
Finally, we introduce Modal Trace Logic (MTL), a trace-based logic to represent a variety of different program verification tasks, especially for relational verification. It is a “plug-in” logic which can be integrated on-demand with formal languages that have a trace semantics. The core of MTL is the trace modality, which allows expressing that a specification approximates an implementation after a trace abstraction step. We demonstrate the versatility of this approach by formalizing concrete verification tasks in MTL, ranging from functional verification over program synthesis to program evolution. To reason about MTL problems, we translate them to symbolic traces. We suggest Symbolic Trace Logic (STL), which comes with a sequent calculus to prove symbolic trace inclusions. This requires checking symbolic states for subsumption; to that end, we provide two generally useful notions of symbolic state subsumption. This framework relates as follows to the other parts of this thesis: We use the language of abstract programs to express synthesis and compilation, which connects MTL to AE. Moreover, symbolic states of STL are based on our framework for SE. |
author |
Steinhöfel, Dominic |
spellingShingle |
Steinhöfel, Dominic Abstract Execution: Automatically Proving Infinitely Many Programs |
author_facet |
Steinhöfel, Dominic |
author_sort |
Steinhöfel, Dominic |
title |
Abstract Execution: Automatically Proving Infinitely Many Programs |
title_short |
Abstract Execution: Automatically Proving Infinitely Many Programs |
title_full |
Abstract Execution: Automatically Proving Infinitely Many Programs |
title_fullStr |
Abstract Execution: Automatically Proving Infinitely Many Programs |
title_full_unstemmed |
Abstract Execution: Automatically Proving Infinitely Many Programs |
title_sort |
abstract execution: automatically proving infinitely many programs |
publishDate |
2020 |
url |
https://tuprints.ulb.tu-darmstadt.de/8540/1/ThesisSteinhoefel.pdf Steinhöfel, Dominic <http://tuprints.ulb.tu-darmstadt.de/view/person/Steinh=F6fel=3ADominic=3A=3A.html> (2020): Abstract Execution: Automatically Proving Infinitely Many Programs.Darmstadt, Technische Universität, DOI: 10.25534/tuprints-00008540 <https://doi.org/10.25534/tuprints-00008540>, [Ph.D. Thesis] |
work_keys_str_mv |
AT steinhofeldominic abstractexecutionautomaticallyprovinginfinitelymanyprograms |
_version_ |
1719327686540656640 |
spelling |
ndltd-tu-darmstadt.de-oai-tuprints.ulb.tu-darmstadt.de-85402020-07-15T07:09:31Z http://tuprints.ulb.tu-darmstadt.de/8540/ Abstract Execution: Automatically Proving Infinitely Many Programs Steinhöfel, Dominic Abstract programs contain schematic placeholders representing potentially infinitely many concrete programs. They naturally occur in multiple areas of computer science concerned with correctness: rule-based compilation and optimization, code refactoring and other source-to-source transformations, program synthesis, Correctness-by-Construction, and more. Mechanized correctness arguments about abstract programs are frequently conducted in interactive environments. While this permits expressing arbitrary properties quantifying over programs, substantial effort has to be invested to prove them manually by writing proof scripts. Existing approaches to proving abstract program properties automatically, on the other hand, lack expressiveness. Frequently, they only support placeholders representing all possible instantiations; in some cases, minor refinements are supported. This thesis bridges that gap by presenting Abstract Execution (AE), an automatic reasoning technique for universal behavioral properties of abstract programs. The restriction to universal (no existential quantification) and behavioral (not addressing internal structure) properties excludes certain applications; however, it is the key to automation. Our logic for Abstract Execution uses abstract state changes to represent unknown effects on local variables and the heap, and models abrupt completion by symbolic branching. In this logic, schematic placeholders have names: It is possible to re-use them at several places, representing the same program elements in potentially different contexts. Furthermore, the represented concrete programs can be constrained by an expressive specification language, which is a unique feature of AE. We use the theory of dynamic frames to scale between full abstraction and total precision of frame specifications, and support fine-grained pre- and postconditions for (abrupt) completion. We implemented AE by extending the program verifier KeY. Specifically for relational verification of abstract Java programs, we developed REFINITY, a graphical KeY frontend. We used REFINITY it in our signature application of AE: to model well-known statement-level refactoring techniques and prove their conditional safety. Several yet undocumented behavioral preconditions for safe refactorings originated in this case study, which is one of very few attempts to statically prove behavioral correctness of statement-level refactorings, and the only one to cover them to that extent. AE extends Symbolic Execution (SE) for abstract programs. As a foundational contribution, we propose a general framework for SE based on the semantics of symbolic states. It natively integrates state merging by supporting m-to-n transitions. We define two orthogonal correctness notions, exhaustiveness and precision, and formally prove their relation to program proving and bug detection. Finally, we introduce Modal Trace Logic (MTL), a trace-based logic to represent a variety of different program verification tasks, especially for relational verification. It is a “plug-in” logic which can be integrated on-demand with formal languages that have a trace semantics. The core of MTL is the trace modality, which allows expressing that a specification approximates an implementation after a trace abstraction step. We demonstrate the versatility of this approach by formalizing concrete verification tasks in MTL, ranging from functional verification over program synthesis to program evolution. To reason about MTL problems, we translate them to symbolic traces. We suggest Symbolic Trace Logic (STL), which comes with a sequent calculus to prove symbolic trace inclusions. This requires checking symbolic states for subsumption; to that end, we provide two generally useful notions of symbolic state subsumption. This framework relates as follows to the other parts of this thesis: We use the language of abstract programs to express synthesis and compilation, which connects MTL to AE. Moreover, symbolic states of STL are based on our framework for SE. 2020 Ph.D. Thesis NonPeerReviewed text CC-BY 4.0 International - Creative Commons, Attribution https://tuprints.ulb.tu-darmstadt.de/8540/1/ThesisSteinhoefel.pdf Steinhöfel, Dominic <http://tuprints.ulb.tu-darmstadt.de/view/person/Steinh=F6fel=3ADominic=3A=3A.html> (2020): Abstract Execution: Automatically Proving Infinitely Many Programs.Darmstadt, Technische Universität, DOI: 10.25534/tuprints-00008540 <https://doi.org/10.25534/tuprints-00008540>, [Ph.D. Thesis] https://doi.org/10.25534/tuprints-00008540 en info:eu-repo/semantics/doctoralThesis info:eu-repo/semantics/openAccess |