[go: up one dir, main page]

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 model unsoundness in bounded set quantification #11268

Merged
merged 9 commits into from
Oct 8, 2024

Conversation

ajreynol
Copy link
Member
@ajreynol ajreynol commented Oct 7, 2024

This bug was introduced in #2200. The PR #10586 modified our handling of set+cardinality+quantifiers but did not fix the issue.

In the former PR, we incorrectly computed the cardinality of set values. In the latter PR, we no longer introduced set.card terms when finding finite bounds for bounded set quantification, to avoid issues of incompleteness at the quantifier-free level. However, in doing so, we could ignore cardinality for bounds altogether, potentially leading to model unsoundness.

This PR keeps cardinality in bounding terms, but eliminates literals of the form (set.card S) < n eagerly, based on finite unions of set.choose terms.

(set-option :finite-model-find true)
(set-option :fmf-bound true)
(declare-const r (Set (Tuple Int)))
(declare-const M (Set (Tuple Int Bool)))
Copy link
Contributor

Choose a reason for hiding this comment

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

This line can be deleted

Copy link
Contributor
@mudathirmahgoub mudathirmahgoub left a comment

Choose a reason for hiding this comment

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

LGTM

@ajreynol ajreynol added this pull request to the merge queue Oct 8, 2024
@ajreynol ajreynol removed this pull request from the merge queue due to a manual request Oct 8, 2024
@ajreynol ajreynol added this pull request to the merge queue Oct 8, 2024
Merged via the queue into cvc5:main with commit 6c6e365 Oct 8, 2024
11 checks passed
@ajreynol ajreynol deleted the bintCharSet branch October 8, 2024 14:29
tomerH98 pushed a commit to tomerH98/cvc5_nesteddt that referenced this pull request Oct 28, 2024
This bug was introduced in cvc5#2200. The
PR cvc5#10586 modified our handling of
set+cardinality+quantifiers but did not fix the issue.

In the former PR, we incorrectly computed the cardinality of set values.
In the latter PR, we no longer introduced set.card terms when finding
finite bounds for bounded set quantification, to avoid issues of
incompleteness at the quantifier-free level. However, in doing so, we
could ignore cardinality for bounds altogether, potentially leading to
model unsoundness.

This PR keeps cardinality in bounding terms, but eliminates literals of
the form `(set.card S) < n` eagerly, based on finite unions of
`set.choose` terms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major Priority moderate Complexity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants