-
Notifications
You must be signed in to change notification settings - Fork 63
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
Could not match specified value with actual value #701
Comments
I've boiled this down to an issue with #include <stdint.h>
uint32_t *f(uint32_t *x) {
return x;
} let f_pre_spec = do {
x0 <- crucible_fresh_var "x0" (llvm_int 32);
let x = crucible_array [crucible_term x0];
xp <- crucible_alloc (llvm_array 1 (llvm_int 32));
crucible_points_to xp x;
crucible_execute_func [xp];
x' <- crucible_fresh_var "x'" (llvm_array 1 (llvm_int 32));
crucible_points_to xp (crucible_term x');
crucible_return (xp);
};
let f_post_spec = do {
x <- crucible_fresh_var "x" (llvm_array 1 (llvm_int 32));
xp <- crucible_alloc (llvm_array 1 (llvm_int 32));
crucible_points_to xp (crucible_term x);
crucible_execute_func [xp];
x0' <- crucible_fresh_var "x0'" (llvm_int 32);
let x' = crucible_array [crucible_term x0'];
crucible_points_to xp x';
crucible_return (xp);
};
m <- llvm_load_module "test.bc";
f_pre_result <- crucible_llvm_verify m "f" [] true f_pre_spec z3;
f_post_result <- crucible_llvm_verify m "f" [] true f_post_spec z3; $ saw test.saw
[18:52:28.530] Loading file "701_simple/test.saw"
[18:52:28.536] Verifying f ...
[18:52:28.536] Simulating f ...
[18:52:28.540] Checking proof obligations f ...
[18:52:28.540] Proof succeeded! f
[18:52:28.541] Verifying f ...
[18:52:28.541] Simulating f ...
[18:52:28.545] "crucible_llvm_verify" (701_simple/test.saw:32:18-32:38):
at 701_simple/test.saw:32:18
could not match specified value with actual value:
actual (simulator) value: [symbolic integer: width = 32]
specified value: [x0' : [32]]
type of actual value: [1 x i32]
type of specified value: [1 x i32] |
One thing that's going on here that makes it hard to debug is that the "actual (simulator) value" printouts describe symbolic values as just "symbolic integer" or something similar, which makes it hard to tell where they're coming from. One first step would be to change those to be sure to include their names. |
Having looked at this a little more careful, I think it's something that should work but doesn't right now. I suspect it may be due to unfortunate interactions between two different term representations (SAWCore and What4). I wonder if @brianhuffman has any thoughts about this. Could it be due to a difference in the translation of a single integer from SAWCore to What4 vs. a vector of one integer? |
@atomb I hope you're not stuck on the specific message (copied below).
|
The case for array values was simply missing from the As of 32f53e2, the
|
Maybe related to #519 ?
The text was updated successfully, but these errors were encountered: