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

Method intern_expr

crates/kernel/src/env.rs:112–118  ·  view source on GitHub ↗

Intern an expression: same pointer-uniqueness guarantee as `intern_univ`.

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

Source from the content-addressed store, hash-verified

110 /// Intern an expression: same pointer-uniqueness guarantee as
111 /// `intern_univ`.
112 pub fn intern_expr(&mut self, e: KExpr<M>) -> KExpr<M> {
113 let key = *e.addr();
114 if let Some(existing) = self.exprs.get(&key) {
115 return existing.clone();
116 }
117 self.exprs.entry(key).or_insert(e).clone()
118 }
119}
120
121/// Generated recursor, cached after inductive validation.

Callers 15

wrap_bindersMethod · 0.80
subst_cachedFunction · 0.80
simul_subst_cachedFunction · 0.80
lift_cachedFunction · 0.80
cheap_beta_reduceFunction · 0.80
instantiate_rev_cachedFunction · 0.80
abstract_fvars_cachedFunction · 0.80
gen_exprFunction · 0.80
prop_intern_determinismFunction · 0.80

Calls 4

entryMethod · 0.80
addrMethod · 0.45
getMethod · 0.45
cloneMethod · 0.45