Skip to content

Commit 09b4f0f

Browse files
committed
Split type t into Imm values and Sym hash-consed nodes
This commit fundamentally changes the representation of expressions (`t`) by lifting constant values out of the hash-consing machinery. Changes: - `t` is now a variant: `Imm of Value.t | Sym of expr Hc.hash_consed`. - Removed `Val` and `Loc` constructors from the underlying `expr` type. - Constants are no longer hash-consed; they are stored directly as `Imm`. Potential Performance Improvements: - Creating constant expressions no longer requires a hash-cons table lookup or allocation of a hash-cons node. - The global hash-cons table is no longer polluted with ephemeral constant values. BREAKING CHANGE: Previously, because all expressions were hash-consed, structural equality implied physical equality (`phys_equal` was sufficient for all comparisons). This invariant no longer holds for `Imm` values.
1 parent 7b95c1e commit 09b4f0f

11 files changed

Lines changed: 978 additions & 836 deletions

File tree

src/smtml/dune

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
interpret
3030
interpret_intf
3131
lexer
32-
loc
3332
log
3433
logic
3534
mappings

0 commit comments

Comments
 (0)