Sciweavers

TSE
2008

Modular Information Hiding and Type-Safe Linking for C

13 years 11 months ago
Modular Information Hiding and Type-Safe Linking for C
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. Categories and Subject Descriptors D.3.3 [Programming Languages]: Language Constructs and Features--Modules, packages General Terms Desig...
Saurabh Srivastava, Michael Hicks, Jeffrey S. Fost
Added 15 Dec 2010
Updated 15 Dec 2010
Type Journal
Year 2008
Where TSE
Authors Saurabh Srivastava, Michael Hicks, Jeffrey S. Foster, Patrick Jenkins
Comments (0)