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 double notify in equality engine #4036

Merged
merged 6 commits into from Mar 12, 2020
Merged

Fix double notify in equality engine #4036

merged 6 commits into from Mar 12, 2020

Conversation

ajreynol
Copy link
Member

@ajreynol ajreynol commented Mar 11, 2020

Fixes #3955.

Previously we were getting two calls to notifyNewEqClass from the equality engine for new application nodes, since the notification was being done in an internal call to newNode(...). The proper place to call this is in addTermInternal(...) which is called only once per Node per SAT context.

This bug potentially impacted some performance (due to redundant calls), and also broke the contract that notifyNewEqClass should only be called once per node per SAT context. In most cases, this was being handled in a benign way by theory solvers, although an assertion was failing in EqualityQuery, which is fixed by this PR.

A block of code changed indentation in this commit.

@ajreynol ajreynol added minor Priority simple Complexity labels Mar 11, 2020
@ajreynol ajreynol requested a review from 4tXJ7f March 11, 2020 19:55
Copy link
Member

@4tXJ7f 4tXJ7f left a comment

Choose a reason for hiding this comment

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

LGTM, this seems like a good thing to fix :)

@4tXJ7f 4tXJ7f merged commit 08431f8 into cvc5:master Mar 12, 2020
@ajreynol ajreynol deleted the fix3955 branch March 12, 2020 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Priority simple Complexity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

snorm-infer-eq fatal failure at src/theory/quantifiers/equality_infer.cpp:144
2 participants