Title
Using XCAP to certify realistic systems code: machine context management
Abstract
Formal, modular, and mechanized verification of realistic systems code is desirable but challenging. Verification of machine context management (a basis of multi-tasking) is one representative example. With context operations occurring hundreds to thousands of times per second on every computer, their correctness deserves careful examination. Given the small and stable code bases, it is a common misunderstanding that the context management code is suitable for informal scrutiny and testing. Unfortunately, after being extensively studied and used for decades, it still proves to be a common source of bugs and confusion. Yet its verification remains difficult due to the machine-level detail, irregular patterns of control flows, and rich application scenarios. This paper reports our experience applying XCAP--a recent theoretical verification framework--to certify a realistic x86 implementation of machine context management. XCAP supports expressive and modular logical specifications, but has only previously been applied on simple idealized machine and code. By applying the XCAP theory to an x86 machine model, building libraries of common proof tactics and lemmas, composing specifications for the context data structures and routines, and proving that the code behave accordingly, we achieved the first formal, modular, and mechanized verification of realistic x86 context management code. Our proofs are fully mechanized in the Coq proof assistant. Our certified library code runs on stock hardware and can be linked with other certified systems and application code. Our technique applies to other variants or extensions of context management (e.g., more complex context, different platforms), provides a solid basis for further verification of thread implementation and concurrent programs, and illustrates how to achieve formal, modular, and mechanized verification of realistic systems code.
Year
Venue
Keywords
2007
TPHOLs
machine context management,context data structure,certified library code,application code,context management code,x86 context management code,realistic systems code,complex context,stable code base,mechanized verification
Field
DocType
Volume
Data structure,Separation logic,Context management,Programming language,Computer science,Correctness,Algorithm,Theoretical computer science,Mathematical proof,Modular design,Context switch,Proof assistant
Conference
4732
ISSN
ISBN
Citations 
0302-9743
3-540-74590-4
32
PageRank 
References 
Authors
3.52
10
3
Name
Order
Citations
PageRank
Zhaozhong Ni11419.47
Dachuan Yu217913.09
Zhong Shao389768.80