The bedrock structured programming system
Author:
Open Access
- 25 September 2013
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 48 (9) , 391-402
Abstract
We report on the design and implementation of an extensible programming language and its intrinsic support for formal verification. Our language is targeted at low-level programming of infrastructure like operating systems and runtime systems. It is based on a cross-platform core combining characteristics of assembly languages and compiler intermediate languages. From this foundation, we take literally the saying that C is a "macro assembly language": we introduce an expressive notion of certified low-level macros, sufficient to build up the usual features of C and beyond as macros with no special support in the core. Furthermore, our macros have integrated support for strongest postcondition calculation and verification condition generation, so that we can provide a high-productivity formal verification environment within Coq for programs composed from any combination of macros. Our macro interface is expressive enough to support features that low-level programs usually only access through external tools with no formal guarantees, such as declarative parsing or SQL-inspired querying. The abstraction level of these macros only imposes a compile-time cost, via the execution of functional Coq programs that compute programs in our intermediate language; but the run-time cost is not substantially greater than for more conventional C code. We describe our experiences constructing a full C-like language stack using macros, with some experiments on the verifiability and performance of individual programs running on that stack.Keywords
This publication has 26 references indexed in Scilit:
- Bridging the Gap: Automatic Verified Abstraction of C2012
- Certifying low-level programs with hardware interrupts and preemptive threads2008
- Xoc, an extension-oriented compiler for systems programming2008
- Relational inductive shape analysis2008
- Scalable Shape Analysis for Systems CodeLecture Notes in Computer Science, 2007
- Harpy2007
- Certified self-modifying code2007
- SingularityACM SIGOPS Operating Systems Review, 2007
- Smallfoot: Modular Automatic Assertion Checking with Separation Logic2006
- Parametric shape analysis via 3-valued logicACM Transactions on Programming Languages and Systems, 2002