#smt-solver #ast #logic

no-std oxiz-core

Core AST, Sorts, and Traits for OxiZ SMT Solver

5 releases

Uses new Rust 2024

0.2.1 Apr 25, 2026
0.2.0 Apr 4, 2026
0.1.3 Feb 6, 2026
0.1.2 Jan 21, 2026

#37 in #smt-solver

Download history 1/week @ 2026-01-23 17/week @ 2026-01-30 9/week @ 2026-02-06 25/week @ 2026-02-13 23/week @ 2026-02-20 10/week @ 2026-02-27 21/week @ 2026-03-06 47/week @ 2026-03-13 39/week @ 2026-03-20 325/week @ 2026-03-27 70/week @ 2026-04-03 34/week @ 2026-04-10 114/week @ 2026-04-17 757/week @ 2026-04-24 1530/week @ 2026-05-01 1586/week @ 2026-05-08

3,994 downloads per month
Used in 19 crates (11 directly)

Apache-2.0

4MB
91K SLoC

oxiz-core

Core data structures and utilities for OxiZ SMT solver.

Status (v0.2.1)

Metric Value
Version 0.2.1
Status Stable
Tests 1,250 passing
Release Date 2026-04-25
Source files 175
Public API items 2,628

Overview

This crate provides the foundational components used across all OxiZ crates:

  • AST - Term representation with hash-consing for memory efficiency
  • Sorts - Type system for SMT sorts (Bool, Int, Real, BitVec, etc.)
  • SMT-LIB2 - Lexer, parser, and printer for the standard SMT format
  • Tactics - Framework for solver strategies and term transformations

Modules

ast

Hash-consed term representation using arena allocation:

use oxiz_core::ast::TermManager;

let mut tm = TermManager::new();
let x = tm.mk_var("x", sort_bool);
let y = tm.mk_var("y", sort_bool);
let and_xy = tm.mk_and([x, y]);

Key types:

  • TermId - Lightweight handle to a term
  • Term - Term data (kind, sort, children)
  • TermKind - Enum of all term kinds (And, Or, Not, Eq, etc.)
  • TermManager - Creates and interns terms

sort

Sort (type) system:

use oxiz_core::sort::SortManager;

let mut sm = SortManager::new();
let bool_sort = sm.bool();
let int_sort = sm.int();
let bv32 = sm.bitvec(32);
let array_sort = sm.array(int_sort, bool_sort);

smtlib

SMT-LIB2 parsing and printing:

use oxiz_core::smtlib::{Lexer, Parser};

let input = "(declare-const x Int) (assert (> x 0)) (check-sat)";
let mut parser = Parser::new(input, &mut term_manager, &mut sort_manager);
let commands = parser.parse_script()?;

tactic

Tactic framework for solver strategies:

use oxiz_core::tactic::{Goal, SimplifyTactic, Tactic};

let mut tactic = SimplifyTactic::new();
let result = tactic.apply(goal)?;

Dependencies

  • rustc-hash - Fast hash maps
  • smallvec - Stack-allocated vectors
  • thiserror - Error handling

License

Apache-2.0

Dependencies

~2.8–7.5MB
~124K SLoC