ACM Home Page
Please provide us with feedback. Feedback
Using meta-level compilation to check FLASH protocol code
Full text PdfPdf (1.39 MB)
Source ACM SIGPLAN Notices archive
Volume 35 ,  Issue 11  (November 2000) table of contents
Pages: 59 - 70  
Year of Publication: 2000
ISSN:0362-1340
Authors
Andy Chou  Computer Systems Laboratory, Stanford University, Stanford, CA
Benjamin Chelf  Computer Systems Laboratory, Stanford University, Stanford, CA
Dawson Engler  Computer Systems Laboratory, Stanford University, Stanford, CA
Mark Heinrich  Computer Systems Laboratory, Cornell University, Ithaca, NY
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 0,   Downloads (12 Months): 6,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/356989.356995
What is a DOI?

ABSTRACT

Building systems such as OS kernels and embedded software is difficult. An important source of this difficulty is the numerous rules they must obey: interrupts cannot be disabled for "too long," global variables must be protected by locks, user pointers passed to OS code must be checked for safety before use, etc. A single violation can crash the system, yet typically these invariants are unchecked, existing only on paper or in the implementor's mind.This paper is a case study in how system implementors can use a new programming methodology, metalevel compilation (MC), to easily check such invariants. It focuses on using MC to check for errors in the code used to manage cache coherence on the FLASH shared memory multiprocessor. The only real practical method known for verifying such code is testing and simulation. We show that simple, system-specific checkers can dramatically improve this situation by statically pinpointing errors in the program source. These checkers can be written by implementors themselves and, by exploiting the system-specific information this allows, can detect errors unreachable with other methods. The checkers in this paper found 34 bugs in FLASH code despite the care used in building it and the years of testing it has undergone. Many of these errors fall in the worst category of systems bugs: those that show up sporadically only after days of continuous use. The case study is interesting because it shows that the MC approach finds serious errors in well-tested, non-toy systems code. Further, the code to find such bugs is usually 10-100 lines long, written in a few hours, and exactly locates errors that, if discovered during testing, would require several days of investigation by an experienced implementor.The paper presents 8 checkers we wrote, their application to five different protocol implementations, and a discussion of the errors that we found.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
M. Bishop and M. Dilger. Checking for race conditions in file accesses. Computing systems, pages 131-152, Spring 1996.
2
 
3
S. Chandra, M. Dahlia, B. Richards, R. Wang, T. Anderson, and J. Larus. Experience with a language for writing coherence protocols. In Proceedings of the First Conference on Domain Specific Languages, pages 51-65, October 1997.
4
 
5
A. Chou and D. Engier. Metal: a language and system for building lightweight, system-specific software checkers, analyzers and optimizers. 2000.
6
 
7
R. F. Crew. ASTLOG: A language for examining abstract syntax trees. In Proceedings of the First Conference on Domain Specific Languages, pages 229-242, October 1997.
 
8
D.L. Detlefs, R.M. Leino, G. Nelson, and J.B. Saxe. Extended static checking. TR SRC-159, COMPAQ SRC, December 1998.
 
9
D. Engler, B. Chelf, A.C. Chou, and S. Hallem. A simple, effective method for checking and optimizing systems using system-specific, programmerwritten compiler extensions. To Appear in Operating Systems Design and Implementation (OSDI) 2000, April 2000.
 
10
D.R. Engler. Incorporating application semantics and control into compilation. In Proceedings of the First Conference on Domain Specij~c Languages, October 1997.
 
11
 
12
R. W. Floyd. Assigning meanings to programs, pages 19-32. J.T. Schwartz, Ed. American Mathematical Society, 1967.
 
13
 
14
 
15
M. Heinrich, D. Ofelt, M. Horowitz, and J. Hennessy. Hardware/software codesign of the stanford flash multiprocessor. Proceedings of the IEEE Special Issue on Hardware/Software Co-design, 85(3), March 1997.
 
16
 
17
 
18
Intrinsa. A technical introduction to prefix/enterprise. Technical report, Intrinsa Corporation, 1998.
 
19
A. Kolawa and A. Hicken. Insure++: A tool to support total quality software. http://ww~, parasoft, tom/insure/papers/ tech.htm.
20
 
21
T. Lord. Application specific static code checking for C programs: Ctool. In ~twaddle: A Digital Zine (version 1.0), 1997.
 
22
K.L. McMillan and J. Schwalbe. Formal verification of the gigamax cache consistency protocol. In Proceedings of the International Symposium on Shared Memory Multiprocessing, pages 242-51. Tokyo, Japan Inf. Process. Soc., 1991.
23
 
24
G. Nelson. Techniques for program verification. Available as Xerox PARC Research Report CSL- 81-10, June, 1981, Stanford University, 1981.
25
26
27
28
 
29

Collaborative Colleagues:
Andy Chou: colleagues
Benjamin Chelf: colleagues
Dawson Engler: colleagues
Mark Heinrich: colleagues