TL;DR: A source-to-source translation of C code into Eiffel, a modern object-oriented programming language, and the supporting tool C2Eif is presented, which supports the entire C language as used in practice, including its usage of native system libraries and inlined assembly code.
Abstract: Can we reuse some of the huge code-base developed in C to take advantage of modern programming language features such as type safety, object-orientation, and contracts? This paper presents a source-to-source translation of C code into Eiffel, a modern object-oriented programming language, and the supporting tool C2Eif. The translation is completely automatic and supports the entire C language (ANSI, as well as many GNU C Compiler extensions, through CIL) as used in practice, including its usage of native system libraries and inlined assembly code. Our experiments show that C2Eif can handle C applications and libraries of significant size (such as vim and libgsl), as well as challenging benchmarks such as the GCC torture tests. The produced Eiffel code is functionally equivalent to the original C code, and takes advantage of some of Eiffel's features to produce safe and easy-to-debug translations.
TL;DR: The unified Eiffel Linda language is presented, with discussion of the semantic issues which were considered in the course of its evolution, and details of the interesting features of the particular implementation.
Abstract: Eiffel is a statically-typed object-oriented language which supports good software engineering techniques but provides no support for concurrency; Linda is a parallel programming model which provides a uniform semantics for coordination and communication among multiple processes. This paper describes an Eiffel Linda which injects the Linda operations into the Eiffel language. The resulting synthesis extends both Eiffel and Linda; the implications of the synergy between the two systems are examined, and suggestions for future work are proposed.We begin with an examination of the Eiffel execution model, with particular reference to its emphasis on the correct construction of software systems. We briefly describe the Linda language, and compare it to other parallelism models. The unified Eiffel Linda language is then presented, with discussion of the semantic issues which were considered in the course of its evolution, and details of the interesting features of our particular implementation. Comparisons to past work in Linda and in object-oriented concurrency are offered. In conclusion, we reflect on the significance of Eiffel Linda, and consider its relevance to future work in object-based concurrency.
TL;DR: The symbolic execution-based verification algorithm used in Smallfoot is modified to support mechanized checking of the variant of separation logic proposed, where side effect-free expressions from the host programming language can be used in assertions.
Abstract: Separation logic is a popular specification language for imperative programs where the heap can only be mentioned through points-to assertions. However, separation logic’s take on assertions does not match well with the classical view of assertions as boolean, side effect-free, potentially heap-dependent expressions from the host programming language familiar to many developers.
In this paper, we propose a variant of separation logic where side effect-free expressions from the host programming language, such as pointer dereferences and invocations of pure methods, can be used in assertions. We modify the symbolic execution-based verification algorithm used in Smallfoot to support mechanized checking of our variant of separation logic. We have implemented this algorithm in a tool and used the tool to verify some interesting programming patterns.
TL;DR: This technique can be used with C++ to emulate the full set of assertions used in Eiffel to implement Design by Contract.
Abstract: Assertions are a basic programming ingredient. If the language being used does not support them in a proper way, then you must at least use some kind of standardized comments to express things like preconditions for functions. The comments can be turned into executable functions by a preprocessor, but we could write the function calls directly, with the advantage of having the compiler check their syntax. This technique can be used with C++ to emulate the full set of assertions used in Eiffel to implement Design by Contract. The assertion functions are grouped in a class (Assertions class), which is inherited by the classes whose functions we want to assert. The assertions can be turned on and off, object by object, during the execution of the program. The system works well under inheritance, although some guidelines must be followed when writing postconditions on the base class. The simplicity of this mechanism makes it possible to comment out all or some of the assertions automatically through the programming environment.
TL;DR: The Eiffel language includes features to support abstract data types, inheritance, and dynamic building, so it fully supports object-oriented programming.
Abstract: From the Publisher:
Eiffel is a hybrid language with both imperative and object-oriented features. The language includes features to support abstract data types, inheritance, and dynamic building, so it fully supports object-oriented programming.