← Back to Patent Explorer
US5923880A Expired / Lapsed US ⏱️ 0.0 years remaining

Method and apparatus for generating executable code from object-oriented source code

Assignee: Sun Microsystems Inc
•
Filing: 1998-05-01
•
Granted: 1999-07-13
•
Expires: 2018-05-01
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract The present invention provides an improved method and apparatus for generating executable computer code for an application program written in C++ source code. In typical prior art systems, application program source code that has not itself been modified must still generally be recompiled in the event that object-oriented class definitions used by the application program and contained in separate header files have been modified. The methods and apparatus of the present invention reduce the need for such recompilation, by using procedural interfaces to implement object-oriented interfaces at the compiled code level. Thus, in accordance with the present invention, compiled header file code is generated that includes accessors for accessing object instances of the class definitions, each of the accessors being a procedure operative to access the object instances of the corresponding class definition. Compiled application program code is generated which replaces object references with procedure calls to appropriate accessors. In this way, the application program and the header file class definitions remain relatively independent of each other with respect to implementation details, even at the compiled code level.

Inventors

  • 👤 John R. Rose
  • 👤 Wayne C. Gramlich

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-11-01 06:26
CPC Classifications
G; G06; G06F; G06F8/00; G06F8/40; G06F8/41; G06F8/48

Claims Analysis

