Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixed bug in textinput::adjust_vertical concerning selection_origin #22458
I discovered the bug and figured out how it fix it using formal verification. More precisely, I manually translated the Rust code in a F* program that was functionally equivalent. Then I used the
I managed to prove automatically (using the Z3 backend of F*) that the post-condition held for all the functions except for
I also added a simple unit test that would fail without this patch, and observed that the assertion failures noted in #22457 disappeared with this patch.
This verification work also allows me to say that the code of all the functions is now functionally correct in the sense that they all yield a valid selection in the sense of