Skip to content

fix(core): handle unbounded discrete domains in subdomain checks - #1634

Open
Sahas2711 wants to merge 1 commit into
IBM:mainfrom
Sahas2711:fix/1632-discrete-domain-subdomain
Open

Sahas2711 wants to merge 1 commit into
IBM:mainfrom
Sahas2711:fix/1632-discrete-domain-subdomain

Conversation

@Sahas2711

Copy link
Copy Markdown

Summary

Fixes an issue where PropertyDomain.isSubDomain() raises a TypeError when a discrete domain has no domainRange.

Root Cause

The domain_values property attempts to call min(self.domainRange) when domainRange is None, causing TypeError: 'NoneType' object is not iterable. This affects subdomain comparisons for unbounded discrete domains.

Changes Made

  • Modified domain_values property to return None for unbounded discrete domains (no domainRange set)
  • Rewrote is_subdomain_of_discrete_domain function to handle None domain_values
  • Added proper handling for unbounded domains in subdomain checks
  • Binary domains now correctly handle {0, 1} against unbounded discrete domains

Testing

  • All 12 regression test cases pass
  • Existing subdomain behavior preserved
  • Overlap behavior verified with no regressions

Related Issue

Closes #1632

Signed-off-by: Sahas2711 <sahasnagar1234@gmail.com>
Copilot AI balanced review requested due to automatic review settings October 31, 2026 04:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

This branch has not been deployed

No deployments
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.

bug: PropertyDomain.isSubDomain raises TypeError for discrete domains without a domainRange

2 participants