Skip to content

Unit tests: verify complementary pair detection in AND/OR#8982

Merged
tautschnig merged 1 commit intodiffblue:developfrom
tautschnig:simplifier/complementary-pairs
Apr 30, 2026
Merged

Unit tests: verify complementary pair detection in AND/OR#8982
tautschnig merged 1 commit intodiffblue:developfrom
tautschnig:simplifier/complementary-pairs

Conversation

@tautschnig
Copy link
Copy Markdown
Collaborator

Add unit tests confirming that the simplifier detects complementary pairs in boolean AND/OR expressions:
A || !A -> true
A && !A -> false
A || (B || !A) -> true (after flattening by join_operands)

This is already handled by the existing 'search for a and !a' loop in simplify_boolean(). The tests document and protect this behavior.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@tautschnig tautschnig self-assigned this Apr 27, 2026
Copilot AI review requested due to automatic review settings April 27, 2026 12:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.50%. Comparing base (a6531d4) to head (a5834d1).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8982   +/-   ##
========================================
  Coverage    80.50%   80.50%           
========================================
  Files         1704     1704           
  Lines       188796   188816   +20     
  Branches        73       73           
========================================
+ Hits        151993   152013   +20     
  Misses       36803    36803           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kroening
Copy link
Copy Markdown
Collaborator

We'll want a variant of namespacet that's simply empty.

Add unit tests confirming that the simplifier detects complementary
pairs in boolean AND/OR expressions:
  A || !A -> true
  A && !A -> false
  A || (B || !A) -> true  (after flattening by join_operands)

This is already handled by the existing 'search for a and !a' loop
in simplify_boolean(). The tests document and protect this behavior.

Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
@tautschnig tautschnig force-pushed the simplifier/complementary-pairs branch from 994b4ad to a5834d1 Compare April 30, 2026 10:12
@tautschnig tautschnig merged commit beacad5 into diffblue:develop Apr 30, 2026
43 checks passed
@tautschnig tautschnig deleted the simplifier/complementary-pairs branch April 30, 2026 11:56
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.

3 participants