use crate::{
config::Config,
db::{atom::AtomDB, clause::ClauseDB, consequence_q::ConsequenceQ, literal::LiteralDB},
generic::minimal_pcg::MinimalPCG32,
resolution_buffer::ResolutionBuffer,
};
use rand::SeedableRng;
use super::{ContextState, Counters, GenericContext};
pub type Context = GenericContext<MinimalPCG32>;
impl Context {
pub fn from_config(config: Config) -> Self {
Self {
atom_db: AtomDB::new(&config),
clause_db: ClauseDB::new(&config),
literal_db: LiteralDB::new(&config),
resolution_buffer: ResolutionBuffer::new(&config),
config,
consequence_q: ConsequenceQ::default(),
counters: Counters::default(),
rng: crate::generic::minimal_pcg::MinimalPCG32::from_seed(0_u64.to_le_bytes()),
state: ContextState::Configuration,
callback_terminate: None,
}
}
}