Introduction
Satisfiability Modulo Theories (SMT) solvers are foundational tools in computer science, heavily used in formal verification, symbolic execution, program synthesis, and automated theorem proving. Over the years, the community has developed a diverse ecosystem of highly sophisticated solvers such as Z3, CVC4, Boolector, and MathSAT.
However, a well-known phenomenon in automated reasoning is that no single solver is the best at everything. A solver that performs exceptionally well on bit-vector arithmetic might struggle with non-linear real arithmetic. Even within the same logic family, different heuristic choices mean solver performance varies significantly from instance to instance. This creates the Algorithm Selection Problem: which solver should a user choose to minimize computation time? MachSMT addresses this by predicting the fastest solver for a given SMT instance, acting as a meta-solver that dynamically ranks available tools.
System Architecture and Methodology
MachSMT leverages machine learning to build empirical hardness models across the SMT-LIB library. The core approach involves mapping specific problem instances to available solvers and computing a predictive ranking of performance.
As shown in the architecture diagram, the process begins with a set of training data consisting of input problems and a portfolio of solvers. These are evaluated to generate runtime data. Simultaneously, features are extracted from the input problems. MachSMT uses these features and runtime data to build a model. For a new input problem, the feature extractor identifies key characteristics, which the selector then uses—guided by the built model—to choose the optimal solver (Solver X).
Feature Extraction
A critical component of MachSMT is its ability to characterize SMT formulas. The tool extracts 162 distinct features from SMT-LIB instances, ranging from simple grammatical counts to more complex structural metrics.
These features include the frequency of various grammatical constructs (e.g., bit-vector operations, floating-point theory, core Boolean constructs), quantifier nesting levels, and the size of the input file. By capturing these attributes, the machine learning model can accurately predict the empirical hardness of an instance for different solvers.
Evaluation and Datasets
The authors utilized the standard benchmarks of the SMT community for training and evaluation. Specifically, the tool supports the entirety of the logics within the SMT-LIB Initiative. Performance was evaluated on 102 distinct logics/tracks from SMT-COMP 2019, the premier international competition for SMT solvers.
Key Results and Insights
The primary insight behind MachSMT is the power of portfolios: rather than building a faster solver from scratch, significant performance gains can be achieved by intelligently leveraging the collective strengths of existing solvers.
Quantitative results demonstrate the effectiveness of this approach:
- Outperforming Competition Winners: In an analysis of 102 tracks from SMT-COMP 2019, MachSMT improved upon the actual competition winners in 49 logics—nearly half of all categories.
- Significant Speedups: In certain logics, MachSMT's selection resulted in up to a 240% performance improvement compared to using the single best solver for that category.
- Predictability of Hardness: The success of the tool confirms that the empirical hardness of SMT instances is predictable enough for machine learning models to make high-quality routing decisions across the diverse landscape of SMT-LIB logics.
Conclusion and Limitations
While MachSMT provides a powerful meta-solving capability, it is not a replacement for individual SMT solvers. It is a routing tool that relies entirely on the continued development of the underlying solvers it selects from. The project is open-source, providing the community with a verifiable artifact to improve solver selection in practical applications.
Summary updated