You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,7 @@ class Let(Expr):
92
92
body: Expr
93
93
```
94
94
95
-
**Structural equality**. Method eq_sis ready to use to compare the structural equality (alpha equivalence) of two IRs.
95
+
**Structural equality**. Member method `eq_s` compares the structural equality (alpha equivalence) of two IRs represented by MLC's structured dataclass.
96
96
97
97
```python
98
98
"""
@@ -110,7 +110,13 @@ True
110
110
ValueError: Structural equality check failed at {root}.rhs.b: Inconsistent binding. RHS has been bound to a different node whileLHSisnot bound
111
111
```
112
112
113
-
**Structural hashing**. TBD
113
+
**Structural hashing**. The structure of MLC dataclasses can be hashed via `hash_s`, which guarantees if two dataclasses are alpha-equivalent, they will share the same structural hash:
0 commit comments