Total Claims: 39
Claim 1
Independent Claim 263 words
A method, using a digital computer, for generating executable computer code for an application program, said application program including at least one reference to one or more header files, each of the header files comprising one or more class definitions, each of said class definitions deeming a class of object instances, and said application program further comprising a plurality of source code instructions, said source code instructions including one or more references to one or more object instances of the class definitions, and said method comprising the steps of: compiling the header files, thereby generating compiled header file code comprising one or more accessors, each of the accessors being a procedure operative to access the object instances of an associated one of the class definitions; compiling the application program, thereby generating compiled application program code corresponding to the plurality of source code instructions, said compiled application program code including one or more procedure calls to one or more of the accessors, each of said procedure calls corresponding to the one or more references in the source code instructions to one or more object instances of the class definitions; linking the compiled header file code and the compiled application program code; modifying one or more header files; recompiling the one or more modified header files thereby generating recompiled header file code; selectively recompiling only those portions of the application program which are affected by the recompiled header files; and linking the recompiled header file code and the compiled application code, and the recompiled application program code if any, thereby generating the executable computer code.
Claim 2
Independent Claim 263 words
A method, using a digital computer, for generating executable computer code for an application program, said application program including at least one reference to one or more header files, each of the header files comprising one or more class definitions, each of said class definitions deeming a class of object instances, and said application program further comprising a plurality of source code instructions, said source code instructions including one or more references to one or more object instances of the class definitions, and said method comprising the steps of: compiling the header files, thereby generating compiled header file code comprising one or more accessors, each of the accessors being a procedure operative to access the object instances of an associated one of the class definitions; compiling the application program, thereby generating compiled application program code corresponding to the plurality of source code instructions, said compiled application program code including one or more procedure calls to one or more of the accessors, each of said procedure calls corresponding to the one or more references in the source code instructions to one or more object instances of the class definitions; linking the compiled header file code and the compiled application program code; modifying one or more header files; recompiling the one or more modified header files thereby generating recompiled header file code; selectively recompiling only those portions of the application program which are affected by the recompiled header files; and linking the recompiled header file code and the compiled application code, and the recompiled application program code if any, thereby generating the executable computer code.
Claim 3
Dependent Claim 59 words
The method of claim 1, wherein the step of modifying one or more header files includes the step of modifying one or more class definitions therein, and wherein the step of selectively recompiling includes recompiling those portions of the application program which include one or more references to class definitions that have been modified in the modified header files.
Claim 4
Dependent Claim 49 words
The method of claim 2, wherein the compiled application code is stored in an application program code file, said file having a timestamp reflecting said file's most recent modification, and wherein the method further includes the step of incrementing the timestamp without otherwise recompiling the application program code file.
Claim 5
Dependent Claim 18 words
The method of claim 2, wherein the step of selectively recompiling is carried out independent of user selection.
Claim 6
Dependent Claim 47 words
The method of claim 1, wherein the class definitions comprise a collection of symbolic names and data types, and wherein each of the procedure calls to the accessors specifies one or more of the symbolic names and data types of the class definition associated with the accessor.
Claim 7
Dependent Claim 26 words
The method of claim 1, wherein the accessors include one or more accessors for reading, writing, and addressing the object instances of the associated class definition.
Claim 8
Dependent Claim 26 words
The method of claim 1, wherein the accessors include one or more accessors for calling member functions on the object instances of the associated class definition.
Claim 9
Dependent Claim 26 words
The method of claim 1, wherein the accessors include one or more accessors for performing type conversions on the object instances of the associated class definition.
Claim 10
Dependent Claim 29 words
The method of claim 1, wherein the accessors include one or more accessors for fetching one or more constant values from the object instances of the associated class definition.
Claim 11
Dependent Claim 29 words
The method of claim 1, wherein the accessors include one or more accessors for fetching one or more size measurements from the object instances of the associated class definition.
Claim 12
Dependent Claim 26 words
The method of claim 1, wherein the accessors include one or more accessors for recording usage statistics regarding the object instances of the associated class definition.
Claim 13
Dependent Claim 25 words
The method of claim 1, wherein the accessors include one or more accessors for checking invariance regarding the object instances of the associated class definition.
Claim 14
Independent Claim 264 words
An apparatus for generating executable computer code for an application program, said application program including at least one reference to one or more header files, each of the header files comprising one or more class definitions, each of said class definitions defining a class of object instances, and said application program further comprising a plurality of source code instructions, said source code instructions including one or more references to one or more object instances of the class definitions, said apparatus comprising: a compiler operative to generate compiled header file code and recompiled header file code after a header file has been modified by a user, said compiled and recompiled header file code comprising one or more accessors, each of the accessors being a procedure operative to access the object instances of an associated one of the class definitions, said compiler further operative to generate compiled application program code corresponding to the plurality of source code instructions, said compiled application program code including one or more procedure calls to one or more of the accessors, each of said procedure calls corresponding to the one or more references in the source code instructions to one or more object instances of the class definitions, said compiler further operative to selectively recompile and generate recompiled application program code for only those portion of the application program which are affected by the recompiled header code; and a linker operative to link the recompiled header file code and the compiled application program code, and recompiled application program code if any produced by the compiler, thereby generating the executable computer code.
Claim 15
Independent Claim 264 words
An apparatus for generating executable computer code for an application program, said application program including at least one reference to one or more header files, each of the header files comprising one or more class definitions, each of said class definitions defining a class of object instances, and said application program further comprising a plurality of source code instructions, said source code instructions including one or more references to one or more object instances of the class definitions, said apparatus comprising: a compiler operative to generate compiled header file code and recompiled header file code after a header file has been modified by a user, said compiled and recompiled header file code comprising one or more accessors, each of the accessors being a procedure operative to access the object instances of an associated one of the class definitions, said compiler further operative to generate compiled application program code corresponding to the plurality of source code instructions, said compiled application program code including one or more procedure calls to one or more of the accessors, each of said procedure calls corresponding to the one or more references in the source code instructions to one or more object instances of the class definitions, said compiler further operative to selectively recompile and generate recompiled application program code for only those portion of the application program which are affected by the recompiled header code; and a linker operative to link the recompiled header file code and the compiled application program code, and recompiled application program code if any produced by the compiler, thereby generating the executable computer code.
Claim 16
Dependent Claim 85 words
The apparatus of claim 13, further including a code generation utility program selectively operative to invoke the compiler and the linker, wherein the utility program is further operative to determine whether the compiled application program code has previously been generated, and to avoid invoking the compiler to generate the recompiled application program code when said compiled application program code has previously been generated, even if one or more of the header file class definitions was modified after the compiled application program code was previously generated.
Claim 17
Dependent Claim 59 words
The apparatus of claim 14, further including a storage file receiving and storing the compiled application program code, said storage file having a timestamp indicating said file's most recent modification, and said utility program further being operative to increment the timestamp in the event that said utility program avoids invoking the compiler to generate the recompiled application program code.
Claim 18
Dependent Claim 60 words
The apparatus of claim 13 wherein the compiler is operative to recompile header file code in which class definitions have been modified by a user, and wherein the compiler is operative to selectively recompile those portions of the application program code which include one or more references to class definitions that have been modified in the modified header file code.
Claim 19
Dependent Claim 17 words
The apparatus of claim 16, wherein the compiler is operative to selectively recompile independent of user selection.
Claim 20
Dependent Claim 47 words
The apparatus of claim 13, wherein the class definitions comprise a collection of symbolic names and data types, and wherein each of the procedure calls to the accessors specifies one or more of the symbolic names and data types of the class definition associated with the accessor.
Claim 21
Dependent Claim 26 words
The apparatus of claim 13, wherein the accessors include one or more accessors for reading, writing, and addressing the object instances of the associated class definition.
Claim 22
Dependent Claim 26 words
The apparatus of claim 13, wherein the accessors include one or more accessors for calling member functions on the object instances of the associated class definition.
Claim 23
Dependent Claim 26 words
The apparatus of claim 13, wherein the accessors include one or more accessors for performing type conversions on the object instances of the associated class definition.
Claim 24
Dependent Claim 29 words
The apparatus of claim 13, wherein the accessors include one or more accessors for fetching one or more constant values from the object instances of the associated class definition.
Claim 25
Dependent Claim 29 words
The apparatus of claim 13, wherein the accessors include one or more accessors for fetching one or more size measurements from the object instances of the associated class definition.
Claim 26
Dependent Claim 26 words
The apparatus of claim 13, wherein the accessors include one or more accessors for recording usage statistics regarding the object instances of the associated class definition.
Claim 27
Dependent Claim 24 words
The apparatus of claim 13, wherein the accessors include one more accessors for checking invariance regarding the object instances of the associated class definition.
Claim 28
Dependent Claim 304 words
A computer program product comprising a computer-usable medium, and computer-readable program code embodied in said medium for generating executable computer code for an application program, said application program including at least one reference to one or more header files, each of the header files comprising one or more class definitions, each of said class definitions defining a class of object instances, and said application program further comprising a plurality of source code instructions, said source code instructions including one or more references to one or more object instances of the class definitions, said computer-readable program code comprising: computer-readable header file compiler code configured to cause a computer to generate compiled header file code comprising one or more accessors, each of the accessors being a procedure operative to access the object instances of an associated one of the class definitions, said computer-readable header file compiler code further configured to cause a computer to generate recompiled header file code after a header file has been modified by user; computer-readable application compiler code configured to cause a computer to generate compiled application program code corresponding to the plurality of source code instructions, said compiled application program code including one or more procedure calls to one or more of the accessors, each of said procedure calls corresponding to the one or more references in the source code instructions to one or more object instances of the class definitions, said computer-readable application compiler code further configured to cause a computer to recompile and generate recompiled application program code for only those portions of the application program which are affected by the recompiled header files; and computer-readable linker code configured to cause a computer to link the compiled header file code and the compiled application program code, and the recompiled application code if any, thereby generating the executable computer code.
Claim 29
Dependent Claim 304 words
A computer program product comprising a computer-usable medium, and computer-readable program code embodied in said medium for generating executable computer code for an application program, said application program including at least one reference to one or more header files, each of the header files comprising one or more class definitions, each of said class definitions defining a class of object instances, and said application program further comprising a plurality of source code instructions, said source code instructions including one or more references to one or more object instances of the class definitions, said computer-readable program code comprising: computer-readable header file compiler code configured to cause a computer to generate compiled header file code comprising one or more accessors, each of the accessors being a procedure operative to access the object instances of an associated one of the class definitions, said computer-readable header file compiler code further configured to cause a computer to generate recompiled header file code after a header file has been modified by user; computer-readable application compiler code configured to cause a computer to generate compiled application program code corresponding to the plurality of source code instructions, said compiled application program code including one or more procedure calls to one or more of the accessors, each of said procedure calls corresponding to the one or more references in the source code instructions to one or more object instances of the class definitions, said computer-readable application compiler code further configured to cause a computer to recompile and generate recompiled application program code for only those portions of the application program which are affected by the recompiled header files; and computer-readable linker code configured to cause a computer to link the compiled header file code and the compiled application program code, and the recompiled application code if any, thereby generating the executable computer code.
Claim 30
Dependent Claim 88 words
The computer program product of claim 26, further comprising computer-readable utility code configured to cause a computer to execute selectively the computer-readable header file compiler code, the computer-readable application compiler code, and the computer-readable linker code, wherein the computer-readable utility code is further configured to cause a computer to avoid re-generating the recompiled application program code if said compiled application program code has previously been generated even if one or more of the header file class definitions was modified after the compiled application program code was previously generated.
Claim 31
Dependent Claim 44 words
The computer program product of claim 26 wherein the computer-readable header file compiler code is configured to recompile those portions of the application program which include one or more references to class definitions that have been modified in the modified header files by user.
Claim 32
Dependent Claim 22 words
The computer program product of claim 26, wherein the computer-readable application compiler code is configured to selectively recompile independent of user selection.
Claim 33
Independent Claim 306 words
A method for providing a mechanism for generating executable computer code for an application program, said application program including at least one reference to one or more header files, each of the header files comprising one or more class definitions, each of said class definitions defining a class of object instances, and said application program further comprising a plurality of source code instructions, said source code instructions including one or more references to one or more object instances of the class definitions, and said method comprising the steps of: providing a first mechanism for compiling the header files, said first mechanism being operable to generate compiled header file code comprising one or more accessors, each of the accessors being a procedure operative to access the object instances of an associated one of the class definitions, said first mechanism further for recompiling the header files after the header files have been modified by a user, thereby generating recompiled header file code; providing a second mechanism for compiling the application program, said second mechanism being operable to generate compiled application program code corresponding to the plurality of source code instructions, said compiled application program code including one or more procedure calls to one or more of the accessors, each of said procedure calls corresponding to the one or more references in the source code instructions to one or more object instances of the class definitions, said second mechanism further for selectively recompiling only those portions of the application program which are affected by the recompiled header files; and providing a third mechanism for linking the compiled header file code and the compiled application program code, and for linking the recompiled header file code and the compiled application code, and the recompiled application program code if any, said third mechanism being thereby operable to generate the executable computer code.
Claim 34
Independent Claim 306 words
A method for providing a mechanism for generating executable computer code for an application program, said application program including at least one reference to one or more header files, each of the header files comprising one or more class definitions, each of said class definitions defining a class of object instances, and said application program further comprising a plurality of source code instructions, said source code instructions including one or more references to one or more object instances of the class definitions, and said method comprising the steps of: providing a first mechanism for compiling the header files, said first mechanism being operable to generate compiled header file code comprising one or more accessors, each of the accessors being a procedure operative to access the object instances of an associated one of the class definitions, said first mechanism further for recompiling the header files after the header files have been modified by a user, thereby generating recompiled header file code; providing a second mechanism for compiling the application program, said second mechanism being operable to generate compiled application program code corresponding to the plurality of source code instructions, said compiled application program code including one or more procedure calls to one or more of the accessors, each of said procedure calls corresponding to the one or more references in the source code instructions to one or more object instances of the class definitions, said second mechanism further for selectively recompiling only those portions of the application program which are affected by the recompiled header files; and providing a third mechanism for linking the compiled header file code and the compiled application program code, and for linking the recompiled header file code and the compiled application code, and the recompiled application program code if any, said third mechanism being thereby operable to generate the executable computer code.
Claim 35
Independent Claim 257 words
A method, using a computer, for generating executable computer code for an application program, said application program including at least one reference to one or more header files, each of the header files comprising one or more class definitions, each of said class definitions deeming a class of object instances, and said application program further comprising a plurality of source code instructions, said source code instructions including one or more references to one or more object instances of the class definitions, the method comprising the steps of: compiling the one or more header files which generates compiled header file code; compiling the application program which generates compiled application program code, wherein the application program and the compiled application program code each include a timestamp; linking the compiled header file code and the compiled application program code; recompiling the one or more header file code which generates recompiled header file code; selectively recompiling one or more portions of the application program which are affected by the recompiled header file code, selective recompilation including the steps of, comparing the timestamp of the application program to the timestamp of the compiled application program code timestamp, and recompiling all of the application program if the timestamp of the application program is later than the timestamp of the compiled application program code, and selectively recompiling the one or more portions of the application program which are affected by the recompiled header file code if the timestamp of the application program is not later than the timestamp of the compiled application program code.
Claim 36
Independent Claim 257 words
A method, using a computer, for generating executable computer code for an application program, said application program including at least one reference to one or more header files, each of the header files comprising one or more class definitions, each of said class definitions deeming a class of object instances, and said application program further comprising a plurality of source code instructions, said source code instructions including one or more references to one or more object instances of the class definitions, the method comprising the steps of: compiling the one or more header files which generates compiled header file code; compiling the application program which generates compiled application program code, wherein the application program and the compiled application program code each include a timestamp; linking the compiled header file code and the compiled application program code; recompiling the one or more header file code which generates recompiled header file code; selectively recompiling one or more portions of the application program which are affected by the recompiled header file code, selective recompilation including the steps of, comparing the timestamp of the application program to the timestamp of the compiled application program code timestamp, and recompiling all of the application program if the timestamp of the application program is later than the timestamp of the compiled application program code, and selectively recompiling the one or more portions of the application program which are affected by the recompiled header file code if the timestamp of the application program is not later than the timestamp of the compiled application program code.
Claim 37
Dependent Claim 72 words
The method of claim 31, wherein the application program and the recompiled header file bode both include a symbol table, and the step of recompiling one or more portions of the application program further includes: comparing the symbol table of the application program to the symbol table of the recompiled header file code if the timestamp of the application program is not later than the timestamp of the compiled application program code.
Claim 38
Dependent Claim 46 words
The method of claim 32, wherein the step of recompiling one or more portions of the application program further includes: recompiling all of the application program if the symbol table of the application program and the symbol table of the recompiled header file code are mismatched.
Claim 39
Dependent Claim 55 words
The method of claim 32, wherein the step of recompiling one or more portions of the application program further includes: updating the timestamp of the compiled application program code if the symbol table of the application program and the symbol table of the recompiled header file code match, whereby the application program is not recompiled.

References Cited (Backward Citations)

US5204960A Cited
US5307499A Cited
US5459868A Cited
US5535391A Cited
US5625822A Cited
US5442792A Cited
US5583983A Cited
US5778354A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 2002-07-12 2003-01-11 2003-07-13 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2006-07-12 2007-01-11 2007-07-13 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2010-07-12 2011-01-11 2011-07-13 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag