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
The Nominal Adapton interface is broken for functions cell and thunk. This is my fault. Kyle has been aware of this for a while, but we haven’t prioritized fixing it. Now, it’s biting Nick.
The problem is that both functions take a name, and then ignore it, rather than use it to memorize the art that they return, as they should do.
In particular, the function nm_tree creates a memo table that memoizes tree structures based on a name. It does something close to what cell should do.
Nick, I think you can adapt this code to get memo tables that are keyed on names. In particular, something like this:
The Nominal Adapton interface is broken for functions
cell
andthunk
. This is my fault. Kyle has been aware of this for a while, but we haven’t prioritized fixing it. Now, it’s biting Nick.The problem is that both functions take a name, and then ignore it, rather than use it to memorize the art that they return, as they should do.
In the meantime, here’s a workaround that I used for AVL trees:
https://github.com/plum-umd/adapton.ocaml/blob/master/Source/adapton_structures/SpreadTree.ml#L1430
In particular, the function
nm_tree
creates a memo table that memoizes tree structures based on a name. It does something close to whatcell
should do.Nick, I think you can adapt this code to get memo tables that are keyed on names. In particular, something like this:
That should give you a memo table where the same name yields the same thunk (physically).
The text was updated successfully, but these errors were encountered: