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
My use case requires a complicated struct for the analysis value. However, when you use a struct, the default equality to compare them is object equality. This causes an infinite loop in the analyze! code because it believes that the analysis value keeps changing.
The fix that I've found is to define a special Egraphs.isequal() function to properly define equality between my structs. This may not be intuitive though for future users, so you may want to update the documentation to include this workaround for struct-valued analyses.
The text was updated successfully, but these errors were encountered:
Sorry for the slow response, I just tested it, and autohashequals worked for me! I'm a little hesitant about it because of the effects that it has on storing objects in dicts, but it works great for now. Thanks for putting the effort into this package by the way. It's been really helpful for my research.
My use case requires a complicated struct for the analysis value. However, when you use a struct, the default equality to compare them is object equality. This causes an infinite loop in the analyze! code because it believes that the analysis value keeps changing.
The fix that I've found is to define a special Egraphs.isequal() function to properly define equality between my structs. This may not be intuitive though for future users, so you may want to update the documentation to include this workaround for struct-valued analyses.
The text was updated successfully, but these errors were encountered: