Assembly Code Attribution via Internal Representation Parsing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods fail to automatically correlate high-level source code constructs such as template declarations, inline functions, and preprocessor macros with their low-level assembly language code counterparts, leading to difficulties in debugging and optimization processes.

Innovation Solution

A computer-implemented method that generates an internal representation of assembly language code by parsing and categorizing low-level constructs with generic tokens, using pattern matching to associate high-level source code metadata with low-level assembly code, and producing report files for improved attribution and test coverage metrics.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If high-level language code is compiled into low-level assembly language code, then the code can be executed on specific machine architecture, but the correlation between high-level source code and low-level assembly code is lost

Engineering Contradiction:
Improvecode execution reliabilityVSAvoidsource code correlation information
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The system performs preliminary actions by intercepting compiler and assembler commands before the compilation and assembly process completes. It proactively generates internal representations of both high-level source code and low-level assembly code during the compilation process, establishing the correlation mapping before the information loss becomes irreversible. This allows the system to preserve source code attribution information that would otherwise be lost during the normal compilation workflow.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system introduces an intermediary component that sits between the compiler/assembler and the final compiled output. This intermediary intercepts commands, generates internal representations, and maintains the correlation mapping between high-level source code and low-level assembly code. The intermediary preserves the connection information through the compilation process without interfering with the actual code generation, enabling later retrieval and analysis of source code attribution.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If template declarations, inline functions, and preprocessor macros are compiled, then the code can be optimized and executed efficiently, but the instantiation details are embedded in assembly code with no correlation back to source

Engineering Contradiction:
Improvecode compilation and execution efficiencyVSAvoidtemplate instantiation correlation
Core Design Contradiction:
ProductivityVSDifficulty of detecting and measuring

Solution Approach 1:

The system performs preliminary actions by intercepting compiler commands during the compilation process, before template instantiations, inline function expansions, and macro substitutions are completed. It generates internal representations that capture both the high-level source code structure and the low-level assembly code, establishing the correlation mapping while the connection information is still available. This allows the system to preserve attribution information for complex constructs that would otherwise lose their source correlation during optimization.

Inventive Principle:
Principle #10Preliminary action

3Loss of information

If ad-hoc techniques are used to correlate assembly code with source code, then some correlation can be achieved, but the process is manual and inconsistent

Engineering Contradiction:
Improvesource code correlationVSAvoidcorrelation process complexity
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The system enables self-service by automatically intercepting compiler and assembler commands, generating internal representations, and creating the correlation mapping between high-level source code and low-level assembly code without requiring manual intervention. The automated command interception and internal representation generation eliminate the need for complex ad-hoc correlation techniques, providing consistent and reliable source code attribution through an autonomous process that integrates seamlessly with the existing compilation workflow.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10248545B2Method for tracking high-level source attribution of generated assembly language code
Publication Date: 2019.04.02 PARASOFT CORP
  • US10248545B2 patent drawing
  • US10248545B2 patent drawing
  • US10248545B2 patent drawing

AI summary

A method for tracking high-level source attribution of a generated assembly language code includes: receiving commands for compiling or linking a high-level language code; analyzing the received commands to determine whether a command is a compiler command for compiling the high-level language code or a link command for linking the low level object code; when the command is a compiler command: generating assembly language code by compiling the high-level language code, parsing the generated assembly language code to generate an internal representation for the assembly language code, storing the internal representation in a computer memory; and generating associated linker input artifacts for linking; when the command is a link command: updating the internal representation with the associated linker input artifacts; and generating a report file from the updated internal representation.