-
Notifications
You must be signed in to change notification settings - Fork 150
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
Mergeable heuristic in KCFGSemantics for merging node #4612
Conversation
I don't think it makes sense to merge this without also having some tests of it somehow. Do you have an example of IMP node merging worknig, or another simple definition? |
I tested this on an actual Solidity program a few days ago. However, this PR primarily introduces an interface to define the heuristic, which can't be tested without the merge_node function. Since the new interface results in many test changes, I plan to submit a separate PR for those. |
@@ -34,6 +34,11 @@ def custom_step(self, c: CTerm) -> KCFGExtendResult | None: ... | |||
|
|||
"""Implement a custom semantic step.""" | |||
|
|||
@abstractmethod | |||
def is_mergeable(self, c1: CTerm, c2: CTerm) -> bool: ... |
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 PR only introduces an interface. Its semantics will be determined by the merge_node function, which will be provided in another PR.
Well we can wait for the merging funcitonality to be ready to go, and merged, then merge this new interface and some tests of it with the node merging. This will trigger needed changes downstream, because each of the downstream semantics will have to now implement this interface, and we don't know if it's fully working yet. Once #4617 and #4621 are merged, we can then have this PR introduce both the |
Thank you for your suggestion! I'll follow your advice. |
Subsumed by: #4628 |
This is a simple PR for merging nodes, offering a semantics-level heuristic to partition nodes that can be merged.