A Markov Chain Monte Carlo Sampler for Mixed Boolean/Integer Constraints

We describe a Markov chain Monte Carlo (MCMC)-based algorithm for sampling solutions to mixed Boolean/integer constraint problems. The focus of this work differs in two points from traditional SAT Modulo Theory (SMT) solvers, which are aimed at deciding whether a given set of constraints is satisfiable: First, our approach targets constraint problems that have a large solution space and thus are relatively easy to satisfy, and second, it aims at efficiently producing a large number of samples with a given (e.g. uniform) distribution over the solution space. Our work is motivated by the need for such samplers in constrained random simulation for hardware verification, where the set of valid input stimuli is specified by a "testbench" using declarative constraints. MCMC sampling is commonly applied in statistics and numerical computation. We discuss how an MCMC sampler can be adapted for the given application, specifically, how to deal with non-connected solution spaces, efficiently process equality and disequality constraints, handle state-dependent constraints, and avoid correlation of consecutive samples. We present a set of experiments to analyze the performance of the proposed approach.

[1]  W. K. Hastings,et al.  Monte Carlo Sampling Methods Using Markov Chains and Their Applications , 1970 .

[2]  Sriram Sankaranarayanan,et al.  State space exploration using feedback constraint generation and Monte-Carlo sampling , 2007, ESEC-FSE '07.

[3]  N. Metropolis,et al.  Equation of State Calculations by Fast Computing Machines , 1953, Resonance.

[4]  Adrian F. M. Smith,et al.  Sampling-Based Approaches to Calculating Marginal Densities , 1990 .

[5]  Sasan Iman,et al.  The e Hardware Verification Language , 2004, Springer US.

[6]  Stuart Sutherland,et al.  Systemverilog for Design: A Guide to Using Systemverilog for Hardware Design and Modeling , 2006 .

[7]  Adnan Aziz,et al.  Modeling design constraints and biasing in simulation using BDDs , 1999, 1999 IEEE/ACM International Conference on Computer-Aided Design. Digest of Technical Papers (Cat. No.99CH37051).

[8]  D. Aldous,et al.  How to Combine Fast Heuristic Markov Chain Monte Carlo with Slow Exact Sampling , 2001, math/0106159.

[9]  Bart Selman,et al.  Towards Efficient Sampling: Exploiting Random Walk Strategies , 2004, AAAI.

[10]  John Odentrantz,et al.  Markov Chains: Gibbs Fields, Monte Carlo Simulation, and Queues , 2000, Technometrics.

[11]  Bart Selman,et al.  Local search strategies for satisfiability testing , 1993, Cliques, Coloring, and Satisfiability.

[12]  Robert P. Kurshan,et al.  Application of Formal Word-Level Analysis to Constrained Random Simulation , 2008, CAV.

[13]  Andreas Kuehlmann,et al.  Stimulus generation for constrained random simulation , 2007, ICCAD 2007.

[14]  D. Dill,et al.  Deriving a simulation input generator and a coverage metric from a formal specification , 2002, Proceedings 2002 Design Automation Conference (IEEE Cat. No.02CH37324).

[15]  Mahesh A. Iyer,et al.  Race a word-level atpg-based constraints solver system for smart random simulation , 2003, International Test Conference, 2003. Proceedings. ITC 2003..

[16]  Christos H. Papadimitriou,et al.  On the Random Walk Method for Protocol Testing , 1994, CAV.

[17]  Donald Geman,et al.  Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of images , 1984 .

[18]  Daniel Geist,et al.  AVPGEN-A test generator for architecture verification , 1995, IEEE Trans. Very Large Scale Integr. Syst..