Look up a let-bound variable's value, lifted to the current depth. Returns None if the variable is lambda/forall-bound (not a let).
(&mut self, idx: u64)
| 487 | |
| 488 | /// Pop the most recent local variable. |
| 489 | pub fn pop_local(&mut self) { |
| 490 | if let Some(Some(_)) = self.let_vals.pop() { |
| 491 | self.num_let_bindings -= 1; |
| 492 | } |
| 493 | self.ctx.pop(); |
| 494 | self.ctx_id = self.ctx_id_stack.pop().unwrap_or_else(empty_ctx_addr); |
| 495 | } |
| 496 | |
| 497 | /// Look up a let-bound variable's value, lifted to the current depth. |
| 498 | /// Returns None if the variable is lambda/forall-bound (not a let). |
| 499 | pub fn lookup_let_val(&mut self, idx: u64) -> Option<KExpr<M>> { |
| 500 | let n = self.ctx.len(); |
| 501 | let idx_us = usize::try_from(idx).ok()?; |