Program Code Simulator Using Surrogate Objects for Unavailable Dependencies

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Software developers face challenges in understanding and debugging complex computer programs, especially when dependencies such as constructors, methods, or objects are unavailable, as existing tools struggle to simulate program execution effectively in these scenarios.

Innovation Solution

A system and method that generate a program representation, perform simulated execution, and create visualizations of control flow by using heuristics to determine control flow for conditional branches and loops, and create imaginary objects as surrogates for unavailable dependencies, allowing for the simulation of method invocations and object instantiations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If simulated execution is performed without available dependencies, then program analysis capability is improved, but execution accuracy deteriorates

Engineering Contradiction:
Improveprogram analysis capabilityVSAvoidexecution accuracy
Core Design Contradiction:
Adaptability or versatilityVSMeasurement precision

Solution Approach 1:

The patent introduces an intermediary mechanism that creates surrogate objects to represent unavailable dependencies. When a dependency (constructor, method, or object) is unavailable, the system generates a surrogate object that mimics the expected interface and behavior, allowing the simulation to continue without requiring the actual dependency to be present. This mediator enables the analysis tool to operate in environments where full execution context is missing.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent implements copying by creating surrogate objects that replicate the structural and behavioral characteristics of unavailable dependencies. These surrogates copy the essential interface definitions, parameter signatures, and return type information of the original dependencies, allowing the simulation to proceed with fabricated representations that maintain analytical validity without requiring access to the actual unavailable components.

Inventive Principle:
Principle #26Copying

2Adaptability or versatility

If control flow is determined using heuristics, then simulation capability is improved, but analysis precision deteriorates

Engineering Contradiction:
Improvesimulation capabilityVSAvoidcontrol flow determination accuracy
Core Design Contradiction:
Adaptability or versatilityVSMeasurement precision

Solution Approach 1:

The patent implements self-service by enabling the simulation system to automatically determine control flow using built-in heuristics without requiring external intervention or manual configuration. When encountering conditional branches or loops with unavailable dependencies, the system autonomously applies predefined rules (such as assuming true conditions for branches or single iteration for loops) to progress the simulation, reducing the need for user input while maintaining reasonable analysis accuracy.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent applies parameter changes by modifying simulation parameters dynamically based on dependency availability. When a dependency is unavailable, the system changes execution parameters (such as assuming specific branch outcomes or limiting loop iterations) to enable simulation continuation. This adaptive parameter adjustment allows the same simulation framework to handle both complete and partial dependency scenarios without requiring separate analysis modes.

Inventive Principle:
Principle #35Parameter changes

3Stability of the object's composition

If imaginary objects are created as surrogates, then simulation continuity is improved, but object representation accuracy deteriorates

Engineering Contradiction:
Improvesimulation continuityVSAvoidobject representation accuracy
Core Design Contradiction:
Stability of the object's compositionVSMeasurement precision

Solution Approach 1:

The patent applies partial action by creating surrogate objects that implement only the essential characteristics needed for simulation continuity, rather than attempting to replicate all aspects of unavailable dependencies. The surrogates provide sufficient structural and behavioral information to maintain simulation flow (such as interface compatibility and basic method signatures) without requiring complete accuracy in representing the original unavailable objects, allowing the system to balance simulation stability with representation fidelity.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS8949103B2Program code simulator
Publication Date: 2015.02.03 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8949103B2 patent drawing
  • US8949103B2 patent drawing
  • US8949103B2 patent drawing

AI summary

A system and method for facilitating simulation of a computer program. A program representation is generated from a computer program. A simulation of the program is performed. Simulation may include applying heuristics to determine program flow for selected instructions, such as a branch instruction or a loop instruction. Simulation may also include creating imaginary objects as surrogates for real objects, when program code to create real objects is restricted, or fields of the objects are unavailable or uncertain, or for other reasons. Data descriptive of the simulation is inserted into the program representation. A visualizer may retrieve the program representation and generate a visualization that shows sequence flows resulting from the simulation.