| Crates.io | oxiz-opt |
| lib.rs | oxiz-opt |
| version | 0.1.2 |
| created_at | 2026-01-12 05:09:49.341302+00 |
| updated_at | 2026-01-21 05:25:46.074972+00 |
| description | Optimization engine for OxiZ (MaxSMT, OMT) |
| homepage | |
| repository | https://github.com/cool-japan/oxiz |
| max_upload_size | |
| id | 2037023 |
| size | 555,672 |
Optimization engine for OxiZ: MaxSMT and Optimization Modulo Theories (OMT).
This crate provides optimization capabilities on top of the SMT solver. It supports weighted MaxSAT, MaxSMT (soft constraints with theories), and objective function optimization.
| Feature | Description | Z3 Reference |
|---|---|---|
| MaxSAT | Maximize satisfied clauses | maxcore.cpp, wmax.cpp |
| MaxSMT | MaxSAT with theory constraints | maxsmt.cpp |
| OMT | Optimize linear objectives | optsmt.cpp |
| Pareto | Multi-objective optimization | opt_pareto.cpp |
use oxiz_opt::OptContext;
fn main() {
let mut opt = OptContext::new();
// Add hard constraints
// opt.assert(...);
// Add soft constraints with weights
// opt.add_soft(..., weight);
// Add objective to minimize/maximize
// opt.minimize(...);
// Solve
// let result = opt.check();
}
(minimize (+ x y))
(maximize z)
(assert-soft (> x 0) :weight 5)
(check-sat)
(get-objectives)
MIT OR Apache-2.0