COBOL to C++ Translation Preserving Variable Names

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for translating COBOL source programs into modern programming languages like C or JAVA result in code that is difficult to read and maintain, due to differences in data types and memory formats, leading to obfuscated code that requires additional effort for debugging and maintenance.

Innovation Solution

A machine-implemented method that uses object-oriented programming features of C++ to translate COBOL programs into C++, maintaining readable and maintainable code by representing COBOL variables as objects, using descriptive text, and allocating memory in a format identical to the original COBOL program, allowing for mathematical operations and file descriptions in a COBOL-like syntax.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If COBOL programs are translated into modern programming languages like C or JAVA using traditional compilers, then the translation process can be completed, but the resulting code becomes difficult to read and maintain due to obfuscation of variable names and structural changes

Engineering Contradiction:
Improvelanguage compatibilityVSAvoidcode readability
Core Design Contradiction:
Adaptability or versatilityVSEase of operation

Solution Approach 1:

The patent introduces an intermediary translation process that uses COBOL-style comments and descriptors to bridge the gap between COBOL and modern languages. The translator generates C/C++ code that preserves COBOL variable names and structures through comment-based documentation, allowing the code to remain readable while being compatible with modern compilers and tools.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent creates a copy of the COBOL program structure in the translated code by preserving variable names, data type descriptors, and program logic in C/C++ syntax. This copying approach maintains the original COBOL semantics while enabling execution on modern systems, thus improving both adaptability and readability.

Inventive Principle:
Principle #26Copying

2Productivity

If traditional COBOL to C translation is performed, then the code can be compiled with modern compilers, but variable names and program structure become obfuscated requiring extra effort for debugging and maintenance

Engineering Contradiction:
Improvecompilation efficiencyVSAvoiddebugging and maintenance time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The translator acts as an intermediary that preserves COBOL variable names and program structure in the generated C/C++ code through comment-based documentation. This allows modern compilers to process the code efficiently while maintaining readability that reduces debugging and maintenance time.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent changes the translation parameters by preserving COBOL-specific data type descriptors and variable naming conventions in the translated code, rather than converting everything to standard C/C++ types and names. This parameter change maintains a direct correspondence between original and translated code, reducing maintenance overhead.

Inventive Principle:
Principle #35Parameter changes

3Adaptability or versatility

If COBOL programs are translated using prior art methods, then translation can be achieved, but code in the new language becomes difficult to understand and requires retaining copies of original source code for retranslation

Engineering Contradiction:
Improvelanguage portabilityVSAvoidtranslation process complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent copies the COBOL program structure, variable names, and logic directly into C/C++ code with minimal transformation. This copying strategy maintains simplicity by preserving the original program's organizational structure, reducing the complexity of the translation process while achieving language portability.

Inventive Principle:
Principle #26Copying

4Ease of manufacture

If direct translation of COBOL data types to C/C++ is performed, then the translation process is simplified, but compatibility issues arise due to differences in memory formats and data type representations

Engineering Contradiction:
Improvetranslation process simplicityVSAvoiddata compatibility
Core Design Contradiction:
Ease of manufactureVSReliability

Solution Approach 1:

The patent changes the approach to data type translation by preserving COBOL data type descriptors in comments and using them to guide the translation process. This maintains parameter compatibility between COBOL and C/C++ representations while keeping the translation process simple and systematic.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The translator serves as an intermediary that mediates between COBOL and C/C++ data type systems by preserving COBOL data type descriptors in the translated code. This intermediary approach ensures data compatibility is maintained through explicit type information while allowing the translation process to proceed systematically.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentEP2463771B1Method for translating a cobol source program into readable and maintainable program code in an object oriented second programming language
Publication Date: 2021.02.03 BULL HN INFORMATION SYST INC
  • EP2463771B1 patent drawingFigure 1
  • EP2463771B1 patent drawingFigure 2
  • EP2463771B1 patent drawingFigure 3

AI summary

A method is disclosed for translating by a computer system of a COBOL computer program into a translated computer program that is in a readable and maintainable syntax in an object oriented programming language. The translated program including variable names equivalent to the original COBOL variable names and with attributes described in COBOL syntax. The translating method further providing for memory allocation in the translated computer program for the storage of "COBOL" variables that is compatible with that of the original COBOL program; a description of program flow that is readable, and utilizing arithmetic operators in the translated program to describe operations between Cobol variables. Also disclosed is a special object oriented run-time library for creating and performing operations between COBOL numeric objects, including maintaining storage of variable content in the original COBOL format, and for enabling readability of calling source code by allowing arguments for variable type descriptions to be expressed in COBOL syntax.