ACM Home Page
Please provide us with feedback. Feedback
Modular information hiding and type-safe linking for C
Full text PdfPdf (321 KB)
Source Types In Languages Design And Implementation archive
Proceedings of the 2007 ACM SIGPLAN international workshop on Types in languages design and implementation table of contents
Nice, Nice, France
SESSION: Session 1 table of contents
Pages: 3 - 14  
Year of Publication: 2007
ISBN:1-59593-393-X
Authors
Saurabh Srivastava  University of Maryland, College Park, MD
Michael Hicks  University of Maryland, College Park, MD
Jeffrey S. Foster  University of Maryland, College Park, MD
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 5,   Downloads (12 Months): 40,   Citation Count: 2
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

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

ABSTRACT

This paper presents CMod, a novel tool that provides a sound module system for C. CMod works by enforcing a set of four rules that are based on principles of modular reasoning and on current programming practice. CMod's rules flesh out the convention that .h header files are module interfaces and .c source files are module implementations. Although this convention is well-known, developing CMod's rules revealed there are many subtleties in applying the basic pattern correctly. We have proven formally that CMod's rules enforce both information hiding and type-safe linking. We evaluated CMod on a number of benchmarks, and found that most programs obey CMod's rules, or can be made to with minimal effort, while rule violations reveal brittle coding practices including numerous information hiding violations and occasional type errors.


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
 
2
L. Cannon, R. Elliott, L. Kirchoff, J. Miller, R. Mitze, E. Schan, N. Whittington, H. Spencer, D. Keppel, and M. Brader. Recommended C Style and Coding Standards. sixth edition, 1990.
 
3
COM: Component object model technologies. http://www.microsoft.com/com/default.mspx.
 
4
 
5
Exhuberant ctags. http://ctags.sourceforge.net/.
 
6
 
7
J.-M. Favre. CPP Denotational Semantics. In SCAM, 2003.
8
 
9
 
10
Once-only headers - the C preprocessor. gcc on-line documentation, section 2.4, http://gcc.gnu.org/onlinedocs/gcc-4.1.1/cpp/Once_002dOnly-Headers.html.
 
11
 
12
S. Johnson. Lint, a C program checker. Technical Report 65, Bell Labs, Murray Hill, N.J., Sept. 1977.
 
13
 
14
 
15
16
 
17
S. McConnell. Code Complete. Microsoft Press, 1993.
18
19
 
20
G. Morrisett. Personal communication, July 2006.
21
 
22
23
 
24
PC-lint/FlexeLint. http://www.gimpel.com/lintinfo.htm, 1999. Product of Gimpel Software.
 
25
 
26
A. Reid, M. Flatt, L. Stoller, J. Lepreau, and E. Eide. Knit: Component composition for systems software. In OSDI, 2000.
 
27
J. C. Reynolds. Types, abstractions and parametric polymorphism. Information Processing 83, pages 513--523.
 
28
D. Spuler and A. Sajeev. Static detection of preprocessor macro errors in C. Technical Report 92/7, James Cook University, Australia, '92.
 
29
S. Srivastava, M. Hicks, J. S. Foster, and B. Kanagal. Defining and Enforcing C's Module System. Technical Report CS-TR-4816, University of Maryland, College Park, 2006.
 
30
W. P. Stevens, G. J. Myers, and L. L. Constantine. Structured design. IBM Systems Journal, 13(2):115--139, 1974.
 
31
R. van Ommering, F. van der Linden, J. Kramer, and J. Magee. The Koala component model for consumer electronics software. IEEE Software, 2000.


Collaborative Colleagues:
Saurabh Srivastava: colleagues
Michael Hicks: colleagues
Jeffrey S. Foster: colleagues