Opaque Function Modeling via Dynamic Abstract State Sampling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Static program analysis faces challenges in dealing with opaque code, particularly in high-level dynamic languages like JavaScript, where manual modeling is time-consuming and error-prone, and automatic techniques are imprecise due to limitations in observable semantics.

Innovation Solution

A method and system that utilize an abstract state to generate sample inputs for opaque functions, execute them, collect outputs, and update the abstract state, enabling precise modeling by combinatorial sampling and over-approximation of outputs to refine the static analysis.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If manual modeling techniques are used to model opaque code, then modeling precision is improved, but time consumption increases and error rates increase

Engineering Contradiction:
Improvemodeling precisionVSAvoidtime consumption
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system enables opaque functions to model themselves automatically by executing them with generated sample inputs and collecting outputs, eliminating the need for manual modeling while achieving precise results through automated self-analysis

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces manual modeling processes with an automated system that uses abstract states, sample input generation, and output collection mechanisms to automatically extract behavioral models from opaque functions

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

2Loss of time

If automatic modeling techniques based on natural language specifications are used, then time consumption is reduced, but modeling precision deteriorates due to dependency on specification quality

Engineering Contradiction:
Improvetime consumptionVSAvoidmodeling precision
Core Design Contradiction:
Loss of timeVSMeasurement precision

Solution Approach 1:

The system automatically generates sample inputs based on the abstract state, executes the opaque function, collects outputs, and updates the abstract state with the results, creating a feedback loop that refines the model progressively without relying on pre-written specifications

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent transforms the modeling process by changing from static natural language specifications to dynamic parameter-based modeling using abstract states that are continuously updated with observed outputs, enabling adaptive precision improvement

Inventive Principle:
Principle #35Parameter changes

3Loss of time

If automatic modeling techniques based on dynamic traces are used, then time consumption is reduced, but modeling precision deteriorates because only observable semantics can be captured

Engineering Contradiction:
Improvetime consumptionVSAvoidmodeling precision
Core Design Contradiction:
Loss of timeVSMeasurement precision

Solution Approach 1:

The system performs preliminary actions by generating comprehensive sample inputs based on the abstract state before executing the opaque function, ensuring that all relevant input combinations are covered to capture complete observable behavior

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extends the modeling approach from simple trace collection to a multi-dimensional process involving abstract state representation, systematic sample input generation, and structured output collection, enabling capture of complex observable semantics

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Data Source

PatentUS20200125361A1Dynamic modeling for opaque code during static analysis
Publication Date: 2020.04.23 ORACLE INT CORP
  • US20200125361A1 patent drawing
  • US20200125361A1 patent drawing
  • US20200125361A1 patent drawing

AI summary

A method may include initiating a static analysis of code, identifying an opaque function during the static analysis, and modeling the opaque function by: generating, using an abstract state of the static analysis, sample inputs for the opaque function, collecting outputs for the opaque function by executing, using the abstract state, the opaque function with the sample inputs, and updating the abstract state using the outputs.