Skip to content
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

[Restructuring] Resolve unresolved reaching conditions #407

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

closes #28

@github-actions github-actions bot added feature-request New feature or request priority-low Low priority issue labels Apr 19, 2024
@ebehner
Copy link
Collaborator

ebehner commented Apr 25, 2024

The first example of the Issue does decompile differently now, such the problem does not exist.
The question is whether we want to still consider cases like this:

Pro: Would improve readability if both branches have the same sub-expression, as it could be moved up as a reaching-condition of the condition-node

Contra: Increase of the runtime. Whenever we introduce a new condition node, we have to check whether its children have a common sub-expression. In case both children are no sequence-nodes, we have to check for two nodes whether they have a common sub-expression, i.e., we compare each clause. However, due to strange simplifications this may not be sufficient, but would at least get us some of these cases. But, if one child is a sequence node, we have to check this for all children.

Question: Do we want to implement this for none, some or all cases? A good compromise could be to only check for equal clauses, and maybe miss some. Additionally, we could restrict this to condition-nodes where both children are no sequence-nodes.

The second part is implemented and ready for review. No matter what the decision is, I would suggest writing a new Issue for the first part, since it is already quite a long PR.

@ebehner ebehner marked this pull request as ready for review April 25, 2024 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request priority-low Low priority issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Restructuring] Resolve unresolved reaching conditions
1 participant