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
ttaubert opened this issue
Mar 20, 2016
· 3 comments
Assignees
Labels
obsoleteIssues that involve/depend on deprecated code, such that they are not worth pursuingwontfixClosed issues that we decided not to fix, but are still potentially relevant
One might be able to reproduce without the struct, but due to #106 I can't use llvm_assert_eq with an argument. Now here's the SAW code to verify that function with s->len = 1:
llvm_verify m "test" [] do {
llvm_ptr "s" (llvm_struct "struct.str");
len <- llvm_var "s->0" (llvm_int 8);
llvm_sat_branches true;
llvm_assert {{ len == 1 }};
llvm_return {{ 0:[8] }};
llvm_verify_tactic abc;
};
It seems to loop forever, at least doesn't finish in an appropriate amount of time. It does however finish very fast when you replace llvm_assert {{ len == 1 }} with llvm_assert_eq "s->0" {{ 1:[8] }}. It seems like those two shouldn't yield a behavior that different, right?
Trying to verify the function's behavior for llvm_assert {{ len > 0 }} doesn't finish either. I hope that might be fixed as well with this issue as there's no way to define this assertion with llvm_assert_eq.
The text was updated successfully, but these errors were encountered:
At the moment, llvm_assert creates pre-conditions that are used during verification but not symbolic execution, leading to this behavior, while llvm_assert_eq actually changes the symbolic state. Although this is the "intended" behavior in some sense, I think we're seeing enough cases where assertions are important for termination (or safety) to suggest that it's not the right behavior.
The reason for the quickcheck behavior you're seeing is that the random testing occurs on the model of the program, after symbolic execution, not directly on the C code. So if symbolic execution doesn't terminate, the random testing never runs.
obsoleteIssues that involve/depend on deprecated code, such that they are not worth pursuingwontfixClosed issues that we decided not to fix, but are still potentially relevant
Assume a function with a loop:
One might be able to reproduce without the struct, but due to #106 I can't use llvm_assert_eq with an argument. Now here's the SAW code to verify that function with
s->len = 1
:It seems to loop forever, at least doesn't finish in an appropriate amount of time. It does however finish very fast when you replace
llvm_assert {{ len == 1 }}
withllvm_assert_eq "s->0" {{ 1:[8] }}
. It seems like those two shouldn't yield a behavior that different, right?Trying to verify the function's behavior for
llvm_assert {{ len > 0 }}
doesn't finish either. I hope that might be fixed as well with this issue as there's no way to define this assertion with llvm_assert_eq.The text was updated successfully, but these errors were encountered: