IP Library Granted Patent US 8,645,932
Granted Patent B2
US 8,645,932 · App. 13/236,574 · Granted Feb 4, 2014

Control flow analysis methods and computing devices for converting COBOL-sourced programs to object-oriented program structures

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,645,932
App. No.
13/236,574
Granted
Feb 4, 2014
Kind
B2
Abstract

The various embodiments of the invention relate generally to computer software, computer program architecture, software development, and computer programming languages, and more specifically, to techniques for analyzing control flow in COBOL-sourced programs to facilitate optimized conversions to object-oriented program structures. For example, a compiler can include a global optimizer configured to analyze execution flow for a range of blocks of source code in the memory to determine flow-affected code. Also, the compiler can include a native code generator configured to generate native code based on representations of the native code as functions of the source code. The native code is configured to execute on a virtual machine.

Claims (73)

1. A method, executed by a computer, comprising:

identifying one or more regions of COBOL source code having an entry point;

selecting a PERFORM instruction associated with the entry point to analyze;

determining a PERFORM range for the selected PERFORM instruction;

identifying an instruction that changes control flow in execution of the COBOL source code subsequent to the selected PERFORM instruction;

determining flow-affected code resulting from the instruction;

determining reachable regions from the one or more regions of the COBOL source code for the selected PERFORM instruction; and

forming an adjusted PERFORM range for the selected PERFORM instruction based on the determined reachable regions.

2. The method of claim 1 further comprising:

decomposing the adjusted PERFORM range into adjusted PERFORM range portions; and

generating methods operable in a native programming language for execution by a virtual machine, wherein the methods are formed from the adjusted PERFORM range portions.

3. The method of claim 1 wherein forming the adjusted PERFORM range comprises:

determining if the flow-affected code is unreachable code; and

omitting a portion of the PERFORM range including the flow-affected code.

4. The method of claim 3 further comprising:

converting the determined reachable regions from the one or more regions of the COBOL source code into a native code of another programming language without compiling source code for the another programming language.

5. The method of claim 1 further comprising:

identifying the instruction as a non-returning instruction; and

determining that the flow-affected code includes a subset of regions in the one or more regions of the COBOL source code that are reachable by the non-returning instruction.

6. The method of claim 5 wherein determining the flow-affected code resulting from the instruction comprises:

determining unreachable code.

7. The method of claim 5 wherein identifying the instruction as the non-returning instruction comprises:

identifying the instruction as one of a subset of non-returning instructions,

wherein the instruction is a GOTO COBOL-based instruction.

8. The method of claim 1 further comprising:

identifying the instruction as a unreturnable instruction; and

determining that the flow-affected code is in a region from which execution of the selected PERFORM instruction does not trickle through an intermediate portion of the PERFORM range to a subsequent PERFORM instruction.

9. The method of claim 8 further comprising:

detecting whether the intermediate portion of the PERFORM range is a target of a change in control flow; and

including the intermediate portion of the PERFORM range from reachable regions if the intermediate portion of the PERFORM range is the target of the change in control flow, otherwise excluding the intermediate portion of the PERFORM range from the reachable regions.

10. The method of claim 1 further comprising:

determining that the flow-affected code is an overlap in the COBOL source code; and

resolving the overlap.

11. The method of claim 10 wherein resolving the overlap comprises:

cloning a portion of the COBOL source code in the overlap to form a cloned portion of the COBOL source code; and

creating independent PERFORM ranges, wherein each of the independent PERFORM ranges includes the cloned portion of the COBOL source code.

12. The method of claim 1 further comprising:

creating independent PERFORM ranges; and

sizing one or more of the independent PERFORM ranges to comport with a range of a method that includes executable byte code for a native programming language.

13. The method of claim 12 wherein the native programming language comprises an object-oriented programming language.

14. A system comprising:

a processor; and

a memory, wherein the memory stores a compiler, and wherein the compiler comprises:

a global optimizer configured to analyze execution flow for a range of blocks of source code in the memory to determine flow-affected code; and

a native code generator configured to generate native code based on representations of the native code as functions of source code, wherein the native code generator is further configured to optimize the flow-affected code by resolving overlapping PERFORM ranges, wherein the native is configured to be executed on a virtual machine, wherein the source code includes instructions in COBOL programming language, and wherein the overlapping PERFORM ranges are detected by:

identifying one or more regions of COBOL source code having an entry point;

selecting a PERFORM instruction associated with the entry point to analyze;

determining a PERFORM range for the selected PERFORM instruction;

identifying an instruction that changes control flow in execution of the COBOL source code subsequent to the selected PERFORM instruction;

determining flow-affected code resulting from the instruction;

