Expand description
OxiZ SAT Solver - High-performance CDCL SAT solver
This crate implements a Conflict-Driven Clause Learning (CDCL) SAT solver with the following features:
- Two-watched literals scheme for efficient unit propagation
- Multiple branching heuristics (VSIDS, LRB, CHB, VMTF)
- Clause learning with first-UIP scheme and recursive minimization
- Preprocessing (BCE, BVE, subsumption elimination)
- Incremental solving (push/pop)
- DRAT proof generation
- Local search integration
- Parallel portfolio solving
- AllSAT enumeration
§Examples
§Basic SAT Solving
use oxiz_sat::{Solver, SolverResult, Lit};
let mut solver = Solver::new();
// Create variables
let a = solver.new_var();
let b = solver.new_var();
let c = solver.new_var();
// Add clause: a OR b
solver.add_clause([Lit::pos(a), Lit::pos(b)]);
// Add clause: NOT a OR c
solver.add_clause([Lit::neg(a), Lit::pos(c)]);
// Add clause: NOT b OR NOT c
solver.add_clause([Lit::neg(b), Lit::neg(c)]);
match solver.solve() {
SolverResult::Sat => println!("Satisfiable!"),
SolverResult::Unsat => println!("Unsatisfiable!"),
SolverResult::Unknown => println!("Unknown"),
}§Solving with Assumptions
use oxiz_sat::{Solver, SolverResult, Lit};
let mut solver = Solver::new();
let a = solver.new_var();
let b = solver.new_var();
solver.add_clause([Lit::pos(a), Lit::pos(b)]);
// Solve assuming a is false
let (result, _) = solver.solve_with_assumptions(&[Lit::neg(a)]);
assert_eq!(result, SolverResult::Sat); // b must be trueRe-exports§
pub use parallel::ParallelClauseSimplifier;pub use parallel::ParallelProofChecker;pub use parallel::PortfolioConfig as ParallelPortfolioConfig;pub use parallel::PortfolioResult as ParallelPortfolioResult;pub use parallel::PortfolioSolver as ParallelPortfolioSolver;pub use parallel::ProofCheckConfig;pub use parallel::ProofCheckResult;pub use parallel::SimplificationConfig;pub use parallel::SimplificationResult;pub use parallel::SolverVariant;
Modules§
- clause_
pool - Clause allocation pool for recycling deleted clause memory.
- parallel
- Parallel SAT Solver Components.
- preprocessing
- SAT Preprocessing Techniques - Advanced Extensions.
Macros§
- time_
scope - Macro for creating a scoped timer that logs on drop
Structs§
- Activity
Stats - Statistics for activity management
- Agility
Stats - Statistics for agility tracking
- Agility
Tracker - Agility tracker
- AllSat
Enumerator - All-SAT enumerator for finding multiple satisfying assignments
- Assumption
- Assumption with metadata
- Assumption
Context - Assumption-based solving context
- Assumption
Core Minimizer - Assumption core minimizer
- Assumption
Level - Assumption level for hierarchical assumption management
- Assumption
Stack - Assumption stack with level management
- Assumption
Stats - Statistics for assumption-based solving
- Asymmetric
Branching - Asymmetric Branching engine
- Asymmetric
Branching Stats - Statistics for Asymmetric Branching
- Auto
Timer - RAII timer that automatically reports on drop
- Automorphism
Detector - Graph automorphism detection for finding symmetries
- Autotuner
- Auto-tuning manager
- Autotuning
Stats - Statistics for auto-tuning
- Backbone
Detector - Backbone detector
- Backbone
Filter - Backbone filter for literal selection
- Backbone
Stats - Statistics for backbone computation
- Batch
Propagation Result - Result of a batch unit propagation operation
- Benchmark
Harness - Benchmark harness for running SAT solver on multiple instances
- Benchmark
Result - Result of a single benchmark run
- BigStats
- Statistics for BIG optimization
- Binary
Implication Graph - Binary Implication Graph optimizer
- Cardinality
Encoder - Cardinality constraint encoder
- CceStats
- Statistics for CCE
- Chrono
Backtrack Config - Configuration for chronological backtracking.
- Chrono
Backtrack Engine - Chronological backtracking decision engine.
- Chrono
Backtrack Stats - Statistics for chronological backtracking.
- Clause
- A clause is a disjunction of literals
- Clause
Activity Manager - Clause activity manager
- Clause
Arena - Memory arena for clause storage
- Clause
Database - Database of clauses with memory pool
- Clause
Database Stats - Statistics for clause database
- Clause
Exchange Buffer - Clause exchange buffer shared between solvers
- Clause
Id - Unique identifier for a clause
- Clause
Maintenance - Clause maintenance manager
- Clause
Management Result - Result of clause database management operation
- Clause
Ref - Clause reference in the memory arena
- Clause
Size Manager - Clause size manager
- Clause
Substitution - Clause substitution using extension variables
- Communities
- Community structure representing a partition of variables.
- Community
Ordering - Community-aware variable ordering.
- Community
Partition - Partitioned clause database organized by variable communities.
- Community
Stats - Statistics for community detection.
- Configuration
- Configuration with parameters and performance metrics
- Conflict
Analysis Result - Result of parallel conflict analysis
- Covered
Clause Elimination - Covered Clause Elimination engine
- CpuReference
Accelerator - CPU reference implementation of GPU-acceleratable operations
- Cube
- A cube represents a partial assignment (conjunction of literals).
- Cube
AndConquer - Cube-and-Conquer orchestrator that combines cube generation and solving.
- Cube
Config - Configuration for cube generation.
- Cube
Generator - Cube generator using recursive splitting.
- Cube
Solve Result - Result of solving a single cube.
- Cube
Solver Config - Configuration for parallel cube solving.
- Cube
Solver Stats - Statistics for cube solving.
- Cube
Stats - Statistics for cube generation.
- Dimacs
Parser - DIMACS CNF parser
- Dimacs
Writer - DIMACS CNF writer
- Distillation
- Clause distillation manager
- Distillation
Stats - Statistics for distillation
- Drat
Inprocessing Config - Configuration for DRAT-based inprocessing
- Drat
Inprocessing Stats - Statistics for DRAT-based inprocessing
- Drat
Inprocessor - DRAT-based Inprocessor
- Drat
Proof - DRAT proof logger
- Dynamic
LbdManager - Dynamic LBD manager
- Dynamic
LbdStats - Statistics for dynamic LBD updates
- Dynamic
Subsumption - Dynamic subsumption engine.
- Dynamic
Subsumption Config - Configuration for dynamic subsumption.
- Dynamic
Subsumption Stats - Statistics for subsumption.
- ElsStats
- Statistics for equivalent literal substitution
- Enumeration
Config - Configuration for model enumeration
- Enumeration
Stats - Statistics for model enumeration
- Equivalent
Literal Substitution - Equivalent Literal Substitution engine
- Exchange
Config - Configuration for clause exchange
- Exchange
Stats - Statistics for clause exchange
- Extended
Resolution - Extended resolution manager
- Extension
- Extension variable definition
- GF2Matrix
- GF(2) matrix for efficient Gaussian elimination
- GF2Row
- GF(2) row representation using bit vectors for efficient XOR operations
- Gate
Detector - Gate detector and optimizer
- Gate
Stats - Statistics for gate detection
- GpuBenchmark
- GPU benchmark harness
- GpuBenchmark
Result - GPU vs CPU benchmark result
- GpuBenefit
Analysis - Analysis of when GPU acceleration would be beneficial
- GpuConfig
- GPU configuration options
- GpuStats
- GPU operation statistics
- Hyper
Binary Resolver - Hyper-binary resolution manager
- Hyper
Binary Stats - Statistics for hyper-binary resolution
- Lit
- A literal (positive or negative occurrence of a variable)
- Local
Search - Local Search SAT Solver
- Local
Search Config - Configuration for local search
- Local
Search Stats - Statistics for local search
- Lookahead
Branching - Look-ahead branching manager
- Lookahead
Stats - Statistics for look-ahead branching
- Louvain
Detector - Louvain community detection algorithm.
- Lrat
Proof - LRAT proof logger
- MLBranching
- ML-based branching heuristic
- MLBranching
Config - Configuration for ML-based branching
- MLBranching
Stats - Statistics for ML-based branching
- Maintenance
Stats - Statistics for clause maintenance operations
- Matrix
Symmetry - Matrix variable indexing helper
- MaxSat
Clause - MaxSAT clause - can be hard or soft (with weight)
- MaxSat
Config - MaxSAT solver configuration
- MaxSat
Result - Result of MaxSAT solving
- MaxSat
Solver - Core-guided MaxSAT solver
- MaxSat
Stats - Statistics for MaxSAT solving
- Memory
OptStats - Memory statistics
- Memory
Optimizer - Memory optimizer with size-class pools
- Memory
Stats - Memory usage statistics
- Occurrence
List - Occurrence list manager
- Occurrence
Stats - Statistics for occurrence tracking
- Parallel
Cube Solver - Parallel cube solver.
- Parameter
- A tunable parameter
- Partition
Stats - Statistics for community-based partitioning.
- Performance
Metrics - Performance metrics tracker
- Permutation
- Represents a permutation of variables
- Portfolio
Config - Configuration for a portfolio solver instance
- Portfolio
Result - Result from a portfolio solver thread
- Portfolio
Solver - Portfolio solver that runs multiple solvers in parallel
- Portfolio
Stats - Portfolio statistics
- Preprocessor
- Preprocessing context
- Profiler
- Profiler for tracking multiple timers and operation counts
- Proof
Trimmer - Proof trimmer for removing unnecessary clauses
- Recursive
MinStats - Statistics for recursive minimization
- Recursive
Minimizer - Recursive clause minimization manager
- Reluctant
Doubling - Reluctant doubling restart manager
- Reluctant
Stats - Statistics for reluctant doubling
- Rephasing
Manager - Rephasing manager
- Rephasing
Stats - Statistics for rephasing operations
- Resolution
Analyzer - Resolution Graph Analyzer
- Resolution
Graph - Resolution Graph for analyzing proof structure
- Resolution
Graph Stats - Statistics about the resolution graph
- Resolution
Node - Node in the resolution graph
- Saved
Trail - A saved trail representing a sequence of decisions
- Scoped
Timer - A named timer for profiling code sections
- Shared
Clause - A shared clause that can be exchanged between solvers
- Size
Manager Stats - Statistics for clause size management
- Smoothed
LbdStats - Statistics for smoothed LBD tracking
- Smoothed
LbdTracker - Smoothed LBD tracker
- Solver
- CDCL SAT Solver
- Solver
Config - Solver configuration
- Solver
Stats - Statistics for the solver
- Stabilization
Config - Stabilization strategy configuration
- Stabilization
Manager - Stabilization manager
- Stabilization
Stats - Statistics for stabilization
- Stats
Aggregator - Statistics aggregator for multiple solver runs
- Stats
Dashboard - Comprehensive statistics dashboard
- Subsumption
Checker - Subsumption checker for learned clauses
- Subsumption
Stats - Statistics for subsumption checking
- Symmetry
Breaker - Symmetry breaker
- Symmetry
Group - Symmetry group representation
- Target
Phase Selector - Target-based phase selection manager
- Target
Phase Stats - Statistics for target phase selection
- Trail
- The assignment trail
- Trail
Saving Manager - Trail saving manager
- Trail
Saving Stats - Statistics for trail saving
- Tuning
Performance Metrics - Performance metrics for tuning evaluation
- UipAnalysis
Result - Result of UIP analysis.
- UipAnalyzer
- UIP conflict analyzer.
- UipConfig
- Configuration for UIP conflict analysis.
- UipStats
- Statistics for UIP analysis.
- Unsat
Core - UNSAT core extractor
- VMTF
- Variable Move-To-Front (VMTF) branching heuristic
- Var
- A variable in the SAT formula
- Variable
Activity Manager - Variable activity manager
- Variable
Incidence Graph - Variable Incidence Graph (VIG).
- Vivification
- Clause vivification manager
- Vivification
Stats - Statistics for vivification
- Vmtf
Bump Queue - VMTF bump queue
- Vmtf
Bump Stats - Statistics for VMTF bump queue
- Vmtf
Stats - Statistics for VMTF
- XorClause
- XOR clause for propagation with watched literals
- XorClause
Id - ID for an XOR clause within the propagator
- XorConstraint
- Represents an XOR constraint: x1 ⊕ x2 ⊕ … ⊕ xn = rhs
- XorDetector
- XOR clause detector
- XorManager
- XOR constraint manager with Gaussian elimination
- XorPropagator
- XOR propagator with watched literal scheme
- XorPropagator
Stats - Statistics for XOR propagator
- XorStrengthening
- XOR strengthening: eliminate variables that appear in exactly two XOR constraints
- XorSubsumption
- XOR subsumption checker
Enums§
- Backbone
Algorithm - Backbone computation algorithm
- Backtrack
Decision - Backtracking decision.
- Clause
Tier - Clause tier for tiered database management
- Config
Preset - Preset categories for different problem types
- Cube
Result - Result of solving cubes.
- Cube
Splitting Strategy - Strategy for cube generation.
- Dimacs
Error - Error type for DIMACS parsing
- Enumeration
Result - Result of enumeration
- Extension
Type - Types of extension variable definitions
- Gate
Type - Type of logical gate
- GpuBackend
- GPU backend selection
- GpuError
- Error type for GPU operations
- GpuRecommendation
- GPU usage recommendation
- HbrResult
- Result of hyper-binary resolution
- LBool
- Boolean value or undefined
- Local
Search Result - Result of local search
- Lookahead
Heuristic - Look-ahead branching heuristic type
- Memory
Action - Recommended memory action
- Phase
Mode - Phase selection mode
- Propagate
Result - Result of propagation
- Reason
- Reason for an assignment
- Rephasing
Strategy - Rephasing strategy
- Restart
Strategy - Restart strategy
- Search
Mode - Search mode for stabilization
- Size
Adjustment Strategy - Strategy for adjusting clause size limit
- Size
Class - Size class for memory pooling
- Solver
Result - Result of SAT solving
- Subsumption
Result - Result of subsumption check.
- Symmetry
Breaking Method - Symmetry breaking method
- Theory
Check Result - Result from a theory check
- Tuning
Strategy - Tuning strategy
- UipStrategy
- UIP strategy selection.
- XorAdd
Result - Result of adding an XOR constraint
Traits§
- GpuSolver
Accelerator - Trait for GPU-accelerated SAT solver operations
- Theory
Callback - Callback trait for theory solvers The CDCL(T) solver implements this to receive theory callbacks