Extending Programming Language to Support Object Orientation in Legacy Systems

Hemang Mehta1, S J Balaji1 and Dharanipragada Janakiram1

  1. Department of Computer Science and Engineering, Indian Institute of Technology Madras
    Chennai 600036, 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.

Key words

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

Digital Object Identifier (DOI)


Publication information

Volume 10, Issue 4 (October 2013)
Special Issue on Advances in Model Driven Engineering, Languages and Agents
Year of Publication: 2013
ISSN: 2406-1018 (Online)
Publisher: ComSIS Consortium

Full text

DownloadAvailable in PDF
Portable Document Format

How to cite

Mehta, H., Balaji, S. J., Janakiram, D.: Extending Programming Language to Support Object Orientation in Legacy Systems. Computer Science and Information Systems, Vol. 10, No. 4, 1661-1672. (2013), https://doi.org/10.2298/CSIS130115070M