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

Method and system for translating goto-oriented procedural languages into goto-free object oriented languages

Assignee: International Business Machines Corp
•
Filing: 1997-12-22
•
Granted: 1999-12-14
•
Expires: 2017-12-22
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract A method and system for translating goto-oriented procedural languages into object oriented languages. A class structure is selected into which the source program will be transformed. The class structure is selected based upon the granularity of translation. The lowest level of granularity involves the translation of each source program statement into an executable object in the resulting object oriented program. Highest level of granularity translates the entire source program into a single object in the resultant program. The transformation program causes the construction of an output program that creates instances of each object type with parameters based upon the input source program. The parameters can specify branching logic to replace goto statements and they involve generation of executable method code to implement processing logic of the procedural source program. Intermediate levels of granularity are also possible. The resulting program can be optimized to reduce memory and load times by replacing passing of statement index values with passing of the next executable object itself. Finally, dynamic loading of objects can be implemented to provide that object instances are created only as required for execution. This optimization reduces the memory requirements and speeds processing particularly in cases where significant portions of code are not executed.

Inventors

  • 👤 Peter Carl Bahrs
  • 👤 Barry Alan Feigenbaum

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-11-01 19:43
CPC Classifications
G; G06; G06F; G06F8/00; G06F8/40; G06F8/41; G06F8/42; G06F8/427; G06F8/30; G06F8/51

Claims Analysis

