Learning Concise Models from Long Execution Traces (trace2model)
- Paper: https://arxiv.org/pdf/2001.05230.pdf
- Github: https://github.com/natasha-jeppu/Trace2Model/tree/develop
Introduction
Motivation -- What can we learn from the traces
Hardware & Software are designed in different companies
->
People want to know the behaviors of software on specific hardware
->
Concise, human-readable models that express high-level hardware-software interactions can provide users with a better insight into the working of the system. This can, in turn, aid in design exploration, analysis, testing and verification applications.
Example of a model (NFA) that may be learned from traces
This is a model described the slot-level operations of a USB.
Key insights -- Why this algorithm/model is good
- Scalable -- by segmentation approach
- Produce the abstract, concise model
- Can form the transition-edge predicates that are not explicit in the trace.
- Use SAT-based approach with program synthesis
Preliminaries
Terminology to define the traces
The final NFA (Non-Deterministic Finite Automation) model
The symbol
The automation accepts a word
for (there is transition relation can translate one state to the next state)
Algorithm
- Generate Trace (is not included in the model)
-> - Predicate Synthesizer
-> - Construct the machine
Predicate Synthesizer
What to generate
Generate the synthesized function
This paper is using Fastsynth
and CVC4
to synthesize these predicate.
Notice that, the trace is feed into the Fastsynth
and CVC4
by segments
So, the predicates are from the segments
Form the model (Generate the NFA)
The machine
- Divide the predicates we obtained before according to the sliding window with length
. - Find the machine using CBMC to find the counterexample, the steps are:
- Set the constraint be no such machine exists
- Form the C program that uses the predicates from
we obtained from step 2 to fit the machine - Use CBMC to verify this formed machine.
- If assertion holds, no such machine exists, we incremental the state size
- If assertion not hold, we can get the counterexample. We then need to verify if all transition sequences in
belong to . If not, we need to add the constraints and form other C program.
- If assertion holds, no such machine exists, we incremental the state size
- Set the constraint be no such machine exists
Benchmarks
Trace2Model can generate a more simpler NFA compared to state merge methods. However, trace2model runs slower than trace2model but is more scaleable.
Segmentation can speed the generation of the model
Segmentation makes the generated predicates less. This can avoid some repeated information from recurring patterns.
To use in GPU-FPX
- [ ]