-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Milestone
Description
Hello, and thanks for the good work.
This is a design proposal
Both find and canonicalize, as defined, are abstraction breaking, because the data structure is not in a sound state if you don't call rebuild previously. My proposal, in keeping with the spirit of Haskell of correctness first is that:
- the functions named
findandcanonicalizeshould callrebuildbefore querying the data structure (note: in the case where the data structure is already rebuilt, then the work list is empty, thereforerebuildwill be very fast anyway) - for the sake of performance tuning, direct queries to the data structure, called
unsafeFindandunsafeCanonicalizewould be introduced. With the documentation explaining that the onus is on the programmer to only call them on a “rebuilt” E-graph.
alt-romes
Metadata
Metadata
Assignees
Labels
No labels