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

Handling of set-option :global-declarations #186

Open
Stevendeo opened this issue Sep 29, 2023 · 0 comments
Open

Handling of set-option :global-declarations #186

Stevendeo opened this issue Sep 29, 2023 · 0 comments
Assignees
Labels

Comments

@Stevendeo
Copy link

The SMT standard states (https://smtlib.cs.uiowa.edu/papers/smt-lib-reference-v2.6-r2017-07-18.pdf#page=56) :

Popping that assertion level removes them. As an alternative, declarations and definitions can all be made global by running the solver with the option :global-declarations set to true. When running with this option set, all declarations and definitions become permanent. That is, they survive any pop operations on the assertion stack as well as invocations of reset-assertions and can only be removed by a global reset, achieved with the reset command.

The following example fails :

(set-logic ALL)
(set-option :global-declarations)
(push 1)
(declare-const x Int)
(pop 1)
(assert (= x x))

with the error Unbound identifier x. Same goes with the following example :

(set-logic ALL)
(set-option :global-declarations)
(declare-const x Int)
(reset-assertions)
(assert (= x x))
@Gbury Gbury self-assigned this Sep 29, 2023
@Gbury Gbury added the bug label Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants