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

Surprising warnings about unused variables #22

Open
fpottier opened this issue Feb 16, 2022 · 0 comments
Open

Surprising warnings about unused variables #22

fpottier opened this issue Feb 16, 2022 · 0 comments

Comments

@fpottier
Copy link

Is this valid Gospel?

let foo () =
  (0, 1)
(*@ (a, b) = foo()
    ensures a = 0
    ensures b = 1 *)

When I feed this into Cameleer, I get these warnings:

File "/Users/fpottier/dev/inferno/src/Bar.ml", line 3, characters 5-6:
warning: unused variable b
File "/Users/fpottier/dev/inferno/src/Bar.ml", line 3, characters 2-3:
warning: unused variable a

Yet, verification (with Z3) succeeds. The warnings are surprising because the variables a and b are actually used in the two ensures clauses. Furthermore, the locations of the warnings are incorrect (the line number seems correct but the column numbers are off).

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

No branches or pull requests

1 participant