Automated Inter-Language Interface Generation for Legacy Code

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for allowing newer programming languages to access functions from legacy languages are labor-intensive and require significant manual effort, as they often necessitate rewriting legacy files or creating language-specific interfaces, which is inefficient and time-consuming.

Innovation Solution

An automated inter-language interface generation method that marks legacy file headers to define function exposure and parameter usage in an object-oriented architecture, allowing for the creation of a wrapper that enables access to legacy files from multiple target languages without manual wrapping, using a graphical user interface for input and generating documentation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Extent of automation

If an interface generation application like SWIG is used to automatically generate wrapper functions, then interface generation is automated, but the generated code is difficult for developers to use and requires substantial manual hand-wrapping effort

Engineering Contradiction:
Improveinterface generation automationVSAvoiddeveloper usability
Core Design Contradiction:
Extent of automationVSEase of operation

Solution Approach 1:

The patent introduces an intermediary processing layer that automatically generates both the wrapper functions and the corresponding interface documentation in a coordinated manner. This mediator system translates between the legacy language interface and target language requirements, producing ready-to-use code without requiring manual hand-wrapping, thus resolving the contradiction between automation and usability

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent segments the interface generation process into distinct, automated components: header analysis, wrapper function generation, and documentation generation. Each component handles a specific aspect of the translation process, allowing the system to produce complete, usable interfaces automatically without requiring developer intervention for hand-wrapping

Inventive Principle:
Principle #1Segmentation

2Adaptability or versatility

If legacy executable files are rewritten in newer languages to provide the same functions, then language compatibility is improved, but significant time and expense are required for recreation and validation

Engineering Contradiction:
Improvelanguage compatibilityVSAvoidrecreation and validation time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent creates a virtual copy of the legacy language interface through automatically generated wrapper functions that replicate the original functionality in the target language. This copying approach preserves the original legacy code unchanged while providing language-compatible access points, eliminating the time-consuming process of rewriting and validating legacy functions in new languages

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent performs preliminary analysis of the legacy language header files to automatically generate the necessary wrapper functions and interface definitions before any target language implementation. This preliminary action establishes the compatibility layer in advance, preventing the need for time-consuming recreation and validation of legacy functions

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If language-specific interface generation applications are used (e.g., Boost for Python, JNI for Java), then access to legacy files is enabled for specific target languages, but a different interface must be generated for each target language

Engineering Contradiction:
Improvetarget language supportVSAvoidinterface generation complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent creates a universal interface generation system that can generate wrappers for multiple target languages from a single legacy language header file. This multi-functional system eliminates the need for separate language-specific tools by implementing a general-purpose generator that adapts to different target languages through configuration, reducing the complexity of generating multiple language-specific interfaces

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS8533689B2Method, apparatus and computer program product for creating inter-language interface
Publication Date: 2013.09.10 THE BOEING CO
  • US8533689B2 patent drawing
  • US8533689B2 patent drawing
  • US8533689B2 patent drawing

AI summary

An inter-language interface is created for an executable file written in a legacy language. The header associated with the legacy file is initially marked up language to generate a first marked header. The legacy file is then wrapped with a first wrapper based at least partially upon the first marked header to create a first wrapped file. Additionally, the first marked header is associated with type maps customized in accordance with the target language in order to generate a second marked header. An executable file may then be generated by wrapping the first wrapped file with a second wrapper so as to be executable in the target language, thereby creating a second wrapped file. Additionally, an interface layer is generated to associate functions in the legacy language with methods in the target language and to define the usage in the target language of the parameters in the legacy language.