Total Claims: 23
Claim 1
Independent Claim 118 words
A computer implemented method for executing a computer source program written using a GOTO procedural language in an object oriented environment that does not support GOTO control flows, the method comprising the steps of: selecting an object oriented framework having an execution granularity; transforming, based on said granularity, said source program written using said GOTO procedural language into a plurality of objects each having a plurality of attributes and one or more executable methods; creating instances of said objects; initiating object method execution by invoking a first method; and repeatedly executing object methods in response to each previous method execution until termination is indicated, wherein each method execution returns an indicator indicating which object method to next execute.
Claim 2
Dependent Claim 118 words
A computer implemented method for executing a computer source program written using a GOTO procedural language in an object oriented environment that does not support GOTO control flows, the method comprising the steps of: selecting an object oriented framework having an execution granularity; transforming, based on said granularity, said source program written using said GOTO procedural language into a plurality of objects each having a plurality of attributes and one or more executable methods; creating instances of said objects; initiating object method execution by invoking a first method; and repeatedly executing object methods in response to each previous method execution until termination is indicated, wherein each method execution returns an indicator indicating which object method to next execute.
Claim 3
Dependent Claim 59 words
The method of claim 1, wherein said object oriented framework includes an object for each of a plurality of procedural language statements, and wherein said transforming step comprises: selecting an object type matching each procedural language statements; and generating object initialization commands to create an instance of said selected object based on parameters of said each procedural language statement.
Claim 4
Dependent Claim 29 words
The method of claim 2, wherein said object instances are maintained in an indexed array of objects and wherein said returned indicator is an index to said indexed array.
Claim 5
Dependent Claim 16 words
The method of claim 2, wherein said returned indicator is the next object method to invoke.
Claim 6
Dependent Claim 20 words
The method of claim 2, wherein said instance creation occurs dynamically only when said object method is invoked for execution.
Claim 7
Dependent Claim 102 words
The method of claim 1, wherein said object oriented framework includes an object for each labeled paragraph of said procedural language program and wherein said transforming step comprises: generating object definition code for said labeled paragraph containing attributes indicative of said paragraph and at least one executable method having program logic to perform the function defined in said source program; initializing instances of labeled paragraph objects based on said object definition code; initiating execution of a first object method; executing object methods in response to each previously executed method, each executed method returning an indicator indicating a next labeled paragraph to execute.
Claim 8
Dependent Claim 81 words
The method of claim 1, wherein said object oriented framework contains a single object representing said source program, said single object having an executable method implementing the program logic of said source program; and wherein said transforming step comprises: generating object method logic based on said source program logic, wherein each statement of said source program logic becomes an indexed entry for an indexed branch instruction, and wherein control flow within said method is controlled by modifying a next index value.
Claim 9
Dependent Claim 87 words
The method of claim 1, wherein said object oriented framework contains a single object representing said source program, said single object having an executable method implementing the program logic of said source program; and wherein said transforming step comprises: generating object method logic based on said source program logic, wherein each block of said source program logic becomes a block of method code at an indexed entry for an indexed branch instruction, and wherein control flow within said method is controlled by modifying a next index value.
Claim 10
Dependent Claim 190 words
A computer program product having a computer readable medium having computer program logic recorded thereon for transforming procedural language source code having GOTO control flows into executable GOTO-less object oriented code, said computer program product comprising: computer readable program product means for causing a computer to select an object oriented framework having a transformation granularity; computer readable program product means for causing a computer to receive and parse each of a plurality of procedural language source code statements; computer readable program product means for causing a computer to generate object definition code, including attributes and method code, in response to said object oriented framework and said parsed plurality of procedural language source code statements; computer readable program product means for causing a computer to generate object initialization means in response to said object oriented framework and said parsed plurality of procedural language source code statements; computer readable program product means for causing a computer to initiate method execution by invoking a first method; computer readable program product means for causing a computer to invoke a next method :specified as a return from each executed method until the return is invalid.
Claim 11
Dependent Claim 190 words
A computer program product having a computer readable medium having computer program logic recorded thereon for transforming procedural language source code having GOTO control flows into executable GOTO-less object oriented code, said computer program product comprising: computer readable program product means for causing a computer to select an object oriented framework having a transformation granularity; computer readable program product means for causing a computer to receive and parse each of a plurality of procedural language source code statements; computer readable program product means for causing a computer to generate object definition code, including attributes and method code, in response to said object oriented framework and said parsed plurality of procedural language source code statements; computer readable program product means for causing a computer to generate object initialization means in response to said object oriented framework and said parsed plurality of procedural language source code statements; computer readable program product means for causing a computer to initiate method execution by invoking a first method; computer readable program product means for causing a computer to invoke a next method :specified as a return from each executed method until the return is invalid.
Claim 12
Dependent Claim 47 words
The computer program product means of claim 9, wherein said object definition code defines an object for each statement type in said source, and wherein each statement of said source code is transformed into an instance of a statement object having parameters based on said source code.
Claim 13
Dependent Claim 40 words
The computer program product means of claim 10, wherein said object definition code defines a single object for each program, and wherein said method code generated for said object method includes an indexed branch statement for controlling code logic flow.
Claim 14
Independent Claim 104 words
A system for generating executable object oriented code in response to a selected code granularity and a goto based source code program, the system comprising: memory means for storing code; memory means for storing an object structure representative of said selected code granularity; means for transforming based on said granularity said source program written using said GOTO procedural language into a plurality of objects each having a plurality of attributes and one or more executable methods and processor means for analyzing said goto based source code program and generating object oriented code definitions into said memory means in response to said selected code granularity.
Claim 15
Independent Claim 104 words
A system for generating executable object oriented code in response to a selected code granularity and a goto based source code program, the system comprising: memory means for storing code; memory means for storing an object structure representative of said selected code granularity; means for transforming based on said granularity said source program written using said GOTO procedural language into a plurality of objects each having a plurality of attributes and one or more executable methods and processor means for analyzing said goto based source code program and generating object oriented code definitions into said memory means in response to said selected code granularity.
Claim 16
Dependent Claim 30 words
The system of claim 12, wherein said selected code granularity causes transformation of each source code statement into an object instance having attributes based on said source code statement parameters.
Claim 17
Dependent Claim 28 words
The system of claim 13, further comprising: execution means for initializing and executing said object oriented code definitions causing creation of object instances and execution of object methods.
Claim 18
Dependent Claim 21 words
The system of claim 14, wherein each object is loaded into said memory means only when required for object method execution.
Claim 19
Dependent Claim 33 words
The system of claim 14 wherein said execution flow is controlled by each object method returning an index to a next executable statement in the order of the procedural source code control flow.
Claim 20
Dependent Claim 33 words
The system of claim 14, wherein said execution flow is controlled by each object method returning the next object method to be executed in the order of the procedural source code control flow.
Claim 21
Dependent Claim 19 words
The system of claim 12, wherein said selected granularity causes transformation of each labeled paragraph into a paragraph object.
Claim 22
Dependent Claim 19 words
The system of claim 18, wherein said transformation creates virtual paragraphs to represent entry points internal to a paragraph.
Claim 23
Dependent Claim 18 words
The system of claim 18, wherein said transformation implements entry points internal to a paragraph by double dispatching.

References Cited (Backward Citations)

US4860204A Cited
US5586330A Cited
US5446902A Cited
US5325533A Cited
US5379432A Cited
US5404529A Cited
US5455951A Cited
US5473777A Cited
US5475845A Cited
US5845299A Cited

USPTO Annuity & Maintenance Windows

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

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag