Skip to content
STIMSMITH

Address Constraint Satisfaction

Technique WIKI v1 · 7/8/2026

Address Constraint Satisfaction is a technique for automatic test program generation that solves constraints governing memory access generation. It was introduced and formalized within the Model-Based Test-Generator (MBTG) framework, and supports complex addressing modes used in architectures such as PowerPC and x86.

Address Constraint Satisfaction

Overview

Address Constraint Satisfaction is a technique used in automatic test program generation. It addresses the central problem of solving constraints for memory access generation by providing a generic algorithmic framework that decides how generated memory accesses should be resolved against architectural addressing rules. The technique was introduced by Lewin, Fournier, Levinger, Roytman, and Shurek at IBM Research - Haifa in their 2002 paper "Constraint satisfaction for test program generation."

Motivation

Automatic test program generators must produce instruction sequences that perform memory accesses through architectures' addressing modes. Because each architecture defines complex rules for how effective addresses are computed (base registers, index registers, scaling factors, displacements, segment selectors, and so on), the generator must enforce those rules while still producing tests that exercise specific memory locations. The paper frames this problem explicitly as a constraint satisfaction problem, drawing on prior work such as constraint-based automatic test data generation.

Implementation: Model-Based Test-Generator (MBTG)

The algorithm was implemented in the Model-Based Test-Generator (MBTG). MBTG is a tool for automatic test generation; the algorithm embedded in it uses a generic model of addressing so that new addressing modes can be added flexibly without rewriting the core engine. The MBTG implementation is the canonical reference implementation of Address Constraint Satisfaction.

Supported Architectures and Addressing Modes

The technique handles complex addressing modes, including those defined for:

  • PowerPC Architecture — addressing modes used by PowerPC instructions.
  • x86 Architecture — addressing modes used by x86 instructions, including segment-prefixed and scaled-index forms.
  • Other architectures — the generic model is intended to allow extension to additional instruction set architectures beyond PowerPC and x86.

Algorithmic Approach

The Address Constraint Satisfaction algorithm solves the constraints produced by memory access generation requests. Because constraint satisfaction in this form is, in general, related to NP-hard problems (cf. Garey and Johnson, Computers and Intractability), the paper treats it as a constraint-solving framework rather than a single fixed procedure, and the generic model allows the underlying solver strategy to be adapted to the addressing mode being modeled.

Related Work

The technique builds on prior constraint-based test data generation, in particular DeMilli and Offutt's "Constraint-based automatic test data generation" (IEEE TSE, 1991). The application of AI techniques to software engineering contexts (Moseley, 1994) provides additional background.

Applications

Address Constraint Satisfaction is used wherever automatic test generators must produce instruction sequences that perform valid memory accesses across diverse instruction set architectures, particularly within IBM's Model-Based Test-Generator for PowerPC and x86 verification.

See Also

CITATIONS

5 sources
5 citations
[1] Address Constraint Satisfaction was introduced in the 2002 paper 'Constraint satisfaction for test program generation' by Lewin, Fournier, Levinger, Roytman, and Shurek. Constraint satisfaction for test program generation
[2] The central problem the technique solves is solving constraints for memory access generation. Constraint satisfaction for test program generation
[3] The technique is implemented in the Model-Based Test-Generator. Constraint satisfaction for test program generation
[4] The algorithm handles complex addressing modes in PowerPC, x86, and other architectures. Constraint satisfaction for test program generation
[5] The framework allows flexibility in modeling new addressing modes. Constraint satisfaction for test program generation