mod db_clause;
mod kind;
mod literal;
mod ab_clause;
pub use ab_clause::ABClause;
mod int_clause;
pub use int_clause::IntClause;
mod source;
pub use source::ClauseSource;
pub use kind::ClauseKind;
use crate::{
config::LBD,
db::atom::AtomDB,
structures::{atom::Atom, literal::CLiteral, valuation::Valuation},
};
#[cfg(feature = "boolean")]
pub type CClause = ABClause;
#[cfg(not(feature = "boolean"))]
pub type CClause = IntClause;
pub trait Clause {
fn as_dimacs(&self, zero: bool) -> String;
#[allow(dead_code)]
fn asserts(&self, val: &impl Valuation) -> Option<CLiteral>;
fn lbd(&self, atom_db: &AtomDB) -> LBD;
fn literals(&self) -> impl Iterator<Item = CLiteral>;
fn size(&self) -> usize;
fn atoms(&self) -> impl Iterator<Item = Atom>;
fn canonical(self) -> CClause;
fn unsatisfiable_on(&self, valuation: &impl Valuation) -> bool;
unsafe fn unsatisfiable_on_unchecked(&self, valuation: &impl Valuation) -> bool;
}