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

API: Could yices_assert_blocking_clause return the clause? #393

Open
disteph opened this issue Dec 8, 2021 · 0 comments
Open

API: Could yices_assert_blocking_clause return the clause? #393

disteph opened this issue Dec 8, 2021 · 0 comments
Assignees
Milestone

Comments

@disteph
Copy link
Contributor

disteph commented Dec 8, 2021

When interacting with Yices purely through the API, I think the only way to know which assertions have been added to a Yices context (which in that respect is somewhat of a black box) is to track those assertions externally, recording them when calling primitives like yices_assert_formula (+ track the pushes and pops if need be).

This works fine except for yices_assert_blocking_clause, which I think is the only primitive that adds an assertion to a Yices context without the caller having ever access to the said blocking clause as a Yices term. That throws off the effort to track the assertions in a Yices context.

Since the primitive just returns 0 in case of success, and -1 in case of error, I was wondering if we could make the primitive return the blocking clause instead of 0. This would barely change the use of the primitive, in that the only situation where we technically wouldn't be backward-compatible is if the user was testing the success of the call with v == 0 instead of v >= 0, where v is the returned value. Is this correct?

Is the blocking clause readily available under the hood of the API?
Thoughts?

@ahmed-irfan ahmed-irfan added this to the Yices 2.7 milestone Sep 28, 2022
@ahmed-irfan ahmed-irfan self-assigned this Jun 28, 2023
@ahmed-irfan ahmed-irfan linked a pull request Jun 30, 2023 that will close this issue
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 a pull request may close this issue.

2 participants