-
Notifications
You must be signed in to change notification settings - Fork 43
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
Chopper #589
Conversation
@mschwerhoff I do not know who usually reviews silver PRs, so for now I just added you as a reviewer. |
@Felalolf @mschwerhoff What is the status of this? Can this make it for the July release? |
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.
I don't have time for a thorough review, but stumbled over a few things:
- The formatting of method and class signatures doesn't seem consistent, if it spans multiple lines: indentation, and whether or not the opening/closing parentheses are on the same line as the first/last parameter
- I saw what looked like a depth-first search, and we already have
def dfs(block: Block[S, E], index: Int = 0): Int = { - I saw what looked like a stronges connected component algorithm, and we already have a library for that -
Line 53 in 6428d2d
libraryDependencies += "org.jgrapht" % "jgrapht-core" % "1.5.0", // Graphs - I didn't see any high-level description of the chopper. Would be great to have more documentation, to avoid creating another "type checker & resolver" that nobody except Uri understands ... who left a while ago.
However, if the majority feels adding the chopper to the next release is important, I won't object.
@mschwerhoff I tried to make the formatting more consistent. Furthermore, I added a high-level description of the chopper. I do not think that I can just use the existing DFS algorithm because the chopper always computes additional information on top of the dfs traversal order. The strongly connected component algorithm can probably be replaced. However, I would first want to evaluate performance differences since my implementation should be rather optimized as it exploits details of the specific domain. Furthermore, such a refactoring would require quite some time that I do not have available right now. |
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.
LGTM, just added some comments/questions about the documentation.
Adds the chop function, which splits an input Viper program into several Viper programs.