Cmod: Modular Information Hiding and Type-Safe Linking for C∗

نویسندگان

  • Saurabh Srivastava
  • Michael Hicks
  • Jeffrey S. Foster
چکیده

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. ∗UMD, Tech Report CS-4816

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Appendix to Cmod: Modular Information Hiding and Type-Safe Linking for C

In this section we show that our rules from Figure 2 are sound for MTAL0, assuming no type abstraction or type naming is present. We begin by stating some lemmas about MTAL0 (Figure 4). Lemma 2.1 (Preservation) If ` O1 link O2 ; O then ` O Lemma 2.2 (Associativity of link) If ` (O1 link O2) link O3 ; O then ` O1 link (O2 link O3) ; O. Lemma 2.3 (Commutativity of link) If ` O1 link O2 ; O then `...

متن کامل

CMOD : Enforcing Modularity in C Code

Many modern languages have sophisticated linguistic support for modular programming. In these languages, the different components of a system can be developed independently, and when combined together the resulting program will be type correct. The C programming language does not contain direct support for modules, but over time programmers have developed a discipline of modular programming whi...

متن کامل

$C$-class functions on common fixed point theorems for weak‎ ‎contraction mapping of integral type in modular spaces

‎In this paper‎, ‎we use the concept of $C$-class functions introduced‎ ‎by Ansari [4] to prove the existence and uniqueness of‎ ‎common fixed point for self-mappings in modular spaces of integral‎ ‎inequality‎. ‎Our results extended and generalized previous known‎ ‎results in this direction‎.

متن کامل

Compositional Methods for Information-Hiding

Systems concerned with information hiding often use randomization to obfuscate the link between the observables and the information to be protected. The degree of protection provided by a system can be expressed in terms of the probability of error associated to the inference of the secret information. We consider a probabilistic process calculus to specify such systems, and we study how the op...

متن کامل

A survey on digital data hiding schemes: principals, algorithms, and applications

This paper investigates digital data hiding schemes. The concept of information hiding will be explained at first, and its traits, requirements, and applications will be described subsequently. In order to design a digital data hiding system, one should first become familiar with the concepts and criteria of information hiding. Having knowledge about the host signal, which may be audio, image, ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006