Commit 590a8eb5 authored by Clément Fumex's avatar Clément Fumex

- Add nth_bv_def and eq_sub_bv_def axioms to bv.BV_Gen and remove nth_bv

  definitions in smtlib-bv driver.
- Add no-bv.gen driver file targeted to provers without support for
  the smtlib bv theory (or for the no_bv variants).
- update realization & tests
parent 34ca0de3
(* Driver for Alt-Ergo version >= 0.95 *)
import "alt_ergo_common.drv"
import "no-bv.gen"
theory BuiltIn
......
......@@ -8,6 +8,7 @@ prelude "(set-logic AUFNIRA)"
*)
import "smt-libv2.drv"
import "no-bv.gen"
import "discrimination.gen"
transformation "inline_trivial"
......
(* Why3 driver for noBV alternatives on bit-vector theories *)
theory bv.BV_Gen
remove prop nth_bv_def
remove prop eq_sub_bv_def
remove prop to_uint_add
remove prop to_uint_sub
remove prop to_uint_mul
end
\ No newline at end of file
......@@ -22,16 +22,25 @@ theory bv.BV_Gen
(* Warning: we should NOT remove all the axioms using "allprops" *)
remove prop size_pos
remove prop nth_out_of_bound
remove prop Nth_zero
remove prop Nth_ones
remove prop two_power_size_val
remove prop max_int_val
remove prop eq_sub_equiv
remove prop Nth_bw_or
remove prop Nth_bw_and
remove prop Nth_bw_xor
remove prop Nth_bw_not
remove prop Lsr_nth_low
remove prop Lsr_nth_high
remove prop lsr_zero
remove prop Asr_nth_low
remove prop Asr_nth_high
remove prop asr_zero
remove prop Lsl_nth_low
remove prop Lsl_nth_high
remove prop lsl_zero
remove prop Nth_rotate_left
remove prop Nth_rotate_right
......@@ -72,12 +81,6 @@ theory bv.BV64
syntax function zero "#x0000000000000000"
syntax function ones "#xFFFFFFFFFFFFFFFF"
syntax function nth_bv
"(not (= (bvand (bvlshr %1 %2) (_ bv1 64)) (_ bv0 64)))"
(* possible alternative definition :
"(= ((_ extract 0 0) (bvlshr %1 %2)) (_ bv1 1))"
*)
syntax function rotate_left_bv "(bvor (bvshl %1 (bvurem %2 (_ bv64 64))) (bvlshr %1 (bvsub (_ bv64 64) (bvurem %2 (_ bv64 64)))))"
syntax function rotate_right_bv "(bvor (bvlshr %1 (bvurem %2 (_ bv64 64))) (bvshl %1 (bvsub (_ bv64 64) (bvurem %2 (_ bv64 64)))))"
end
......@@ -88,9 +91,6 @@ theory bv.BV32
syntax function zero "#x00000000"
syntax function ones "#xFFFFFFFF"
syntax function nth_bv
"(not (= (bvand (bvlshr %1 %2) (_ bv1 32)) (_ bv0 32)))"
syntax function rotate_left_bv "(bvor (bvshl %1 (bvurem %2 (_ bv32 32))) (bvlshr %1 (bvsub (_ bv32 32) (bvurem %2 (_ bv32 32)))))"
syntax function rotate_right_bv "(bvor (bvlshr %1 (bvurem %2 (_ bv32 32))) (bvshl %1 (bvsub (_ bv32 32) (bvurem %2 (_ bv32 32)))))"
end
......@@ -101,9 +101,6 @@ theory bv.BV16
syntax function zero "#x0000"
syntax function ones "#xFFFF"
syntax function nth_bv
"(not (= (bvand (bvlshr %1 %2) (_ bv1 16)) (_ bv0 16)))"
syntax function rotate_left_bv "(bvor (bvshl %1 (bvurem %2 (_ bv16 16))) (bvlshr %1 (bvsub (_ bv16 16) (bvurem %2 (_ bv16 16)))))"
syntax function rotate_right_bv "(bvor (bvlshr %1 (bvurem %2 (_ bv16 16))) (bvshl %1 (bvsub (_ bv16 16) (bvurem %2 (_ bv16 16)))))"
end
......@@ -114,9 +111,6 @@ theory bv.BV8
syntax function zero "#x00"
syntax function ones "#xFF"
syntax function nth_bv
"(not (= (bvand (bvlshr %1 %2) (_ bv1 8)) (_ bv0 8)))"
syntax function rotate_left_bv "(bvor (bvshl %1 (bvurem %2 (_ bv8 8))) (bvlshr %1 (bvsub (_ bv8 8) (bvurem %2 (_ bv8 8)))))"
syntax function rotate_right_bv "(bvor (bvlshr %1 (bvurem %2 (_ bv8 8))) (bvshl %1 (bvsub (_ bv8 8) (bvurem %2 (_ bv8 8)))))"
end
......
......@@ -9,6 +9,7 @@ model_parser "smtv2"
import "smt-libv2.drv"
import "no-bv.gen"
import "discrimination.gen"
transformation "inline_trivial"
......
......@@ -2,9 +2,9 @@
<!DOCTYPE why3session PUBLIC "-//Why3//proof session v5//EN"
"http://why3.lri.fr/why3session.dtd">
<why3session shape_version="4">
<prover id="0" name="CVC4" version="1.4" timelimit="5" memlimit="1000"/>
<prover id="2" name="Z3" version="4.3.2" timelimit="5" memlimit="1000"/>
<prover id="5" name="Alt-Ergo" version="0.99.1" timelimit="5" memlimit="1000"/>
<prover id="0" name="CVC4" version="1.4" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="2" name="Z3" version="4.3.2" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="5" name="Alt-Ergo" version="0.99.1" timelimit="5" steplimit="1" memlimit="1000"/>
<file name="../binary_search.mlw" expanded="true">
<theory name="BinarySearch" sum="7c8646b76f7105e1357a0dac5eef6893" expanded="true">
<goal name="WP_parameter binary_search" expl="VC for binary_search" expanded="true">
......@@ -20,7 +20,7 @@
<proof prover="5" timelimit="10"><result status="valid" time="0.02" steps="44"/></proof>
</goal>
</theory>
<theory name="BinarySearchInt32" sum="84d73d964ac2e52c2a4c56e898a3c5f5" expanded="true">
<theory name="BinarySearchInt32" sum="be00e964eb6971d378bc5e7bb474a32c" expanded="true">
<goal name="WP_parameter binary_search" expl="VC for binary_search" expanded="true">
<transf name="split_goal_wp" expanded="true">
<goal name="WP_parameter binary_search.1" expl="1. integer overflow">
......@@ -70,8 +70,8 @@
</goal>
<goal name="WP_parameter binary_search.16" expl="16. loop invariant preservation">
<proof prover="0"><result status="valid" time="0.04"/></proof>
<proof prover="2"><result status="valid" time="4.16"/></proof>
<proof prover="5"><result status="valid" time="1.68" steps="179"/></proof>
<proof prover="2"><result status="valid" time="3.48"/></proof>
<proof prover="5"><result status="valid" time="1.34" steps="179"/></proof>
</goal>
<goal name="WP_parameter binary_search.17" expl="17. loop variant decrease">
<proof prover="5"><result status="valid" time="0.02" steps="98"/></proof>
......@@ -91,7 +91,7 @@
<goal name="WP_parameter binary_search.22" expl="22. loop invariant preservation">
<proof prover="0"><result status="valid" time="0.04"/></proof>
<proof prover="2"><result status="valid" time="3.46"/></proof>
<proof prover="5"><result status="valid" time="1.99" steps="180"/></proof>
<proof prover="5"><result status="valid" time="1.35" steps="180"/></proof>
</goal>
<goal name="WP_parameter binary_search.23" expl="23. loop variant decrease">
<proof prover="5"><result status="valid" time="0.02" steps="100"/></proof>
......
This diff is collapsed.
......@@ -2,18 +2,18 @@
<!DOCTYPE why3session PUBLIC "-//Why3//proof session v5//EN"
"http://why3.lri.fr/why3session.dtd">
<why3session shape_version="4">
<prover id="0" name="Alt-Ergo" version="0.99.1" timelimit="5" memlimit="1000"/>
<prover id="2" name="CVC4" version="1.4" timelimit="5" memlimit="1000"/>
<prover id="4" name="CVC4" version="1.4" alternative="noBV" timelimit="5" memlimit="1000"/>
<prover id="0" name="Alt-Ergo" version="0.99.1" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="2" name="CVC4" version="1.4" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="4" name="CVC4" version="1.4" alternative="noBV" timelimit="5" steplimit="1" memlimit="1000"/>
<file name="../bitvector_examples.mlw" expanded="true">
<theory name="Test_proofinuse" sum="6b66e25b5fba98cd9a569192093d2257">
<theory name="Test_proofinuse" sum="07c8006854818f4db988d4a84c3268d8">
<goal name="WP_parameter shift_is_div" expl="VC for shift_is_div">
<transf name="split_goal_wp">
<goal name="WP_parameter shift_is_div.1" expl="1. assertion">
<proof prover="2"><result status="valid" time="0.01"/></proof>
</goal>
<goal name="WP_parameter shift_is_div.2" expl="2. assertion">
<proof prover="0"><result status="valid" time="0.66" steps="137"/></proof>
<proof prover="0"><result status="valid" time="0.48" steps="137"/></proof>
</goal>
<goal name="WP_parameter shift_is_div.3" expl="3. assertion">
<proof prover="2"><result status="valid" time="0.01"/></proof>
......@@ -33,7 +33,7 @@
<proof prover="2"><result status="valid" time="0.08"/></proof>
</goal>
</theory>
<theory name="Hackers_delight" sum="41a1e6758d65c0bae347df784a0a0970">
<theory name="Hackers_delight" sum="395a75dc4b0cc7fc0536ed41f36f5037">
<goal name="DM1">
<proof prover="2"><result status="valid" time="0.04"/></proof>
</goal>
......@@ -92,7 +92,7 @@
<proof prover="2"><result status="valid" time="0.04"/></proof>
</goal>
</theory>
<theory name="Hackers_delight_mod" sum="e2658a0de77f1745305297696b3dcc78">
<theory name="Hackers_delight_mod" sum="3368368fc763a9636a041fa5fbf676b5">
<goal name="WP_parameter dm1" expl="VC for dm1">
<proof prover="2"><result status="valid" time="0.04"/></proof>
</goal>
......@@ -154,7 +154,7 @@
<proof prover="2"><result status="valid" time="0.07"/></proof>
</goal>
</theory>
<theory name="Test_imperial_violet" sum="2b80e9425b02301d47c3e3bd4d79e11f">
<theory name="Test_imperial_violet" sum="ba5c44837be65648a368ce40462016a6">
<goal name="bv32_bounds_bv">
<proof prover="2"><result status="valid" time="0.04"/></proof>
</goal>
......@@ -174,7 +174,7 @@
<proof prover="4"><result status="valid" time="0.16"/></proof>
</goal>
</theory>
<theory name="Test_from_bitvector_example" sum="c7e027222e90d7cf95c32003b033da18">
<theory name="Test_from_bitvector_example" sum="be711e308d713570e8236111ea0953af">
<goal name="Test1">
<proof prover="2"><result status="valid" time="0.03"/></proof>
</goal>
......
......@@ -2,14 +2,14 @@
<!DOCTYPE why3session PUBLIC "-//Why3//proof session v5//EN"
"http://why3.lri.fr/why3session.dtd">
<why3session shape_version="4">
<prover id="0" name="Alt-Ergo" version="0.99.1" timelimit="5" memlimit="1000"/>
<prover id="1" name="CVC4" version="1.4" timelimit="5" memlimit="1000"/>
<prover id="3" name="CVC3" version="2.4.1" timelimit="5" memlimit="1000"/>
<prover id="4" name="Alt-Ergo" version="1.00.prv" timelimit="5" memlimit="1000"/>
<prover id="5" name="Z3" version="4.4.0" timelimit="5" memlimit="1000"/>
<prover id="6" name="CVC4" version="1.4" alternative="noBV" timelimit="5" memlimit="1000"/>
<prover id="0" name="Alt-Ergo" version="0.99.1" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="1" name="CVC4" version="1.4" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="3" name="CVC3" version="2.4.1" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="4" name="Alt-Ergo" version="1.00.prv" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="5" name="Z3" version="4.4.0" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="6" name="CVC4" version="1.4" alternative="noBV" timelimit="5" steplimit="1" memlimit="1000"/>
<file name="../bitwalker.mlw" expanded="true">
<theory name="Bitwalker" sum="5f74f72afed1573d231ce92e0072a9e5" expanded="true">
<theory name="Bitwalker" sum="9755ce6626677472899148634ff24705" expanded="true">
<goal name="nth64">
<proof prover="0"><result status="valid" time="0.10" steps="88"/></proof>
</goal>
......@@ -25,8 +25,8 @@
<proof prover="1"><result status="valid" time="0.16"/></proof>
</goal>
<goal name="WP_parameter nth_ultpre0.3" expl="3. postcondition">
<proof prover="0"><result status="valid" time="0.52" steps="210"/></proof>
<proof prover="6"><result status="valid" time="0.30"/></proof>
<proof prover="0"><result status="valid" time="0.36" steps="198"/></proof>
<proof prover="6"><result status="valid" time="0.12"/></proof>
</goal>
</transf>
</goal>
......@@ -61,7 +61,7 @@
</goal>
<goal name="WP_parameter poke_64bit_bv.9" expl="9. postcondition">
<proof prover="0"><result status="valid" time="0.34" steps="188"/></proof>
<proof prover="6"><result status="valid" time="0.22"/></proof>
<proof prover="6"><result status="valid" time="0.09"/></proof>
</goal>
<goal name="WP_parameter poke_64bit_bv.10" expl="10. postcondition">
<proof prover="0"><result status="valid" time="0.29" steps="163"/></proof>
......@@ -81,13 +81,13 @@
<proof prover="0"><result status="valid" time="0.04" steps="78"/></proof>
</goal>
<goal name="WP_parameter poke_64bit.4" expl="4. VC for poke_64bit">
<proof prover="1"><result status="valid" time="0.07"/></proof>
<proof prover="1"><result status="valid" time="0.31"/></proof>
</goal>
<goal name="WP_parameter poke_64bit.5" expl="5. VC for poke_64bit">
<proof prover="1"><result status="valid" time="0.06"/></proof>
<proof prover="1"><result status="valid" time="0.18"/></proof>
</goal>
<goal name="WP_parameter poke_64bit.6" expl="6. VC for poke_64bit">
<proof prover="1"><result status="valid" time="0.06"/></proof>
<proof prover="1"><result status="valid" time="0.32"/></proof>
</goal>
<goal name="WP_parameter poke_64bit.7" expl="7. VC for poke_64bit">
<proof prover="1"><result status="valid" time="0.07"/></proof>
......@@ -121,7 +121,7 @@
<proof prover="1"><result status="valid" time="0.09"/></proof>
</goal>
<goal name="WP_parameter peek_8bit_bv.6" expl="6. postcondition">
<proof prover="0"><result status="valid" time="1.56" steps="611"/></proof>
<proof prover="0"><result status="valid" time="1.56" steps="612"/></proof>
</goal>
</transf>
</goal>
......@@ -238,7 +238,7 @@
</goal>
<goal name="WP_parameter peek.19" expl="19. loop invariant preservation">
<proof prover="5"><result status="valid" time="0.02"/></proof>
<proof prover="6"><result status="valid" time="0.25"/></proof>
<proof prover="6"><result status="valid" time="0.11"/></proof>
</goal>
<goal name="WP_parameter peek.20" expl="20. loop variant decrease">
<proof prover="0"><result status="valid" time="0.14" steps="104"/></proof>
......@@ -276,7 +276,7 @@
<proof prover="3"><result status="valid" time="0.07"/></proof>
</goal>
<goal name="WP_parameter peek_64bit.5" expl="5. VC for peek_64bit">
<proof prover="1"><result status="valid" time="0.06"/></proof>
<proof prover="1"><result status="valid" time="0.22"/></proof>
</goal>
<goal name="WP_parameter peek_64bit.6" expl="6. postcondition">
<proof prover="0"><result status="valid" time="0.07" steps="133"/></proof>
......@@ -317,10 +317,10 @@
<proof prover="1"><result status="valid" time="0.08"/></proof>
</goal>
<goal name="WP_parameter poke_8bit.9" expl="9. postcondition">
<proof prover="3"><result status="valid" time="1.68"/></proof>
<proof prover="3"><result status="valid" time="0.83"/></proof>
</goal>
<goal name="WP_parameter poke_8bit.10" expl="10. postcondition">
<proof prover="3"><result status="valid" time="0.88"/></proof>
<proof prover="3"><result status="valid" time="0.09"/></proof>
</goal>
</transf>
</goal>
......@@ -357,7 +357,7 @@
<goal name="WP_parameter poke_8bit_array.6" expl="6. precondition">
<proof prover="0"><result status="valid" time="0.34" steps="196"/></proof>
<proof prover="1"><result status="valid" time="0.08"/></proof>
<proof prover="3"><result status="valid" time="1.52"/></proof>
<proof prover="3"><result status="valid" time="1.26"/></proof>
<proof prover="5"><result status="valid" time="0.01"/></proof>
</goal>
<goal name="WP_parameter poke_8bit_array.7" expl="7. index in array bounds">
......
......@@ -131,9 +131,9 @@ module Utils_Spec
let lemma triangleInequalityInt (a b c : t) : unit
ensures {to_uint (hammingD a b) + to_uint (hammingD b c) >= to_uint (hammingD a c)}
=
assert {numof (nth_diff a b) 0 32 + numof (nth_diff b c) 0 32 >=
numof (fun_or (nth_diff a b) (nth_diff b c)) 0 32 >=
numof (nth_diff a c) 0 32}
assert {numof (fun_or (nth_diff a b) (nth_diff b c)) 0 32 >= numof (nth_diff a c) 0 32
by
forall j:int. 0 <= j < 32 -> nth_diff a c j -> fun_or (nth_diff a b) (nth_diff b c) j}
lemma triangleInequality: forall a b c.
uge (add (hammingD a b) (hammingD b c)) (hammingD a c)
......
......@@ -2,14 +2,16 @@
<!DOCTYPE why3session PUBLIC "-//Why3//proof session v5//EN"
"http://why3.lri.fr/why3session.dtd">
<why3session shape_version="4">
<prover id="0" name="Alt-Ergo" version="0.99.1" timelimit="5" memlimit="1000"/>
<prover id="1" name="CVC4" version="1.4" timelimit="5" memlimit="1000"/>
<prover id="4" name="Z3" version="4.4.0" timelimit="5" memlimit="1000"/>
<prover id="5" name="CVC4" version="1.4" alternative="noBV" timelimit="5" memlimit="1000"/>
<prover id="0" name="Alt-Ergo" version="0.99.1" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="1" name="CVC4" version="1.4" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="2" name="Z3" version="4.4.0" alternative="noBV" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="3" name="Alt-Ergo" version="1.10.prv" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="4" name="Z3" version="4.4.0" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="5" name="CVC4" version="1.4" alternative="noBV" timelimit="5" steplimit="1" memlimit="1000"/>
<file name="../hackers-delight.mlw" expanded="true">
<theory name="Utils" sum="d41d8cd98f00b204e9800998ecf8427e">
</theory>
<theory name="Utils_Spec" sum="8d66aa65cf0031e1020f4029b30f5d6e" expanded="true">
<theory name="Utils_Spec" sum="9fc49581a1bc529e9494ae285461e220" expanded="true">
<goal name="countZero">
<proof prover="1"><result status="valid" time="0.03"/></proof>
</goal>
......@@ -17,7 +19,7 @@
<proof prover="0"><result status="valid" time="0.70" steps="241"/></proof>
</goal>
<goal name="countStep">
<proof prover="1"><result status="valid" time="7.33"/></proof>
<proof prover="1"><result status="valid" time="3.07"/></proof>
</goal>
<goal name="WP_parameter numof_shift" expl="VC for numof_shift">
<proof prover="1"><result status="valid" time="0.24"/></proof>
......@@ -33,21 +35,21 @@
<goal name="WP_parameter countSpec_Aux.3" expl="3. assertion">
<transf name="split_goal_wp">
<goal name="WP_parameter countSpec_Aux.3.1" expl="1. assertion">
<proof prover="0"><result status="valid" time="0.37" steps="150"/></proof>
<proof prover="0"><result status="valid" time="0.20" steps="150"/></proof>
</goal>
<goal name="WP_parameter countSpec_Aux.3.2" expl="2. assertion">
<proof prover="0"><result status="valid" time="3.97" steps="535"/></proof>
<proof prover="0"><result status="valid" time="2.59" steps="535"/></proof>
</goal>
<goal name="WP_parameter countSpec_Aux.3.3" expl="3. assertion">
<proof prover="0"><result status="valid" time="0.51" steps="162"/></proof>
</goal>
<goal name="WP_parameter countSpec_Aux.3.4" expl="4. assertion">
<proof prover="5"><result status="valid" time="3.20"/></proof>
<proof prover="5"><result status="valid" time="2.29"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter countSpec_Aux.4" expl="4. postcondition">
<proof prover="1"><result status="valid" time="0.51"/></proof>
<proof prover="1"><result status="valid" time="0.31"/></proof>
</goal>
</transf>
</goal>
......@@ -71,23 +73,34 @@
<proof prover="1"><result status="valid" time="0.19"/></proof>
</goal>
<goal name="WP_parameter numof_or" expl="VC for numof_or">
<proof prover="1"><result status="valid" time="0.72"/></proof>
</goal>
<goal name="WP_parameter triangleInequalityInt" expl="VC for triangleInequalityInt">
<transf name="split_goal_wp">
<goal name="WP_parameter triangleInequalityInt.1" expl="1. assertion">
<proof prover="4"><result status="valid" time="0.14"/></proof>
<proof prover="1"><result status="valid" time="0.45"/></proof>
</goal>
<goal name="WP_parameter triangleInequalityInt" expl="VC for triangleInequalityInt" expanded="true">
<transf name="split_goal_wp" expanded="true">
<goal name="WP_parameter triangleInequalityInt.1" expl="1. assertion" expanded="true">
<transf name="split_goal_wp" expanded="true">
<goal name="WP_parameter triangleInequalityInt.1.1" expl="1. VC for triangleInequalityInt" expanded="true">
<proof prover="3"><result status="valid" time="0.06" steps="133"/></proof>
<proof prover="5"><result status="valid" time="0.39"/></proof>
</goal>
<goal name="WP_parameter triangleInequalityInt.1.2" expl="2. VC for triangleInequalityInt" expanded="true">
<proof prover="2"><result status="valid" time="0.56"/></proof>
<proof prover="3"><result status="valid" time="0.28" steps="258"/></proof>
<proof prover="4"><result status="valid" time="0.02"/></proof>
<proof prover="5"><result status="valid" time="0.21"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter triangleInequalityInt.2" expl="2. postcondition">
<proof prover="0"><result status="valid" time="0.05" steps="78"/></proof>
<proof prover="0"><result status="valid" time="0.05" steps="109"/></proof>
</goal>
</transf>
</goal>
<goal name="triangleInequality">
<proof prover="0"><result status="valid" time="5.87" steps="726"/></proof>
<proof prover="0"><result status="valid" time="4.49" steps="726"/></proof>
</goal>
</theory>
<theory name="Hackers_delight" sum="617e4501d9edb885b1602897d4f5946e" expanded="true">
<theory name="Hackers_delight" sum="20348474bf14b2e0397f38eb0d273205" expanded="true">
<goal name="WP_parameter ascii" expl="VC for ascii">
<proof prover="1"><result status="valid" time="0.09"/></proof>
</goal>
......@@ -101,7 +114,7 @@
<proof prover="1"><result status="valid" time="0.09"/></proof>
</goal>
<goal name="nthGray">
<proof prover="0"><result status="valid" time="1.67" steps="544"/></proof>
<proof prover="0"><result status="valid" time="1.23" steps="544"/></proof>
</goal>
<goal name="lastNthGray">
<proof prover="1"><result status="valid" time="0.04"/></proof>
......@@ -143,7 +156,7 @@
<proof prover="1"><result status="valid" time="0.06"/></proof>
</goal>
<goal name="Ac">
<proof prover="0"><result status="valid" time="0.77" steps="319"/></proof>
<proof prover="0"><result status="valid" time="0.47" steps="319"/></proof>
</goal>
<goal name="Ad">
<proof prover="1"><result status="valid" time="0.06"/></proof>
......
......@@ -2,11 +2,11 @@
<!DOCTYPE why3session PUBLIC "-//Why3//proof session v5//EN"
"http://why3.lri.fr/why3session.dtd">
<why3session shape_version="4">
<prover id="0" name="Alt-Ergo" version="0.99.1" timelimit="5" memlimit="1000"/>
<prover id="2" name="CVC4" version="1.4" timelimit="5" memlimit="1000"/>
<prover id="4" name="Z3" version="4.4.0" timelimit="5" memlimit="1000"/>
<prover id="0" name="Alt-Ergo" version="0.99.1" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="2" name="CVC4" version="1.4" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="4" name="Z3" version="4.4.0" timelimit="5" steplimit="1" memlimit="1000"/>
<file name="../bitvectors.why" expanded="true">
<theory name="TestBV" sum="4865db8e2eaaed56c326f2db4d1f8135" expanded="true">
<theory name="TestBV" sum="91c100138a6a2604b6b10a1c52ef233c" expanded="true">
<goal name="g1">
<proof prover="2"><result status="valid" time="0.01"/></proof>
<proof prover="4"><result status="valid" time="0.00"/></proof>
......
This diff is collapsed.
......@@ -2,17 +2,17 @@
<!DOCTYPE why3session PUBLIC "-//Why3//proof session v5//EN"
"http://why3.lri.fr/why3session.dtd">
<why3session shape_version="4">
<prover id="0" name="Alt-Ergo" version="0.99.1" timelimit="5" memlimit="1000"/>
<prover id="2" name="CVC4" version="1.4" timelimit="5" memlimit="1000"/>
<prover id="4" name="Z3" version="4.4.0" alternative="noBV" timelimit="5" memlimit="1000"/>
<prover id="5" name="CVC4" version="1.4" alternative="noBV" timelimit="5" memlimit="1000"/>
<prover id="6" name="Z3" version="4.4.0" timelimit="5" memlimit="1000"/>
<prover id="0" name="Alt-Ergo" version="0.99.1" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="2" name="CVC4" version="1.4" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="4" name="Z3" version="4.4.0" alternative="noBV" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="5" name="CVC4" version="1.4" alternative="noBV" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="6" name="Z3" version="4.4.0" timelimit="5" steplimit="1" memlimit="1000"/>
<file name="../rightmostbittrick.mlw" expanded="true">
<theory name="Rmbt" sum="d8b24ec80aa06627867242ad9426808a" expanded="true">
<theory name="Rmbt" sum="878556699fa845f3c95c99b591364617" expanded="true">
<goal name="WP_parameter rightmost_position_set" expl="VC for rightmost_position_set" expanded="true">
<transf name="split_goal_wp" expanded="true">
<goal name="WP_parameter rightmost_position_set.1" expl="1. loop invariant init">
<proof prover="0"><result status="valid" time="0.91" steps="183"/></proof>
<proof prover="0"><result status="valid" time="0.05" steps="82"/></proof>
<proof prover="2"><result status="valid" time="0.01"/></proof>
<proof prover="5"><result status="valid" time="0.02"/></proof>
<proof prover="6"><result status="valid" time="0.01"/></proof>
......@@ -23,7 +23,7 @@
<proof prover="6"><result status="valid" time="0.02"/></proof>
</goal>
<goal name="WP_parameter rightmost_position_set.3" expl="3. loop variant decrease">
<proof prover="0"><result status="valid" time="1.25" steps="296"/></proof>
<proof prover="0"><result status="valid" time="1.25" steps="250"/></proof>
<proof prover="2"><result status="valid" time="0.06"/></proof>
<proof prover="5"><result status="valid" time="0.02"/></proof>
</goal>
......@@ -76,16 +76,16 @@
<proof prover="6"><result status="valid" time="0.03"/></proof>
</goal>
<goal name="WP_parameter rightmost_bit_trick.3" expl="3. postcondition">
<proof prover="0"><result status="valid" time="0.07" steps="108"/></proof>
<proof prover="0"><result status="valid" time="0.07" steps="97"/></proof>
<proof prover="2"><result status="valid" time="0.02"/></proof>
<proof prover="5"><result status="valid" time="0.03"/></proof>
</goal>
<goal name="WP_parameter rightmost_bit_trick.4" expl="4. postcondition">
<proof prover="0"><result status="valid" time="0.18" steps="134"/></proof>
<proof prover="0"><result status="valid" time="0.18" steps="125"/></proof>
<proof prover="5"><result status="valid" time="0.03"/></proof>
</goal>
<goal name="WP_parameter rightmost_bit_trick.5" expl="5. postcondition">
<proof prover="0"><result status="valid" time="0.02" steps="77"/></proof>
<proof prover="0"><result status="valid" time="0.02" steps="76"/></proof>
<proof prover="5"><result status="valid" time="0.02"/></proof>
</goal>
<goal name="WP_parameter rightmost_bit_trick.6" expl="6. postcondition">
......@@ -95,7 +95,7 @@
<proof prover="2"><result status="valid" time="0.18"/></proof>
</goal>
<goal name="WP_parameter rightmost_bit_trick.8" expl="8. postcondition">
<proof prover="0"><result status="valid" time="0.15" steps="156"/></proof>
<proof prover="0"><result status="valid" time="0.15" steps="134"/></proof>
<proof prover="5"><result status="valid" time="0.03"/></proof>
</goal>
</transf>
......
This diff is collapsed.
......@@ -2,21 +2,21 @@
<!DOCTYPE why3session PUBLIC "-//Why3//proof session v5//EN"
"http://why3.lri.fr/why3session.dtd">
<why3session shape_version="4">
<prover id="1" name="Coq" version="8.4pl6" timelimit="5" memlimit="0"/>
<prover id="2" name="CVC3" version="2.4.1" timelimit="3" memlimit="1000"/>
<prover id="5" name="CVC4" version="1.4" timelimit="5" memlimit="1000"/>
<prover id="7" name="Spass" version="3.7" timelimit="10" memlimit="0"/>
<prover id="8" name="Z3" version="4.3.1" timelimit="5" memlimit="1000"/>
<prover id="10" name="Yices" version="1.0.38" timelimit="10" memlimit="1000"/>
<prover id="11" name="Z3" version="3.2" timelimit="15" memlimit="1000"/>
<prover id="12" name="Gappa" version="1.1.1" timelimit="10" memlimit="0"/>
<prover id="13" name="Alt-Ergo" version="0.95.2" timelimit="5" memlimit="1000"/>
<prover id="14" name="Vampire" version="0.6" timelimit="5" memlimit="1000"/>
<prover id="15" name="Z3" version="4.3.2" timelimit="3" memlimit="1000"/>
<prover id="16" name="Alt-Ergo" version="0.99.1" timelimit="3" memlimit="1000"/>
<prover id="17" name="Eprover" version="1.8-001" timelimit="10" memlimit="0"/>
<prover id="1" name="Coq" version="8.4pl6" timelimit="5" steplimit="1" memlimit="0"/>
<prover id="2" name="CVC3" version="2.4.1" timelimit="3" steplimit="1" memlimit="1000"/>
<prover id="5" name="CVC4" version="1.4" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="7" name="Spass" version="3.7" timelimit="10" steplimit="1" memlimit="0"/>
<prover id="8" name="Z3" version="4.3.1" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="10" name="Yices" version="1.0.38" timelimit="10" steplimit="1" memlimit="1000"/>
<prover id="11" name="Z3" version="3.2" timelimit="15" steplimit="1" memlimit="1000"/>
<prover id="12" name="Gappa" version="1.1.1" timelimit="10" steplimit="1" memlimit="0"/>
<prover id="13" name="Alt-Ergo" version="0.95.2" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="14" name="Vampire" version="0.6" timelimit="5" steplimit="1" memlimit="1000"/>
<prover id="15" name="Z3" version="4.3.2" timelimit="3" steplimit="1" memlimit="1000"/>
<prover id="16" name="Alt-Ergo" version="0.99.1" timelimit="3" steplimit="1" memlimit="1000"/>
<prover id="17" name="Eprover" version="1.8-001" timelimit="10" steplimit="1" memlimit="0"/>
<file name="../heapsort.mlw">
<theory name="HeapSort" sum="b7357fb30d1c45e86360d924e72ce6fc">
<theory name="HeapSort" sum="9c2fa0e6c0d92d2a002dd9f0c0f63f95">
<goal name="Min_of_sorted">
<proof prover="1" timelimit="3" edited="heapsort_WP_HeapSort_Min_of_sorted_1.v"><result status="valid" time="1.11"/></proof>
</goal>
......@@ -295,7 +295,7 @@
</theory>
</file>
<file name="../bag_of_integers.why">
<theory name="Bag_integers" sum="796b00175e30295b0c9ff000d886e4b4">
<theory name="Bag_integers" sum="c6a5503758ac17839636e662391ad545">
<goal name="Min_bag_union1">
<proof prover="7" timelimit="39"><result status="valid" time="0.02"/></proof>
<proof prover="11" timelimit="5" memlimit="0"><result status="valid" time="0.02"/></proof>
......@@ -315,7 +315,7 @@
</theory>
</file>
<file name="../test_harness.mlw">
<theory name="TestHarness" sum="042445c1246c83a0d5b43c7b15cd4003">
<theory name="TestHarness" sum="06a27ea95dd253ccd6b0bf1754ea9665">
<goal name="WP_parameter testHarness" expl="VC for testHarness">
<transf name="split_goal_wp">
<goal name="WP_parameter testHarness.1" expl="1. array creation size">
......@@ -389,7 +389,7 @@
</theory>
</file>
<file name="../elements.why">
<theory name="Elements" sum="62a321e61b82922d968f3c6000c0c991">
<theory name="Elements" sum="17fd0b43142cdea5b8de8ebf1bb3efee">
<goal name="Elements_singleton">
<proof prover="15" timelimit="5" memlimit="0"><result status="valid" time="0.02"/></proof>
</goal>
......@@ -403,7 +403,7 @@
<goal name="Elements_remove_last">
<proof prover="2" timelimit="10" memlimit="0"><result status="valid" time="0.02"/></proof>
<proof prover="15" timelimit="10" memlimit="0"><result status="valid" time="0.02"/></proof>
<proof prover="16" timelimit="10" memlimit="0"><result status="valid" time="0.01" steps="8"/></proof>
<proof prover="16" timelimit="10" memlimit="0"><result status="valid" time="0.01" steps="9"/></proof>
<proof prover="17" timelimit="12"><result status="valid" time="0.25"/></proof>
</goal>
<goal name="Occ_elements">
......@@ -417,12 +417,12 @@
</goal>
<goal name="Elements_set_inside2">
<proof prover="15" memlimit="0"><result status="valid" time="0.06"/></proof>
<proof prover="16" timelimit="10" memlimit="0"><result status="valid" time="0.01" steps="33"/></proof>
<proof prover="16" timelimit="10" memlimit="0"><result status="valid" time="0.01" steps="34"/></proof>
</goal>
</theory>
</file>
<file name="../heap_implem.mlw">
<theory name="Implementation" sum="bf31488f3ab964de1e65dc19dd58eccf">
<theory name="Implementation" sum="322e041e7468d24a1fcfab5ca52f254c">
<goal name="Is_heap_min">
<proof prover="1" edited="heap_implem_WP_Implementation_Is_heap_min_1.v"><result status="valid" time="0.98"/></proof>
</goal>
......@@ -573,7 +573,7 @@
<goal name="WP_parameter extractMin.3.3" expl="3. VC for extractMin">
<proof prover="2" memlimit="0"><result status="valid" time="0.13"/></proof>
<proof prover="15" memlimit="0"><result status="valid" time="0.04"/></proof>
<proof prover="16" memlimit="0"><result status="valid" time="0.15" steps="83"/></proof>
<proof prover="16" memlimit="0"><result status="valid" time="0.15" steps="85"/></proof>
</goal>
<goal name="WP_parameter extractMin.3.4" expl="4. VC for extractMin">
<proof prover="2" memlimit="0"><result status="valid" time="0.16"/></proof>
......@@ -652,7 +652,7 @@
</goal>
<goal name="WP_parameter extractMin.12.3" expl="3. VC for extractMin">
<proof prover="2" timelimit="5"><result status="valid" time="0.13"/></proof>
<proof prover="10" memlimit="0"><result status="valid" time="0.26"/></proof>
<proof prover="10" memlimit="0"><result status="valid" time="0.10"/></proof>
<proof prover="14" timelimit="15"><result status="valid" time="1.04"/></proof>
</goal>
</transf>
......@@ -885,7 +885,7 @@
<proof prover="17"><result status="valid" time="0.04"/></proof>
</goal>
<goal name="WP_parameter extractMin.28.3" expl="3. VC for extractMin">
<proof prover="2" timelimit="300"><result status="valid" time="16.78"/></proof>
<proof prover="2" timelimit="300"><result status="valid" time="19.92"/></proof>
</goal>
<goal name="WP_parameter extractMin.28.4" expl="4. VC for extractMin">
<proof prover="2" memlimit="0"><result status="valid" time="0.05"/></proof>
......@@ -981,7 +981,7 @@
</theory>
</file>
<file name="../heap_model.why">
<theory name="Model" sum="07a651016419eb767b00d90c6a315f31">
<theory name="Model" sum="86cb5604bda95464b033ec793352c213">
<goal name="Model_empty">
<proof prover="2" timelimit="5" memlimit="0"><result status="valid" time="0.03"/></proof>
<proof prover="7"><result status="valid" time="2.33"/></proof>
......
This diff is collapsed.
......@@ -313,16 +313,7 @@ theory BV_Gen
axiom to_uint_urem:
forall v1 v2. to_uint (urem v1 v2) = mod (to_uint v1) (to_uint v2)
(** Bitvector alternative for nth and shifts *)
function nth_bv t t: bool
axiom Nth_bv_is_nth:
forall x i.
nth x (to_uint i) = nth_bv x i
axiom Nth_bv_is_nth2:
forall x i. 0 <= i < two_power_size ->
nth_bv x (of_int i) = nth x i
(** Bitvector alternatives for shifts, rotations and nth *)
(** logical shift right *)
function lsr_bv t t : t
......@@ -353,6 +344,7 @@ theory BV_Gen
forall v n : t.
to_uint (lsl_bv v n) = mod (Int.( * ) (to_uint v) (pow2 (to_uint n))) two_power_size
(** rotations *)
function rotate_right_bv (v n : t) : t
function rotate_left_bv (v n : t) : t
......@@ -363,12 +355,28 @@ theory BV_Gen
axiom rotate_right_bv_is_rotate_right :
forall v n. rotate_right_bv v n = rotate_right v (to_uint n)
(** nth_bv *)
function nth_bv t t: bool
axiom nth_bv_def:
forall x i.
nth_bv x i = not (bw_and (lsr_bv x i) (of_int 1) = zero)
axiom Nth_bv_is_nth:
forall x i.