determining reachable regions from the one or more regions of the COBOL source code for the selected PERFORM instruction; and

forming an adjusted PERFORM range for the selected PERFORM instruction based on the determined reachable regions.

15. The system of claim 14 wherein the native code is byte code.

16. The system of claim 14 further comprising:

a region identifier configured to identify one or more regions of COBOL source code associated with a returnable flow transfer instruction.

17. The system of claim 16 wherein the region identifier is further configured to identify a region as being delimited between an entry point and a target point.

18. The system of claim 14 wherein the native code generator is further configured to optimize the flow-affected code by omitting the flow-affected code.

19. A computer program product embodied in a non-transitory computer readable medium and comprising computer instructions configured to:

identify one or more regions of COBOL source code having an entry point;

select a PERFORM instruction associated with the entry point to analyze;

determine a PERFORM range for the selected PERFORM instruction;

identify an instruction that changes control flow in execution of the COBOL source code subsequent to the selected PERFORM instruction;

determine flow-affected code resulting from the instruction;

determine reachable regions from the one or more regions of the COBOL source code for the selected PERFORM instruction; and

form an adjusted PERFORM range for the selected PERFORM instruction based on the determined reachable regions.

20. The computer program product of claim 19 further comprising computer instructions configured to:

decompose the adjusted PERFORM range into adjusted PERFORM range portions; and

generate methods operable in a native programming language for execution by a virtual machine, wherein the methods are formed from the adjusted PERFORM range portions.

21. The computer program product of claim 19 wherein forming the adjusted PERFORM range comprises computer instructions configured to:

determine if the flow-affected code is unreachable code; and

omit a portion of the PERFORM range including the flow-affected code.

22. The computer program product of claim 21 further comprising computer instructions configured to:

convert the determined reachable regions from the one or more regions of the COBOL source code into a native code of another programming language without compiling source code for the another programming language.

Assignments (7)
RELEASE OF SECURITY INTEREST REEL/FRAME 044183/0718 Recorded Feb 2, 2023
From: JPMORGAN CHASE BANK, N.A.
To: MICRO FOCUS LLC (F/K/A ENTIT SOFTWARE LLC); BORLAND SOFTWARE CORPORATION; MICRO FOCUS (US), INC.; SERENA SOFTWARE, INC; ATTACHMATE CORPORATION; MICRO FOCUS SOFTWARE INC. (F/K/A NOVELL, INC.); NETIQ CORPORATION
Reel/Frame 062746/0399 →
RELEASE OF SECURITY INTEREST REEL/FRAME 035656/0251 Recorded Feb 2, 2023
From: JPMORGAN CHASE BANK, N.A.
To: BORLAND SOFTWARE CORPORATION; ATTACHMATE CORPORATION; NETIQ CORPORATION; MICRO FOCUS (US), INC.; MICRO FOCUS SOFTWARE INC. (F/K/A NOVELL, INC.)
Reel/Frame 062623/0009 →
CORRECTIVE ASSIGNMENT TO CORRECT THE TO CORRECT TYPO IN APPLICATION NUMBER 10708121 WHICH SHOULD BE 10708021 PREVIOUSLY RECORDED ON REEL 042388 FRAME 0386. ASSIGNOR(S) HEREBY CONFIRMS THE NOTICE OF SUCCESSION OF AGENCY. Recorded Jul 26, 2018
From: BANK OF AMERICA, N.A., AS PRIOR AGENT
To: JPMORGAN CHASE BANK, N.A., AS SUCCESSOR AGENT
Reel/Frame 048793/0832 →
SECURITY INTEREST Recorded Oct 11, 2017
From: ATTACHMATE CORPORATION; BORLAND SOFTWARE CORPORATION; NETIQ CORPORATION; MICRO FOCUS (US), INC.; MICRO FOCUS SOFTWARE, INC.; ENTIT SOFTWARE LLC; ARCSIGHT, LLC; SERENA SOFTWARE, INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 044183/0718 →
NOTICE OF SUCCESSION OF AGENCY Recorded May 2, 2017
From: BANK OF AMERICA, N.A., AS PRIOR AGENT
To: JPMORGAN CHASE BANK, N.A., AS SUCCESSOR AGENT
Reel/Frame 042388/0386 →
SECURITY INTEREST Recorded May 13, 2015
From: MICRO FOCUS (US), INC.; BORLAND SOFTWARE CORPORATION; ATTACHMATE CORPORATION; NETIQ CORPORATION; NOVELL, INC.
To: BANK OF AMERICA, N.A.
Reel/Frame 035656/0251 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 29, 2011
From: WRIGHT, JEREMY; SALES, ROBERT
To: MICRO FOCUS (US), INC.
Reel/Frame 027459/0816 →