File tree Expand file tree Collapse file tree 7 files changed +11
-23
lines changed
intTests/test2028_vacuity_detect
saw-central/src/SAWCentral/Crucible/LLVM Expand file tree Collapse file tree 7 files changed +11
-23
lines changed Original file line number Diff line number Diff line change 1
- all : test.bc test.linked-mir.json Test.class
2
-
3
- test.bc : test.c
4
- clang -emit-llvm -c -o $@ $<
1
+ all : test.linked-mir.json Test.class
5
2
6
3
test.linked-mir.json : test.rs
7
4
saw-rustc $<
Original file line number Diff line number Diff line change 1
- This test checks for vacuous proofs across LLVM, MIR, and JVM backends.
1
+ This test checks for vacuous proofs in the MIR, and JVM backends. It skips
2
+ LLVM as that is already tested in test0064.
2
3
3
4
It corresponds to issue https://github.com/GaloisInc/saw-script/issues/2028
4
5
5
- Each function includes a contradictory precondition (e.g., x != x), and SAW should detect this
6
- and emit a vacuity warning before successfully proving the function.
6
+ Each function includes a contradictory precondition (e.g., x != x), and SAW
7
+ should detect this and emit a vacuity warning before successfully proving the
8
+ function.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
// test.saw
2
2
enable_experimental;
3
3
4
- let fun_c_spec = do {
5
- x <- llvm_fresh_var "x" (llvm_int 32);
6
- llvm_precond {{ x != x }};
7
- llvm_execute_func [];
8
- };
9
- llvm_mod <- llvm_load_module "test.bc";
10
- llvm_verify llvm_mod "fun_c" [] false fun_c_spec z3;
11
-
12
4
let fun_rs_spec = do {
13
5
x <- mir_fresh_var "x" mir_u32;
14
6
mir_precond {{ x != x }};
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- n=$( " $SAW " --detect-vacuity test.saw 2>&1 | tee /dev/stderr | grep -c " Contradiction detected" )
3
+ n=$( $SAW --detect-vacuity test.saw 2>&1 | tee /dev/stderr | grep -c " Contradiction detected" )
4
4
5
- if [ " $n " -eq 3 ]; then
6
- echo " Found 3 expected contradictions"
5
+ if [ " $n " -eq 2 ]; then
6
+ echo " Found 2 expected contradictions"
7
7
exit 0
8
8
else
9
- echo " Expected 3 contradictions, found $n "
9
+ echo " Expected 2 contradictions, found $n "
10
10
exit 1
11
11
fi
Original file line number Diff line number Diff line change @@ -175,8 +175,6 @@ import qualified Lang.Crucible.LLVM.Translation as Crucible
175
175
176
176
import qualified SAWCentral.Crucible.LLVM.CrucibleLLVM as Crucible
177
177
178
- import qualified SAWCentral.Crucible.Common.Vacuity as Vacuity
179
-
180
178
-- parameterized-utils
181
179
import qualified Data.Parameterized.TraversableFC as Ctx
182
180
@@ -212,6 +210,7 @@ import SAWCentral.Crucible.Common.MethodSpec (SetupValue(..))
212
210
import SAWCentral.Crucible.Common.Override
213
211
import qualified SAWCentral.Crucible.Common.Setup.Builtins as Setup
214
212
import qualified SAWCentral.Crucible.Common.Setup.Type as Setup
213
+ import qualified SAWCentral.Crucible.Common.Vacuity as Vacuity
215
214
216
215
import SAWCentral.Crucible.LLVM.Override
217
216
import SAWCentral.Crucible.LLVM.ResolveSetupValue
You can’t perform that action at this time.
0 commit comments