You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loading module Cryptol
Loading file "/private/tmp/the.saw"
WARNING: skipping simulation of @g
When verifying @test:
Proof of return value failed.
Counterexample:
lss__return_g: 4294967295
lss__return_g: 0
return value
Encountered: 0
Expected: 1
saw: user error ("llvm_verify" (/private/tmp/the.saw:15:7):
Proof failed.)
As the title says, I believe the two separate calls to g are being treated as separate uninterpreted functions. I have not examined what is being delivered to the solver (is there a flag for that?).
The text was updated successfully, but these errors were encountered:
Perhaps it's something that needs to be better documented, but the behavior of llvm_return_arbitrary isn't exactly the same as an uninterpreted function. It's intended especially to be used in cases where we don't know, don't care, or can't even refer to the mechanism by which the return value is derived (as might be the case for I/O functions). So we don't require that the user has specified all possible inputs to the function, and therefore we can't guarantee that the real code will always return the same result given the same actual parameters.
To treat g as being modeled by an uninterpreted function of its argument, you could use llvm_return {{ f v3 }}, where f is some function that either has no definition or an ignored definition. Then you can use unint_z3 ["f"] as the verification tactic to indicate that f should be treated as uninterpreted.
In the previous setup, the additional imports to append to the preamble were
added manually and not part of the translation configuration. This makes it so
that those can be specified in the configuration.
Consider the C code that says
g(x)-g(x) == 0
. (N.B. simpler claims such asg x = g x
also exhibit the same issue as shown below)Using the saw script:
The clang and saw commands:
The result:
As the title says, I believe the two separate calls to
g
are being treated as separate uninterpreted functions. I have not examined what is being delivered to the solver (is there a flag for that?).The text was updated successfully, but these errors were encountered: