prusti-dev
prusti-dev copied to clipboard
Implement normalization of position ids in the server
@JonasAlaif This PR implements the second normalization described in https://github.com/viperproject/prusti-dev/pull/971#issuecomment-1146060967. A lot of the new code is boilerplate to visit all positions of a program.
Unfortunately, the Program that is seen by the server is an enum of legacy::Program and low::Program, which makes the code a bit messy. The normalization is implemented only for the legacy::Program case, but the same logic can also be implemented for low::Program.
The naming of the various mut/fallible walker/visitor/folder passes is not always consistent. I think we should refactor them in the future to only have visitor, visitor_mut, fallible_mut_visitor, removing the "walker".
@JonasAlaif feel free to do whatever you want with this PR :)
I'm going to say that these inefficiencies are all pretty small and also in legacy so it's ok
bors r+