Ox - Objectifying Structures

What is the Ox Project ?

Object oriented programming has many advantages over conventional procedural programming for constructing systems with highly modular and extensible abstractions. This project aims at objectifying large sized procedural code like the Linux kernel. The techniques though discussed with respect to the kernel, can be applied for objectifying any procedural application.
An insideout approach is adopted with which kernel structures can be objectified bottom up. Five levels of objectication are defined. Kernel files move from level 0 to level 4 as they mature in terms of degree of objectification. The kernel carrying partly objectified code has been tested.

The Ox project is being carried out at the Computer Science and Engineering Department at the Indian Institute of Technology Bombay under the guidance of Prof. R. K. Joshi.

What are Objectification Levels ?

Five levels of objectification are used to indicate the extent to which a particular file in the kernel has been objectified. At all levels, all files are required to be compilable by appropriate (gcc or g++) compiler to produce a bootable kernel image. Besides guiding the objectification process, the five levels described below can also be used to track the progress of the objectification process.

level 0 (Procedural)

A file at level 0 is the conventional C file in the existing kernel.

level 1 (G++ Compatible)

A file at level 1 is made g++ compatible by solving all compatibility issues. A file at level 1 also links with the rest of the kernel. The file need not contain any object oriented features, but once brought to this level, it is capable of objectifying itself. It can be noted that all header files included in a file that has reached level 1, are also at level 1.

level 1.x (Client of Objects)

A file at level 1.x has reached level 1 already, and hence outgoing procedural calls can be replaced by member function calls on objects located in other files that have reached levels 3 or 4.

level 2 (Local Objectification)

A file at level 2 has only local objectification, i.e., the external visibility is still procedural. To achieve level 2 maturity, wrapper functions are used.

level 3 (Dual Use)

At this level, some of the dependent code of objectified file reaches level 1.x or above, while the rest of the dependent code may still be at level 0. Thus it is required to maintain two interfaces to the objects located in this file.

level 4 (Full Objectification)

A file at level 4 is used only by files that are at level 1.x or above. Wrapper functions of files at level 4 are dissolved as they are not needed. Further object oriented refactoring such as structural adjustments can be applied on a group of files that have reached level 4.


  • AccessViz - A tool for generating Access Graphs from C/C++ source code.
  • The objectification of part of kernel structures is underway. Some of the files have been moved to various levels. Below are the files that have been modified. The files that have been modified can be found here
  • Documents

  • A report on the techniques for converting procedurecal code to object oriented. This also explains the technique using Access Graphs used by Ox. Here
  • This report discusses the problems which o ccur when linux kernel is compiled by g++. Two different approaches, complete conversion approach and gradual iterative conversion approach, to solve these problems are also discussed.
  • A document describing the details of AccessViz Tool. Here
  • A position report describing objectification process (Jan 2006) Here

  • Student Members (Earlier and Present)

    Anil Gracicas
    Nishit Desai      nadesai@cse[dot]iitb[dot]ac[dot]in
    Kanika Nema    kanika@cse[dot]iitb[dot]ac[dot]in
    Ramesh Gupta    rameshg@cse[dot]iitb[dot]ac[dot]in
    Srinath Gupta