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

Parse error with let #77

Closed
aytey opened this issue Jul 19, 2021 · 4 comments
Closed

Parse error with let #77

aytey opened this issue Jul 19, 2021 · 4 comments

Comments

@aytey
Copy link

aytey commented Jul 19, 2021

For the following file:

( set-logic QF_LIA)
( declare-fun a () Int )
( declare-fun b () Bool )
(assert (let ( (c (ite b 1.0 2.0))) (= 0 (* 2 c))))
( check-sat )

Dolmen gives:

File "./test.smt2", line 4, character 25-28:
Error Unbound identifier: `1.0`
@Gbury
Copy link
Owner

Gbury commented Jul 19, 2021

The problem uses the QF_LIA logic, so only the integer coefficients are recognized by the arithmetic theory. Hence 1.0, a rational/real coefficient, which is not recognized by the integer arithmetic, is treated as any unbound name (exactly the same as if you had written some_not_declared_symbol instead).
I'll try and see if it's reasonable to emit a warning in such cases.

@aytey
Copy link
Author

aytey commented Jul 19, 2021

Yeah, you're right; I managed to confuse myself while writing another example.

If you want to close this as "noise", that seems totally reasonable to me -- the "error" is indeed correct.

@Gbury
Copy link
Owner

Gbury commented Jul 19, 2021

The warning seems like a good idea so i'll elt this issue open until I implement it.

@Gbury
Copy link
Owner

Gbury commented Jul 23, 2021

Ok, so PR #81 adds a hint in such cases, and the error message is now:

File "tests/regression/issue77/test.smt2", line 4, character 25-28:
Error Unbound identifier: `1.0`
      Hint: The current logic does not include real arithmtic

This should hopefully help users understand what is wrong in those cases.

@Gbury Gbury closed this as completed Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants