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

Fix bug in justification analysis, address issue #211. #220

Merged
merged 3 commits into from
Jul 16, 2020
Merged

Conversation

AntoniusW
Copy link
Collaborator

Justification analysis used erroneously specific atom to test whether a given substitution is excluded by a more general one. Now a more general atom is constructed for the test. This fixes issue #211, this fix/PR is independent of the phase saving and restarts branch as the bug was just unearthed there but is present in master, too.

- AnalyzeUnjustified uses more general atom to test for exclusion due to
  prior analysis, i.e., less atoms are (falsely) discarded.
- Unifier can report which variables are mapped.
@codecov
Copy link

codecov bot commented Feb 10, 2020

Codecov Report

Merging #220 into master will increase coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #220      +/-   ##
============================================
+ Coverage     79.00%   79.11%   +0.11%     
- Complexity     2071     2075       +4     
============================================
  Files           145      145              
  Lines          6582     6593      +11     
  Branches       1152     1153       +1     
============================================
+ Hits           5200     5216      +16     
+ Misses          979      976       -3     
+ Partials        403      401       -2     
Impacted Files Coverage Δ Complexity Δ
...r/alpha/grounder/structure/AnalyzeUnjustified.java 94.42% <0.00%> (+2.14%) 52.00% <0.00%> (+2.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c27810...f440077. Read the comment docs.

Copy link
Collaborator

@rtaupe rtaupe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this important bugfix.
It would be helpful to have a unit test that fails without this fix and succeeds with it. Could you provide one?

@AntoniusW AntoniusW changed the title Fix bug in justification analysis, address issue #211. WIP:Fix bug in justification analysis, address issue #211. Feb 13, 2020
- Test whether an atom is excluded using all variables occurring in the
  unifier.
@AntoniusW AntoniusW changed the title WIP:Fix bug in justification analysis, address issue #211. Fix bug in justification analysis, address issue #211. Feb 15, 2020
@AntoniusW
Copy link
Collaborator Author

Since I did not find the time to construct a minimal working example / failing unit test for this issue in the last months and we have 100% coverage anyway, I'd like to suggest merging this PR sometime soon-ish (@rtaupe).

@rtaupe rtaupe merged commit b642729 into master Jul 16, 2020
@rtaupe rtaupe deleted the issue211 branch July 16, 2020 14:26
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