MCPcopy Create free account
hub / github.com/argumentcomputer/ix / whnf_core

Method whnf_core

crates/kernel/src/whnf.rs:352–357  ·  view source on GitHub ↗

Structural WHNF: beta, iota, zeta. NO delta. FULL flags. This is the standard structural normalizer used outside the def-eq lazy-delta path. With `WhnfFlags::FULL`, recursive sub-reductions and `try_iota` use full delta on majors and projected values, matching pre-`WhnfFlags` behavior of `whnf_core`.

(
    &mut self,
    e: &KExpr<M>,
  )

Source from the content-addressed store, hash-verified

350 let key = self.whnf_key(e);
351 let use_cache = nat_succ_mode == NatSuccMode::Collapse;
352 let transient_nat_work = self.is_transient_nat_literal_work(e)?;
353 if use_cache && !transient_nat_work {
354 if let Some(cached) = self.env.whnf_cache.get(&key) {
355 self.env.perf.record_whnf_hit();
356 return Ok(cached.clone());
357 }
358 // Both probes missed.
359 self.env.perf.record_whnf_miss();
360 self.record_hot_miss("whnf", e);

Callers 2

is_def_eq_innerMethod · 0.80

Calls 1

whnf_core_with_flagsMethod · 0.80

Tested by

no test coverage detected