Filter & Sort Counterexamples by Binders#272
Conversation
CatarinaGamboa
left a comment
There was a problem hiding this comment.
Can you add some before/after examples to the summary? To explain why the change
|
This is needed mainly to sort the counterexamples by binders, so they appear in the same order the binders appear in the error message. When there are multiple binders, the counterexamples appearing in the same order is nice for readability. It also simplifies the code quite a bit. However, with this change enum constants and static final constants no longer appear in the counterexample, which we discussed offline. For that I think we can have a separate simplification just for the expected type to be able to simplify aliases, enums, and static final constants. |
|
Also added the before/after example. |
c1e0b8d to
2d10334
Compare
2d10334 to
98c485e
Compare
|
Also added some tests for counterexamples. |
Description
This PR replaces the expression-based counterexample assignment filtering with VC-based that filters assignments using VC binders and sorts them by binder order.
Before
After
Type of change
Checklist
mvn testpasses locally