DASH
Repository logo
Communities & Collections
Browse DASH
DASH Stories
Statistics
  1. Home
  2. Faculty of Arts and Sciences
  3. FAS Theses and Dissertations
  4. Adapting Verified Compilation for Target-Language Errors

Adapting Verified Compilation for Target-Language Errors

Open/View files
PratapSingh_SeniorThesis.pdf (272.08 KB)
Date
February 24, 2022
Author(s)
Singh, Pratap
The Harvard community has made this article openly available. Please share how this access benefits you.
Citation
Singh, Pratap. 2021. Adapting Verified Compilation for Target-Language Errors. Bachelor's thesis, Harvard College.
Abstract
Verified compilers have the potential to greatly improve users’ trust in their code by providing machine-checked proofs of compiler correctness. In recent years they have become increasingly sophisticated and practical, compiling programs from convenient high-level programming languages to realistic target architectures and platforms. Ideally, compiler correctness requires every externally visible behavior of the compiled code to also be a valid behavior of the source it was compiled from. However, modern compilers often translate between languages with very different semantics; in particular, the target language may have error conditions, such as memory exhaustion, integer overflow, and process interruption, that are not expressed or modeled at the source level. In this work, we explore and evaluate the design space faced by verified compiler writers when adapting their systems for target-language errors. We provide template compiler correctness theorems that account for target-language errors in different ways. We consider a variety of target-language errors that appear in real-world target platforms, examining ways to modify each component of the verified compiler to adapt for them. Among these errors, we include failure modes of external components of the system that affect the running compiled code, such as process interruption and I/O device failure. We describe adaptations to a standard compiler correctness proof technique that allow verified compiler writers to prove one of our proposed correctness theorems when the target language contains limited nondeterminism introduced by target-language errors. Finally, we discuss ways to weaken a traditional compiler correctness statement to obtain guarantees that hold for all executions, including those that encounter target-language errors. Our systematization helps verified compiler writers decide how to appropriately account for target-language errors, allowing them to expose correctness guarantees that more accurately reflect the real-world behavior of compiled code.
Terms of Use
This article is made available under the terms and conditions applicable to Other Posted Material (LAA), as set forth at Terms of Service
URI
https://nrs.harvard.edu/URN-3:HUL.INSTREPOS:37370947
Subjects

Compilers

Formal verification

Computer science

Collection
FAS Theses and Dissertations
Metrics
Repository logo
  • CONTACT US
  • OSRDS
  • ABOUT DASH
  • DEPOSITING TO DASH
  • TERMS OF USE
  • REQUEST A WAIVER
  • TAKE DOWN POLICY
  • NAME CHANGE POLICY
  • HARVARD OA POLICIES
  • DASH SUBMITTER AGREEMENT
  • Accessibility
  • Privacy
Creative Commons License BY
Creative Commons Attribution 4.0 International License

Except where otherwise noted, this work is subject to a Creative Commons Attribution 4.0 International License,
which allows anyone to share and adapt our material as long as proper attribution is given.
For details and exceptions, see the Harvard Library Copyright Policy
©2024 Presidents and Fellows of Harvard College.