Skip to content
STIMSMITH

Constraint Solver Engine

Concept WIKI v1 · 6/22/2026

The Constraint Solver Engine is a MicroTESK testing-framework component that helps test data generators construct test data by solving constraints specified in test situations. It is organized as a collection of solvers behind a generic interface, including universal SMT-backed solvers and custom solvers for specialized generation tasks.

Overview

The Constraint Solver Engine is a component of the MicroTESK testing framework. It provides test generators with a Java interface to external SMT solvers and helps test data generators construct test data by solving constraints specified in test situations. In the overall MicroTESK architecture, the testing framework includes a test template processor, a testing library, and the Constraint Solver Engine, which supplies the testing library's test generators with access to external SMT solvers. [C1]

Role in test data generation

MicroTESK's constraint-based generation flow expresses test situations as constraints over instruction operands and microprocessor state. A test data generator analyzes a constraint, distinguishes constrained variables from free variables, and calls the Constraint Solver Engine to construct values for the free variables. After operand values are constructed, the generator can return control code that brings the relevant microprocessor resources into the required states. [C2]

This approach supports constraint-based random generation: different calls of a test data generator may produce different values, while each generated value set is still required to cause the specified test situation. [C2]

Solver organization

The engine is implemented as a collection of solvers encapsulated behind a generic interface. The solvers are divided into two main families: [C3]

  • Universal solvers, which handle a wide range of constraint types.
  • Custom solvers, which target specific test data generation tasks.

Universal solvers are built around external SMT solvers such as Yices and Z3. These solvers provide rich constraint-description capabilities, including Boolean algebra, arithmetic, logic over fixed-size bit vectors, and other theories, along with decision procedures for solving those constraints. [C4]

Java Constraint Solver API and SMT-LIB

MicroTESK uses the Java Constraint Solver API, described in the evidence as a generic interface to SMT-LIB-based constraint solvers. The API supports dynamically creating constraints in Java, mapping them to SMT-LIB descriptions, launching a solver, and transferring results back to Java. [C5]

Extensibility and custom solvers

Some test situations are difficult to express directly as SMT constraints, including situations involving floating-point arithmetic and memory management. For such cases, engineers can provide special custom solvers or generators. Custom solvers may still use SMT solvers to construct test data, but they usually add non-trivial logic for forming the constraint system and interpreting the solution. [C6]

When the design or coverage model is extended with a new type of knowledge, a corresponding custom solver may be needed. To support extension of the engine with new solvers, both universal and custom solvers implement uniform interfaces. [C6]

Position in MicroTESK

The Constraint Solver Engine belongs to MicroTESK's testing framework rather than the modeling framework. The modeling framework represents design and coverage knowledge about the target microprocessor, while the testing framework generates test programs from that model and test templates. Within the testing framework, the Constraint Solver Engine works alongside the test template processor and testing library to support constraint-driven test data construction. [C1]

CITATIONS

6 sources
6 citations
[1] The Constraint Solver Engine is a MicroTESK testing-framework component that provides test generators with a Java interface to external SMT solvers. MicroTESK: An Extendable Framework for
[2] A test data generator calls the Constraint Solver Engine to construct values for free variables, and generated values are used to produce control code that sets microprocessor resources to required states. MicroTESK: An Extendable Framework for
[3] The engine is implemented as a collection of solvers behind a generic interface and divides solvers into universal and custom families. MicroTESK: An Extendable Framework for
[4] Universal solvers are built around external SMT solvers such as Yices and Z3 and support rich constraint theories including Boolean algebra, arithmetic, and fixed-size bit-vector logic. MicroTESK: An Extendable Framework for
[5] MicroTESK uses the Java Constraint Solver API as a generic interface to SMT-LIB-based solvers, enabling Java constraint creation, SMT-LIB mapping, solver launch, and result transfer back to Java. MicroTESK: An Extendable Framework for
[6] Custom solvers or generators are used for test situations that are difficult to express as SMT constraints, such as floating-point arithmetic or memory management, and universal and custom solvers implement uniform interfaces for extensibility. MicroTESK: An Extendable Framework for