Automatic Source Code Generation via Variable Element Profiling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The generation of source code is a time-consuming process, as developers must manually test and modify code for different contexts, which is inefficient and labor-intensive, especially when using integrated development environments (IDEs) that lack easy customization options.

Innovation Solution

A system that automatically generates source code by analyzing an existing code base, identifying variable elements, and using user-defined values to create profiles that include methods and rules to produce customized source code statements for different contexts, reducing the need for manual rewriting and debugging.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If developers manually create and test source code for different contexts, then code reliability is improved, but development time and effort increase significantly

Engineering Contradiction:
Improvecode reliabilityVSAvoiddevelopment time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary analysis of the existing code base to identify variable code elements and their relationships before actual code generation. By pre-processing the code base and creating a structured representation, the system prepares necessary information in advance, enabling rapid generation of reliable code for different contexts without manual rewriting and testing

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system automatically generates source code by copying and adapting templates from the existing code base. Instead of manually creating code from scratch for each context, the system replicates proven code patterns and structures, substituting variable elements automatically. This copying approach ensures code reliability by reusing validated patterns while dramatically reducing development time

Inventive Principle:
Principle #26Copying

2Adaptability or versatility

If developers manually customize source code for different contexts, then code adaptability is improved, but productivity decreases

Engineering Contradiction:
Improvecode adaptabilityVSAvoiddevelopment productivity
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The system achieves code adaptability by identifying and changing parameters (variable code elements) within a standardized code structure. Instead of manually customizing entire code blocks for different contexts, the system automatically substitutes variable elements such as class names, method names, and data types while maintaining the underlying code structure. This parameter-based adaptation enables high versatility with minimal manual intervention, significantly improving productivity

Inventive Principle:
Principle #35Parameter changes

3Ease of operation

If IDEs provide comprehensive development tools, then ease of operation is improved, but customization capability remains limited

Engineering Contradiction:
Improveease of operationVSAvoidcustomization capability
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The system provides a universal code generation framework that can handle multiple programming languages and different code contexts through a single unified interface. The code base analysis and template-based generation mechanisms are language-agnostic, allowing the same system to generate code for various contexts without requiring separate tools. This multi-functionality enhances both ease of operation and customization capability simultaneously

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

Data Source

PatentEP3008585B1Automatic source code generation
Publication Date: 2021.12.08 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP3008585B1 patent drawingFigure 1
  • EP3008585B1 patent drawingFigure 2
  • EP3008585B1 patent drawingFigure 3

AI summary

Source code statements are automatically generated from a profile including variable code elements and methods. The profile is built from an existing code base that has identified variable code elements that differ when used in different versions of the source code statements. A developer may define values for the variable code elements which are then used by the methods in the profile to automatically generate corresponding source code statements.