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

MOS-1864: Fix partial pattern application in matcher #35

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

kniazkov
Copy link
Member

@kniazkov kniazkov commented Dec 3, 2024

Cool Story:
Even if the pattern itself is correct, it may be applied incorrectly if it is partially matched in some cases. During pattern application, the matcher collects the actions that need to be executed. If the pattern cannot be fully applied to a subtree, but there's a partial match, the list of actions may still include actions that were found before it became clear that the pattern couldn't be applied. These actions will remain in the list and be executed, leading to an incorrect final tree. This is a bug.

Task:
Fix the matcher to ensure that when a pattern is only partially applicable, no actions are executed that were collected prior to determining that the pattern cannot be fully applied. This will prevent incorrect actions from being included in the final execution.

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (4c6c981) to head (927daa1).
Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##              master       #35   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity       721       723    +2     
===========================================
  Files             70        70           
  Lines           2148      2158   +10     
  Branches         321       323    +2     
===========================================
+ Hits            2148      2158   +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kniazkov kniazkov merged commit bd907ff into cqfn:master Dec 3, 2024
3 checks passed
@kniazkov
Copy link
Member Author

kniazkov commented Dec 3, 2024

@rultor merge, tag is 1.2.5

@rultor
Copy link
Collaborator

rultor commented Dec 3, 2024

@rultor merge, tag is 1.2.5

@kniazkov The pull request is closed already, so I can't merge it.

@rultor
Copy link
Collaborator

rultor commented Dec 3, 2024

@rultor merge, tag is 1.2.5

@kniazkov I'm sorry, I don't understand you :( Check this page and try again please.

@kniazkov
Copy link
Member Author

kniazkov commented Dec 3, 2024

@rultor release this shit, tag is 1.2.5

@rultor
Copy link
Collaborator

rultor commented Dec 3, 2024

@rultor release this shit, tag is 1.2.5

@kniazkov OK, I will release it now. Please check the progress here.

@rultor
Copy link
Collaborator

rultor commented Dec 3, 2024

@rultor release this shit, tag is 1.2.5

@kniazkov Done! FYI, the full log is here (took me 10min).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants