Instrumentation Code Injection for Dynamic Program Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Dynamic program analysis of tabular data-based software faces challenges when external resources like tabular datasets are unavailable, leading to multiple errors and disrupting program execution, as existing methods lack the ability to generate synthetic values that are not related to the external resource metadata.

Innovation Solution

The solution involves injecting instrumentation code into the software program to capture attribute accesses and method calls, generating mock objects to continue execution, and using conversion methods to provide synthetic values, allowing the program to execute even when external resources are unavailable by creating synthetic data structures and redirecting method calls.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If dynamic program analysis is performed on tabular data-based software, then program behavior monitoring is improved, but execution fails when external resources like tabular datasets are unavailable

Engineering Contradiction:
Improveprogram execution reliabilityVSAvoidadaptability to unavailable external resources
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent creates mock objects that copy the structure and interface of external tabular data resources. These mock objects contain synthetic data that mimics the format and characteristics of real external datasets, allowing the program to execute and be analyzed even when the actual external resources are unavailable. The mock objects serve as substitutes that maintain program functionality during dynamic analysis.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent introduces an intermediary layer between the program and external resources. This intermediary captures attribute accesses and method calls, converts them to work with mock objects containing synthetic data, and returns results that allow program execution to continue. This mediator enables dynamic program analysis without requiring actual external tabular datasets.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Extent of automation

If instrumentation code is injected to capture attribute accesses and method calls, then program analysis capability is improved, but system complexity increases

Engineering Contradiction:
Improveautomatic program analysisVSAvoidsystem complexity
Core Design Contradiction:
Extent of automationVSDevice complexity

Solution Approach 1:

The instrumentation code is automatically injected and configured through the system itself without requiring manual intervention. The mock objects are automatically created with synthetic data that matches the program's data requirements. The conversion process is automated, transforming attribute accesses and method calls into operations on mock objects seamlessly, reducing the perceived complexity for users.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The instrumentation system is designed to be universal, working with various types of tabular data-based programs without requiring program-specific customization. The mock object creation and data conversion mechanisms are general-purpose, handling different data structures and access patterns through a unified approach, thereby managing complexity through standardization.

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

3Duration of action of stationary object

If mock objects with synthetic data are generated, then program execution continuity is improved, but data accuracy may be compromised

Engineering Contradiction:
Improveprogram execution durationVSAvoiddata accuracy
Core Design Contradiction:
Duration of action of stationary objectVSMeasurement precision

Solution Approach 1:

The patent prepares mock objects with synthetic data in advance to cushion against the unavailability of external resources. This pre-prepared synthetic data allows the program to execute continuously without interruption, even though the data is not from actual external sources. The cushioning effect ensures execution continuity while acknowledging the trade-off in data authenticity.

Inventive Principle:
Principle #11Beforehand cushioning (Prior cushioning)

Solution Approach 2:

The system applies partial action by using synthetic data only for portions of the program execution where external resources are unavailable. When external resources are available, the system can switch to using real data. This partial approach maintains execution continuity while minimizing the impact on data accuracy for critical analysis portions.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS12038825B2Partial program execution with attribute-based data conversion for dynamic program analysis
Publication Date: 2024.07.16 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US12038825B2 patent drawing
  • US12038825B2 patent drawing
  • US12038825B2 patent drawing

AI summary

The embodiment may include a computing device that identifies a software code. The embodiment may determine an attribute access and a method call. The embodiment may inject instrumentation code to the software code to capture the attribute access and the method call. The embodiment may convert an attribute into a value using a conversion method based on determining, during an execution of the software code, that the attribute access failed. The embodiment may create a mock object and uses the mock object as a result of the method call to continue execution of the software code based on determining, during the execution of the software code, that the method call failed.