[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

Computer Science and Information Systems 2013 Volume 10, Issue 4, Pages: 1661-1672
https://doi.org/10.2298/CSIS130115070M
Full text ( 159 KB)


Extending programming language to support object orientation in legacy systems

Mehta Hemang (Department of Computer Science and Engineering, Indian Institute of Technology Madras, Chennai, India)
Balaji S.J. (Department of Computer Science and Engineering, Indian Institute of Technology Madras, Chennai, India)
Janakiram Dharanipragada (Department of Computer Science and Engineering, Indian Institute of Technology Madras, Chennai, India)

The contemporary software systems written in C face maintainability issues because of tight coupling. Introducing object orientation can address these problems by raising the abstraction to objects, thereby providing better programmability and understandability. However, compiling a C software with a C++ compiler is difficult because of the incompatibilities between C and C++. Some of the incompatibilities such as designated initializers are nontrivial in nature and hence are very difficult to handle by automation such as scripting or by manual efforts. Moreover, runtime support for features such as global constructors, exception handling, runtime type inference, etc. is also required in the target system. Clearly, the traditional procedural language compiler cannot provide these features. In this paper, we propose extending programming language such as C++ to support object orientation in legacy systems instead of completely redesigning them. With a case study of Linux kernel, we report major issues in providing the compile and runtime support for C++ in legacy systems, and provide a solution to these issues. Our approach paves the way for converting a large C based software into C++. The experiments demonstrate that the proposed extension saves significant manual efforts with very little change in the g++ compiler. In addition, the performance study considers other legacy systems written in C and shows that the overhead resulting from the modifications in the compiler is negligible in comparison to the functionality achieved.

Keywords: g++, programming language, Linux kernel, legacy systems, object orientation