-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Set/ValueVec support searching distinct typed elements #657
base: master
Are you sure you want to change the base?
Conversation
- add best_effort_normalize_and_compare to SetEnumValue - add specialized Exception type to avoid catching other TLCRuntimeExceptions - relax equals() - returns false instead of throwing - add more advanced tests - nested sets
- more of the same but have to confirm if correct
1df8870
to
0f65479
Compare
57eb8d1
to
073dc01
Compare
@@ -274,6 +329,8 @@ public final Value normalize() { | |||
return this; | |||
} | |||
catch (RuntimeException | OutOfMemoryError e) { | |||
// reset isNorm since it failed | |||
this.isNorm = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fixes un-normalized sets being classified as normalized, issue in latest main
99e4368
to
06dce77
Compare
@lalo We appreciate your efforts and willingness to contribute. :-) Note though that we are generally very, very careful when it comes to changing the core of TLC. Without judging the quality of this PR (I haven't looked at it), please don't be discouraged should we decide that the proposed changes are too risky to be accepted. Real-world specs tend to be "well-typed". |
8700960
to
e907eb9
Compare
1fa1698
to
fccbecc
Compare
fccbecc
to
566f4de
Compare
I understand. It would be nice to see a spec that gets broken with this change, or have the full CI run to see how much damage this change is making. I've only ran the REPLtest and played around with the REPL. |
Tests only ever confirm the presence of bugs, but you can run the TLC test suite with: |
tlaplus/tlatools/org.lamport.tlatools/test/tlc2/debug/EWD840ErrorActionDebuggerTest.java Line 74 in 3ad453f
This would return false now instead of raising exception. |
The goal of this assertion is to test that the debugger raises an error on silly expressions. Thus, you could simply replace this particular expression with another silly expression. |
bd71c07
to
0a543cc
Compare
See diff of tlatools/org.lamport.tlatools/test/tlc2/REPLTest.java for more info.