Generative AI Code Analysis for Legacy Software Conversion

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Legacy computer software systems often lack adequate documentation, making it difficult and costly for developers to update or optimize them, and transitioning to modern environments introduces challenges like compatibility, performance optimization, and security vulnerabilities.

Innovation Solution

A Generative AI system is used to analyze and enhance computer code by generating a relational representation of the code, which exposes its structural and functional relationships, facilitating understanding and enabling conversion to a different programming language while preserving functionality.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If developers manually analyze legacy code to understand its structure and functionality, then code comprehension accuracy is improved, but time consumption and labor costs increase significantly

Engineering Contradiction:
Improvecode comprehension accuracyVSAvoidtime consumption
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent introduces an intermediary system consisting of code analysis tools and AI models that act as a mediator between the legacy code and developers. This intermediary automatically performs static analysis, generates code documentation, and explains code functionality, thereby reducing the time developers need to spend on manual code comprehension while maintaining high accuracy through multiple analysis layers including syntax parsing, semantic analysis, and AI-based interpretation.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If comprehensive code analysis is performed to ensure understanding of legacy systems, then code modification reliability is improved, but processing complexity increases

Engineering Contradiction:
Improvecode modification reliabilityVSAvoidprocessing complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the code analysis process into multiple independent modules: syntax analysis module, semantic analysis module, dependency analysis module, and AI-based comprehension module. Each module handles a specific aspect of code analysis separately, processing different dimensions of code understanding independently. This segmentation reduces processing complexity by breaking down the overwhelming task of comprehensive analysis into manageable, specialized components that can be executed in sequence or parallel.

Inventive Principle:
Principle #1Segmentation

3Adaptability or versatility

If legacy code is converted to modern programming languages, then system adaptability and performance are improved, but risk of functionality loss increases

Engineering Contradiction:
Improvesystem adaptabilityVSAvoidfunctionality preservation
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent implements a feedback mechanism where an AI model analyzes the original legacy code, generates the converted code in modern programming languages, and then re-analyzes the converted code to verify functionality preservation. The system compares the behavioral characteristics, input-output relationships, and logical structures of both codes, providing feedback for iterative refinement. This closed-loop feedback process ensures that the converted code maintains the original functionality while achieving improved adaptability to modern environments.

Inventive Principle:
Principle #23Feedback

4Ease of operation

If detailed documentation is created for legacy code, then future maintenance ease is improved, but initial development time and costs increase

Engineering Contradiction:
Improvemaintenance easeVSAvoiddocumentation time
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The patent enables legacy code to generate its own documentation automatically through self-service mechanisms. The system performs automated static analysis, code parsing, and semantic understanding to generate comprehensive documentation including architecture diagrams, function descriptions, dependency maps, and maintenance guidelines directly from the code itself. This eliminates the need for separate manual documentation efforts, as the code serves its own documentation needs through automated analysis and generation processes.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS20250265060A1Method and apparatus for computer code analysis using generative ai system
Publication Date: 2025.08.21 PRICEWATERHOUSECOOPERS LLP
  • US20250265060A1 patent drawing
  • US20250265060A1 patent drawing
  • US20250265060A1 patent drawing

AI summary

A computer system comprising one or computers and one or more data storage devices storing instructions, which when executed by the one or more computers implements a computer code conversion utility, comprising: Graphical User Interface (GUI) manager; a prompt manager; a Generative AI service interface; the GUI manager being configured to implement a GUI for receiving an input, including a first computer code; the prompt manager configured to generate in response to the input a first Generative AI service prompt with instructions to derive from the first computer code a relational representation of the first computer code; the prompt manager configured to generate a second Generative AI service prompt conveying the relational representation or a derivative form of the relational representation and the first computer code with instructions to convert the first computer code to a second computer code where the second computer code retains an overall functionality of the first computer code; the Generative AI service interface configured to receive the second computer code.