Opaque Function Modeling via Dynamic Abstract State Sampling
Find Innovative SolutionsGenerate 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
Engineering 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
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
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
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
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
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
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
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
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
Data Source
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.


