pub struct Interpreter<Cfg: EGraphConfig, L: LitVal, M: LitModel<Value = L>, const TRACK: bool, const PROOFS: bool> {
pub eg: EGraph<Cfg, L, TRACK, PROOFS>,
pub model: M,
/* private fields */
}Fields§
§eg: EGraph<Cfg, L, TRACK, PROOFS>§model: MImplementations§
Source§impl<Cfg: EGraphConfig, L: LitVal, M: LitModel<Value = L>, const TRACK: bool, const PROOFS: bool> Interpreter<Cfg, L, M, TRACK, PROOFS>
impl<Cfg: EGraphConfig, L: LitVal, M: LitModel<Value = L>, const TRACK: bool, const PROOFS: bool> Interpreter<Cfg, L, M, TRACK, PROOFS>
pub fn new(model: M) -> Self
Sourcepub fn with_registries(
model: M,
sorts: SortRegistry<Cfg::S, TRACK>,
ops: OpRegistry<Cfg::O, Cfg::S, TRACK>,
) -> Self
pub fn with_registries( model: M, sorts: SortRegistry<Cfg::S, TRACK>, ops: OpRegistry<Cfg::O, Cfg::S, TRACK>, ) -> Self
Create an interpreter with pre-built registries (from sortcheck).
Sourcepub fn set_shrink_policy(&mut self, policy: ShrinkPolicy)
pub fn set_shrink_policy(&mut self, policy: ShrinkPolicy)
Set the shrink policy used by push/pop.
Sourcepub fn set_strategy(&mut self, strategy: SaturationStrategy)
pub fn set_strategy(&mut self, strategy: SaturationStrategy)
Select the saturation strategy used by (run …).
Sourcepub fn last_sat(&self) -> Option<&SatResult>
pub fn last_sat(&self) -> Option<&SatResult>
Outcome of the most recent (run …) command, or None if none has run.
Sourcepub fn last_run_time(&self) -> Option<Duration>
pub fn last_run_time(&self) -> Option<Duration>
Wall time of the most recent (run …), or None if none has run. Measured around
the saturation driver only — building the :until goal’s terms is not included.
Sourcepub fn set_cc(&mut self, enabled: bool)
pub fn set_cc(&mut self, enabled: bool)
Enable/disable the AC congruence-completion pass (default off; see
EGraph::set_cc). Equivalent to set_ac_mode(Eager) / set_ac_mode(Off).
Sourcepub fn set_ac_mode(&mut self, mode: AcMode)
pub fn set_ac_mode(&mut self, mode: AcMode)
Select how AC completion participates in the run (see AcMode).
Lazy keeps the e-graph’s completion flag off; completion runs only
inside the transaction a lazy check opens.
Sourcepub fn set_lazy_ac_rounds(&mut self, rounds: usize)
pub fn set_lazy_ac_rounds(&mut self, rounds: usize)
Alternation budget for a lazy check’s second phase (default 32 rounds).
Sourcepub fn set_union_by(&mut self, u: UnionBy)
pub fn set_union_by(&mut self, u: UnionBy)
Select the merge survivor policy (see EGraph::set_union_by).
Sourcepub fn set_basis_checks(&mut self, enabled: bool)
pub fn set_basis_checks(&mut self, enabled: bool)
Enable/disable the runtime reduced-basis invariant checks (default off; see
EGraph::set_basis_checks). Diagnostic only: superlinear brute-force checks.
Sourcepub fn global(&mut self, name: &str) -> Option<(Cfg::G, Cfg::S)>
pub fn global(&mut self, name: &str) -> Option<(Cfg::G, Cfg::S)>
Look up a global binding by name.
Sourcepub fn run_checked(
&mut self,
cmds: &[CCommand<Cfg::O, Cfg::S, L>],
) -> Result<(), InterpError>
pub fn run_checked( &mut self, cmds: &[CCommand<Cfg::O, Cfg::S, L>], ) -> Result<(), InterpError>
Run a pre-checked program (output of sortcheck_program).