Machine-Based Code Normalization via SMT Solvers

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing software often includes inefficient or less-than-ideal code portions due to factors like time constraints, lack of knowledge about existing software, or platform-specific limitations, leading to suboptimal performance and security vulnerabilities.

Innovation Solution

The use of SMT solvers and canonical representations like Dependency Ordered Behavior (DOB) and Control Ordered Behavior (COB) to transform and regenerate code into language-agnostic forms, allowing for improved readability, performance, and security by removing platform-specific limitations, and enabling automatic conversion between different programming languages and platforms.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If programmers manually review and rewrite existing software to improve performance, then code quality and performance may be improved, but time requirements and development cost increase

Engineering Contradiction:
Improvecode qualityVSAvoidtime requirements
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs automatic code analysis and transformation without requiring manual programmer intervention. The processor automatically identifies inefficient code patterns, transforms them into optimized versions, and regenerates the source code, enabling the software to improve itself autonomously

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces the mechanical process of manual code review and rewriting with an automated computational system using SMT solvers and code transformation algorithms, substituting human effort with machine-based analysis and synthesis

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

2Reliability

If compilers and interpreters are used to convert source code to machine code, then many coding issues are negated, but not all performance and efficiency problems are resolved

Engineering Contradiction:
ImproveperformanceVSAvoidprocessing steps
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system performs code optimization transformations before compilation, pre-processing the source code to eliminate inefficiencies in the high-level language. This preliminary optimization addresses performance issues at the source code level, which then compile more efficiently to machine code

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary code transformation step between source code writing and compilation. This intermediate processing layer uses SMT solvers to analyze and transform code into optimized forms, bridging the gap between high-level programming and efficient machine execution

Inventive Principle:
Principle #24Intermediary (Mediator)

3Adaptability or versatility

If platform-specific code is used to meet language and platform requirements, then code functionality is achieved, but portability and adaptability to different platforms are limited

Engineering Contradiction:
ImproveportabilityVSAvoidplatform-specific limitations
Core Design Contradiction:
Adaptability or versatilityVSEase of manufacture

Solution Approach 1:

The system transforms platform-specific code into a universal intermediate representation that can be adapted to multiple target platforms. The SMT solver-based transformation analyzes platform-specific constructs and converts them into platform-agnostic code that maintains functionality across different operating systems and hardware architectures

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

Solution Approach 2:

Instead of writing code directly for specific platforms, the patent inverts the approach by first creating platform-agnostic optimized code and then generating platform-specific implementations from this universal form, reversing the traditional compilation paradigm

Inventive Principle:
Principle #13The other way round (Inversion)

4Productivity

If code is written quickly to meet time constraints, then development speed is maintained, but code inefficiencies and security vulnerabilities are introduced

Engineering Contradiction:
Improvedevelopment speedVSAvoidsecurity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The automated transformation system continuously analyzes and secures code without requiring manual security reviews. The processor automatically identifies security vulnerabilities and transforms code to eliminate risks, enabling rapid development with built-in security assurance

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system performs preliminary security hardening by transforming code to prevent potential vulnerabilities before they can be exploited. The SMT solver-based analysis proactively identifies and mitigates security risks in the transformed code, preventing future security issues

Inventive Principle:
Principle #9Preliminary anti-action

Data Source

PatentUS10521209B2Machine-based normalization of machine instructions
Publication Date: 2019.12.31 PHASE CHANGE SOFTWARE LLC
  • US10521209B2 patent drawing
  • US10521209B2 patent drawing
  • US10521209B2 patent drawing

AI summary

Computer source code maintenance represents a significant aspect of computer systems. Code that was developed for one platform, in one language, may require a significant investment in human effort to port such code to another platform or language. Converting source code to a language-agnostic source code allows a user to view the interaction of various portions of the source code in a unified view. Additionally, the language-agnostic source code may be automatically regenerated by a processor to a different platform or language. As a further benefit, documentation, standards-compliance, security, and/or other non-functional requirements may be provided to further enhance the utility of the original source code.