Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2676726.2676975acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Deep Specifications and Certified Abstraction Layers

Published: 14 January 2015 Publication History

Abstract

Modern computer systems consist of a multitude of abstraction layers (e.g., OS kernels, hypervisors, device drivers, network protocols), each of which defines an interface that hides the implementation details of a particular set of functionality. Client programs built on top of each layer can be understood solely based on the interface, independent of the layer implementation. Despite their obvious importance, abstraction layers have mostly been treated as a system concept; they have almost never been formally specified or verified. This makes it difficult to establish strong correctness properties, and to scale program verification across multiple layers.
In this paper, we present a novel language-based account of abstraction layers and show that they correspond to a strong form of abstraction over a particularly rich class of specifications which we call deep specifications. Just as data abstraction in typed functional languages leads to the important representation independence property, abstraction over deep specification is characterized by an important implementation independence property: any two implementations of the same deep specification must have contextually equivalent behaviors. We present a new layer calculus showing how to formally specify, program, verify, and compose abstraction layers. We show how to instantiate the layer calculus in realistic programming languages such as C and assembly, and how to adapt the CompCert verified compiler to compile certified C layers such that they can be linked with assembly layers. Using these new languages and tools, we have successfully developed multiple certified OS kernels in the Coq proof assistant, the most realistic of which consists of 37 abstraction layers, took less than one person year to develop, and can boot a version of Linux as a guest.

Supplementary Material

MPG File (p595-sidebyside.mpg)

References

[1]
C. Y. Baldwin and K. B. Clark. Design Rules: Volume 1, The Power of Modularity. MIT Press, March 2000.
[2]
M. Barnett, B.-Y. E. Chang, R. DeLine, B. Jacobs, and K. R. M. Leino. Boogie: A modular reusable verifier for object-oriented programs. In Proc. 4th Symp on Formal Methods for Components and Objects, 2005.
[3]
N. Benton and C.-K. Hur. Biorthogonality, step-indexing and compiler correctness. In ICFP'09, pages 97--108, 2009.
[4]
L. Beringer, G. Stewart, R. Dockins, and A. W. Appel. Verified compilation for shared-memory C. In ESOP'14, pages 107--127, 2014.
[5]
S. Blazy and X. Leroy. Mechanized semantics for the Clight subset of the C language. J. Automated Reasoning, 43(3):263--288, 2009.
[6]
Q. Carbonneaux, J. Hoffmann, T. Ramananandro, and Z. Shao. End-to-end verification of stack-space bounds for C programs. In PLDI'14.
[7]
S. Chaudhuri, S. Gulwani, and R. Lublinerman. Continuity analysis of programs. In POPL'10, pages 57--69, 2010.
[8]
A. Chlipala. Mostly-automated verification of low-level programs in computational separation logic. In PLDI'11, pages 234--245, 2011.
[9]
E. W. Dijkstra. Notes on structured programming. In Structured programming, pages 1--82. Academic Press, 1972.
[10]
X. Feng, Z. Shao, Y. Dong, and Y. Guo. Certifying low-level programs with hardware interrupts and preemptive threads. In PLDI'08, pages 170--182, June 2008.
[11]
X. Feng, Z. Shao, Y. Guo, and Y. Dong. Combining domain-specific and foundational logics to verify complete software systems. In VSTTE'08, pages 54--69, 2008.
[12]
L. Gu, A. Vaynberg, B. Ford, Z. Shao, and D. Costanzo. CertiKOS: a certified kernel for secure cloud computing. In APSys '11, 2011.
[13]
R. Gu, J. Koenig, T. Ramananandro, Z. Shao, X. Wu, S.-C. Weng, H. Zhang, and Y. Guo. Deep specifications and certified abstraction layers. Yale Univ. Technical Report YALEU/DCS/TR-1500; http://flint.cs.yale.edu/publications/dscal.html, Oct. 2014.
[14]
C. A. R. Hoare. An axiomatic basis for computer programming. Communications of the ACM, 12(10):576--580, Oct. 1969.
[15]
C.-K. Hur, D. Dreyer, G. Neis, and V. Vafeiadis. The marriage of bisimulations and Kripke logical relations. In POPL'12, pages 59--72.
[16]
D. Jackson. Software abstractions: logic, languages, and analysis. The MIT Press, 2012.
[17]
G. Klein, K. Elphinstone, G. Heiser, J. Andronick, D. Cock, P. Derrin, D. Elkaduwe, K. Engelhardt, et al. seL4: Formal verification of an OS kernel. In SOSP'09, pages 207--220, October 2009.
[18]
L. Lamport. The temporal logic of actions. ACM Transactions on Programming Languages and Systems, 16(3), May 1994.
[19]
X. Leroy. The CompCert verified compiler. http://compcert.inria.fr/, 2005--2014.
[20]
X. Leroy. A formally verified compiler back-end. Journal of Automated Reasoning, 43(4):363--446, 2009.
[21]
X. Leroy and S. Blazy. Formal verification of a C-like memory model and its uses for verifying program transformation. J. Automated Reasoning, 41(1):1--31, 2008.
[22]
N. A. Lynch and F. W. Vaandrager. Forward and backward simulations: I. Untimed systems. Inf. Comput., 121(2):214--233, 1995.
[23]
R. Milner, M. Tofte, R. Harper, and D. MacQueen. The Definition of Standard ML (Revised). MIT Press, Cambridge, Massachusetts, 1997.
[24]
J. C. Mitchell. Representation independence and data abstraction. In POPL'86, pages 263--276, January 1986.
[25]
C. C. Morgan. Programming from specifications, 2nd Edition. Prentice- Hall, 1994.
[26]
A. Nanevski, G. Morrisett, and L. Birkedal. Polymorphism and separation in Hoare type theory. In ICFP'06, pages 62--73, Sept. 2006.
[27]
P. G. Neumann, R. S. Boyer, R. J. Feiertag, K. N. Levitt, and L. Robinson. A provably secure operating system: its system, its applications, and proofs. Technical Report CSL-116, SRI, May 1980.
[28]
P. W. O'Hearn. Resources, concurrency and local reasoning. In CONCUR'04, pages 49--67, 2004.
[29]
J. T. Perconti and A. Ahmed. Verifying an open compiler using multi- language semantics. In ESOP'14, pages 128--148, 2014.
[30]
B. C. Pierce. Types and Programming Languages. The MIT Press, 2002.
[31]
J. C. Reynolds. Theories of Programming Languages. Cambridge University Press, 1998.
[32]
J. C. Reynolds. Separation logic: A logic for shared mutable data structures. In LICS'02, pages 55--74, 2002.
[33]
J. Sevcík, V. Vafeiadis, F. Z. Nardelli, S. Jagannathan, and P. Sewell. CompCertTSO: A verified compiler for relaxed-memory concurrency. J. ACM, 60(3), 2013.
[34]
M. Spivey. The Z Notation: A reference manual. Prentice Hall, 1992.
[35]
The Coq development team. The Coq proof assistant. http://coq.inria.fr, 1999--2014.
[36]
A. Vaynberg and Z. Shao. Compositional verification of a baby virtual memory manager. In CPP'12, pages 143--159, Dec 2012.

