Skip to content

move range_typet to mathematical_types.h#9000

Merged
kroening merged 3 commits intodevelopfrom
move-range_typet
May 5, 2026
Merged

move range_typet to mathematical_types.h#9000
kroening merged 3 commits intodevelopfrom
move-range_typet

Conversation

@kroening
Copy link
Copy Markdown
Collaborator

@kroening kroening commented May 5, 2026

The header file mathematical_types.h is a better fit for range_typet, the type for subranges of integers.

  • 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/
  • n/a 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.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

❌ Patch coverage is 60.71429% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.52%. Comparing base (a124dc7) to head (6d57b8c).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/util/mathematical_types.cpp 50.00% 8 Missing ⚠️
src/util/mathematical_types.h 75.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #9000   +/-   ##
========================================
  Coverage    80.52%   80.52%           
========================================
  Files         1705     1705           
  Lines       188927   188927           
  Branches        73       73           
========================================
  Hits        152136   152136           
  Misses       36791    36791           

☔ 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 and others added 3 commits May 5, 2026 17:30
The header file mathematical_types.h is a better fit for range_typet, the
type for subranges of integers.
In mathematical_types.h the declarations of set_from, set_to and the
range_typet constructor used a mix of '_from'/'_to' (with leading
underscore) and 'from'/'to'. The definitions in mathematical_types.cpp
consistently use 'from'/'to' without the leading underscore. Drop the
underscores from the header so that both files agree on a single style,
which makes the signatures easier to read and keeps IDE/Doxygen output
consistent.

Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
The previous one-line description ('A type for subranges of integers')
did not state that the interval is closed on both ends, and it did not
document the preconditions on zero_expr() / one_expr() that are enforced
at runtime via PRECONDITION. Add class- and method-level Doxygen that
makes inclusivity explicit and spells out that zero_expr() / one_expr()
require 0 / 1 to lie within the interval.

No behavioural change.

Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
@kroening kroening merged commit 5556082 into develop May 5, 2026
43 of 44 checks passed
@kroening kroening deleted the move-range_typet branch May 5, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants