Multi-Language Static Analysis for Embedded Systems
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current software development methods are expensive and time-consuming due to the challenges of detecting bugs in source code, particularly in embedded systems where multiple programming languages are used, leading to incomplete analysis and increased costs.
Innovation Solution
A method for performing static analysis by transforming embedded low-level language source code into a combined high-level representation, allowing for coherent analysis with high-level language source code, which includes identifying and translating low-level instructions to represent their effects, enabling comprehensive analysis without retaining full semantics.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If separate analysis is performed for high-level and low-level languages, then language-specific analysis depth is improved, but overall analysis completeness deteriorates due to inability to detect interactions between languages
Solution Approach 1:
The patent merges separate high-level and low-level language analyses into a unified analysis framework. The static analysis tool integrates both language layers, allowing simultaneous detection of bugs in C/C++ code and embedded assembly instructions, thereby achieving both language-specific depth and overall completeness.
Solution Approach 2:
The patent introduces an intermediary representation layer that translates low-level assembly instructions into an intermediate format compatible with high-level language analysis. This mediator enables the analysis tool to process both language levels coherently without requiring complete semantic equivalence between them.
2Measurement precision
If full semantics of low-level language are retained during transformation, then analysis accuracy is improved, but analysis complexity and processing time increase
Solution Approach 1:
The patent applies partial transformation of low-level language semantics rather than complete retention. Only the essential semantic information needed for bug detection is transformed and retained, while unnecessary detailed semantics are discarded. This selective approach maintains analysis accuracy for critical bug detection while significantly reducing processing complexity.
Solution Approach 2:
The patent extracts only the necessary semantic information from low-level assembly instructions for the purpose of static analysis. By taking out only the essential semantics required for detecting bugs, the system avoids the complexity of processing complete low-level semantics while maintaining sufficient accuracy for reliable analysis.
3Adaptability or versatility
If multiple programming languages are used in embedded systems, then hardware access capability is improved, but code analysis difficulty increases due to language interaction complexity
Solution Approach 1:
The patent creates a universal analysis framework that handles multiple programming languages (C/C++ and assembly) within a single integrated tool. This multi-functional approach allows the same analysis system to process different language types and detect bugs across language boundaries, eliminating the need for separate analysis tools for each language.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The invention concerns a method, a computer, and software for analysis of software code that includes code written in multiple languages. A static analysis on source code of an embedded system that has source code written in a low-level language embedded within a high level language is accompanied by transforming the embedded low level language source code to a common high level representation for performing the static analysis. This transformation only retains sufficient semantic meaning of the low level source code necessary to perform the static analysis.