Cited By

View all
  • (2025)Generically Automating Separation Logic by Functors, Homomorphisms, and ModulesProceedings of the ACM on Programming Languages10.1145/37049039:POPL(1992-2024)Online publication date: 9-Jan-2025
  • (2025)Unifying Compositional Verification and Certified Compilation with a Three-Dimensional Refinement AlgebraProceedings of the ACM on Programming Languages10.1145/37049009:POPL(1903-1933)Online publication date: 9-Jan-2025
  • (2024)Modular Verification of Secure and Leakage-Free Systems: From Application Specification to Circuit-Level ImplementationProceedings of the ACM SIGOPS 30th Symposium on Operating Systems Principles10.1145/3694715.3695956(655-672)Online publication date: 4-Nov-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '15: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
January 2015
716 pages
ISBN:9781450333009
DOI:10.1145/2676726
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 50, Issue 1
    POPL '15
    January 2015
    682 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2775051
    • Editor:
    • Andy Gill
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 14 January 2015

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. abstraction layer
  2. certified compilers
  3. certified os kernels
  4. deep specification
  5. modularity
  6. program verification

Qualifiers

  • Research-article

Funding Sources

Conference

POPL '15
Sponsor:

Acceptance Rates

POPL '15 Paper Acceptance Rate 52 of 227 submissions, 23%;
Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)80
  • Downloads (Last 6 weeks)7
Reflects downloads up to 12 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2025)Generically Automating Separation Logic by Functors, Homomorphisms, and ModulesProceedings of the ACM on Programming Languages10.1145/37049039:POPL(1992-2024)Online publication date: 9-Jan-2025
  • (2025)Unifying Compositional Verification and Certified Compilation with a Three-Dimensional Refinement AlgebraProceedings of the ACM on Programming Languages10.1145/37049009:POPL(1903-1933)Online publication date: 9-Jan-2025
  • (2024)Modular Verification of Secure and Leakage-Free Systems: From Application Specification to Circuit-Level ImplementationProceedings of the ACM SIGOPS 30th Symposium on Operating Systems Principles10.1145/3694715.3695956(655-672)Online publication date: 4-Nov-2024
  • (2024)Refinement Composition LogicProceedings of the ACM on Programming Languages10.1145/36746458:ICFP(573-601)Online publication date: 15-Aug-2024
  • (2024)A Compositional Theory of LinearizabilityJournal of the ACM10.1145/364366871:2(1-107)Online publication date: 27-Jan-2024
  • (2024)ProveriT: A Parameterized, Composable, and Verified Model of TEE Protection ProfileIEEE Transactions on Dependable and Secure Computing10.1109/TDSC.2024.337531121:6(5341-5358)Online publication date: Nov-2024
  • (2024) SimplMMJournal of Systems Architecture: the EUROMICRO Journal10.1016/j.sysarc.2023.103049147:COnline publication date: 17-Apr-2024
  • (2024) ThreadAbsJournal of Systems Architecture: the EUROMICRO Journal10.1016/j.sysarc.2023.103046147:COnline publication date: 17-Apr-2024
  • (2024)Specifying and Verifying Persistent LibrariesProgramming Languages and Systems10.1007/978-3-031-57267-8_8(185-211)Online publication date: 5-Apr-2024
  • (2023)Stuttering for FreeProceedings of the ACM on Programming Languages10.1145/36228577:OOPSLA2(1677-1704)Online publication date: 16-Oct-2023
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media