[Paper Review] On Uniformly Sampling Traces of a Transition System (Extended Version)
This paper presents TraceSampler, a symbolic algorithm using Algebraic Decision Diagrams (ADDs) to uniformly sample bounded traces of a sequential circuit under user-specified constraints, ensuring provable uniformity or bias in trace distribution. Experiments show it outperforms state-of-the-art tools like WAPS and UniGen2 in sampling speed and scalability, especially on benchmarks where BDD construction succeeds.
A key problem in constrained random verification (CRV) concerns generation of input stimuli that result in good coverage of the system's runs in targeted corners of its behavior space. Existing CRV solutions however provide no formal guarantees on the distribution of the system's runs. In this paper, we take a first step towards solving this problem. We present an algorithm based on Algebraic Decision Diagrams for sampling bounded traces (i.e. sequences of states) of a sequential circuit with provable uniformity (or bias) guarantees, while satisfying given constraints. We have implemented our algorithm in a tool called TraceSampler. Extensive experiments show that TraceSampler outperforms alternative approaches that provide similar uniformity guarantees.
Motivation & Objective
- To address the lack of formal uniformity guarantees in constrained random verification (CRV) tools for system trace generation.
- To enable uniform or biased sampling of bounded traces (state sequences) in sequential circuits under user-defined constraints.
- To develop a scalable, symbolic approach that avoids explicit construction of the full state transition diagram.
- To provide provable uniformity guarantees while maintaining practical performance on industrial-scale benchmarks.
- To bridge the gap between long-running CRV simulations and provably diverse, uniformly sampled trace segments for targeted verification.
Proposed method
- Employs Algebraic Decision Diagrams (ADDs) to symbolically represent the state transition function and constraints over multi-cycle traces.
- Uses dynamic variable reordering and efficient ADD construction to manage state space explosion.
- Applies a recursive sampling procedure over ADDs to generate traces with uniform or user-specified bias.
- Leverages SAT/SMT calls per cycle to derive input stimuli from sampled state sequences.
- Integrates with existing verification flows by translating trace samples into valid input stimuli for simulation.
- Employs a compilation phase to precompute ADD representations, amortizing cost over multiple samples.
Experimental results
Research questions
- RQ1Can we achieve provably uniform sampling of system traces in sequential circuits without explicitly constructing the full state transition diagram?
- RQ2How does the performance of ADD-based sampling compare to SAT-based uniform samplers like UniGen2 and WAPS?
- RQ3What is the impact of dynamic variable reordering on ADD construction time and scalability?
- RQ4Can the proposed method scale to industrial benchmarks where BDDs are feasible?
- RQ5How does the sampling quality (uniformity) compare to ideal uniform sampling in practice?
Key findings
- TraceSampler achieved 17× average speedup over ApproxMC3 for counting and sampling, and could sample traces up to 5× longer than ApproxMC3.
- The Jensen-Shannon divergence between TraceSampler and ideal uniform sampling was only 0.003, indicating near-perfect uniformity.
- TraceSampler outperformed WAPS in sampling speed and scalability, especially on benchmarks with successful BDD construction.
- ApproxMC3 could count 62 of 208 failed BDD benchmarks, but sampling with UniGen2 would be prohibitively slow, indicating a fundamental scalability gap.
- Most ADD construction time was spent on dynamic variable reordering, suggesting optimization potential through better variable ordering.
- The synergy between long CRV simulations and short, uniformly sampled trace segments is promising for future verification workflows.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.