Browse Prior Art Database

Version Independence for Object Oriented Programming Systems

IP.com Disclosure Number: IPCOM000109739D
Original Publication Date: 1992-Sep-01
Included in the Prior Art Database: 2005-Mar-24
Document File: 3 page(s) / 86K

Publishing Venue

IBM

Related People

Conner, MH: AUTHOR [+3]

Abstract

An improvement to object technology is disclosed. A software technique is presented that allows client binaries to be isolated from the evolution of object definitions they are using, yet still allows fast offset-based method resolution.

This text was extracted from an ASCII text file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 53% of the total text.

Version

Independence

for Object Oriented Programming Systems

       An improvement to object technology is disclosed.  A
software technique is presented that allows client binaries to be
isolated from the evolution of object definitions they are using, yet
still allows fast offset-based method resolution.

      In offset-based object-oriented programming systems such as
C+the addresses of functions and their offsets within a method table
are statically determined at compile time.  This makes it impossible
to change class definitions in significant ways (for example, adding
instance data, moving methods to parent class, inserting a new class
in between current class and parent, adding new methods, etc.)
without changing the client binaries that use them.

      In the System Object Model (SOM) [*] that appears in OS/2* 2.0
we add an extra level of indirection in the form of a class data
structure, which we build at compile time but initialize at runtime.
This permits us far greater freedom to make changes to the class
definitions without changing the client binaries that use them.

      In the C Language version of System Object Model (SOM)
appearing in OS/2 2.0 the structure for the class SOMObject is:
     SOMEXTERN struct SOMObjectClassDataStructure {
         SOMAny *classObject;
         somMOffset somInit;
         somMOffset somUninit;
         somMOffset somFree;
         somMOffset somMissingMethod;
         somMOffset somGetClassName;
         somMOffset somGetClass;
         somMOffset somIsA;
         somMOffset somRespondsTo;
         somMOffset somIsInstanceOf;
         somMOffset somGetSize;
         somMOffset somDumpSelf;
         somMOffset somDumpSelfInt;
         somMOffset somPrintSelf;
         somMOffset somFreeObj;
         somMOffset somDispatchV;
         somMOffset somDispatchL;
         somMOffset somDispatchA;
         somMOffset somDispatchD;
     } SOMObjectClassData;

      At runtime these offsets are initialized when the class module
is loaded, using the SOMObjectsomInitializeClass function generated
by the SOM compiler.
     static void SOMObjectsomInitializeClass ()
    ...