Automated Code Substitution via Equivalence Checking

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing software development practices often result in inefficient code due to the lack of optimization beyond functional equivalence, leading to suboptimal performance, storage, and power consumption, particularly in mobile computing where resources are limited, and reusability is rarely deployed effectively.

Innovation Solution

The use of SMT solvers and automated theorem provers to determine functional equivalence between candidate and preferred source code, allowing for the substitution of preferred functions to improve storage efficiency, execution performance, readability, and security, while ensuring functional equivalence.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If programmers manually write and review software code, then functional requirements are met, but code efficiency, performance, and resource optimization deteriorate due to lack of systematic optimization

Engineering Contradiction:
Improvefunctional equivalenceVSAvoidcode efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system enables software to automatically optimize itself by comparing candidate code against preferred code and automatically substituting optimized versions, eliminating the need for continuous manual code review and optimization

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

Manual code review and optimization processes are replaced by an automated machine-based system that uses equivalence checking to identify and substitute optimized code, transforming a manual mechanical process into an automated computational one

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Reliability

If compilers and interpreters are used to convert source code to machine code, then basic coding issues are negated, but performance differences due to coding techniques remain unresolved

Engineering Contradiction:
Improvefunctional correctnessVSAvoidexecution performance
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The system performs preliminary optimization by identifying and substituting preferred coding techniques before compilation, such as optimizing array traversal order and sorting methodology selection, so that the compiled code inherently has better performance characteristics

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system changes coding parameters and techniques (e.g., array traversal direction, sorting algorithm selection) while maintaining functional equivalence, thereby improving execution performance without altering the program's output

Inventive Principle:
Principle #35Parameter changes

3Adaptability or versatility

If multiple coding techniques are used to achieve the same function, then functional flexibility is maintained, but code quality and resource usage deteriorate due to lack of standardized optimization

Engineering Contradiction:
Improvefunctional flexibilityVSAvoidresource consumption
Core Design Contradiction:
Adaptability or versatilityVSLoss of energy

Solution Approach 1:

The system creates a universal preferred code repository that can be applied across multiple contexts and functions, allowing the same optimization patterns to be reused throughout the codebase, reducing resource consumption while maintaining functional flexibility

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

Solution Approach 2:

The system copies proven preferred code patterns from the repository into candidate code locations where they improve resource efficiency, allowing systematic propagation of optimized coding techniques without manual intervention

Inventive Principle:
Principle #26Copying

Data Source

PatentUS10877748B2Machine-based instruction editing
Publication Date: 2020.12.29 PHASE CHANGE SOFTWARE LLC
  • US10877748B2 patent drawing
  • US10877748B2 patent drawing
  • US10877748B2 patent drawing

AI summary

Computer software development has produced many advances within computer science and in most aspects of modern society. Even with modern quality control, bug finding, and other code checking applications, computer software is often less than ideal. A developer may write code that is functionally accurate but lacks security, documentation, speed, storage, reusability, or other element that may make a segment of software code less than ideal. Identifying equivalent code and, when found, replacing it with a vetted equivalent promotes the deployment of software that is more robust, secure, usable and reusable, and/or satisfies performance or other objectives.