cleaning up proofs

parent 988d64dc
......@@ -26,8 +26,7 @@ module Quicksort
if l < r then begin
let v = t[l] in
let m = ref l in
'L: begin
for i = l + 1 to r do
'L: for i = l + 1 to r do
invariant { (forall j:int. l < j <= !m -> t[j] < v) /\
(forall j:int. !m < j < i -> t[j] >= v) /\
permut_sub t (at t 'L) l (r+1) /\
......@@ -37,7 +36,7 @@ module Quicksort
swap t l !m;
quick_rec t l (!m - 1);
quick_rec t (!m + 1) r
end end
end
{ sorted_sub t l (r+1) /\ permut_sub t (old t) l (r+1) }
let quicksort (t : array int) =
......
......@@ -12,12 +12,12 @@
<transf name="split_goal" proved="true" expanded="true">
<goal name="WP_parameter quick_rec.1" expl="precondition" sum="afb020494e403a393ab8e90f692bc69b" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="29" edited="" obsolete="false">
<result status="valid" time="0.02"/>
<result status="valid" time="0.03"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.2" expl="precondition" sum="a3181f1907824ed087e006f87be7bd9e" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.01"/>
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.3" expl="precondition" sum="8edc81919941af864219896fecd0637b" proved="true" expanded="false">
......@@ -35,7 +35,7 @@
</goal>
<goal name="WP_parameter quick_rec.5" expl="normal postcondition" sum="baa25029fb0a71d8acaf5f993d04baff" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
<result status="valid" time="0.03"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.6" expl="for loop initialization" sum="1c4177f71f9cbbbbbfd4115780641e1c" proved="true" expanded="false">
......@@ -44,16 +44,16 @@
</proof>
</goal>
<goal name="WP_parameter quick_rec.7" expl="for loop preservation" sum="889feaae94e94c3d8f72805ff307f9e9" proved="true" expanded="false">
<proof prover="cvc3" timelimit="10" edited="" obsolete="false">
<proof prover="cvc3" timelimit="10" edited="" obsolete="true">
<result status="timeout" time="10.13"/>
</proof>
<proof prover="alt-ergo" timelimit="29" edited="" obsolete="false">
<proof prover="alt-ergo" timelimit="29" edited="" obsolete="true">
<result status="timeout" time="10.03"/>
</proof>
<transf name="split_goal" proved="true" expanded="false">
<goal name="WP_parameter quick_rec.7.1" expl="for loop preservation" sum="9c0efe9ed6146211b6f0e90c55ea1c4a" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
<result status="valid" time="0.03"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.7.2" expl="for loop preservation" sum="15a8b476dd7c6f8af9213b9b00a54641" proved="true" expanded="false">
......@@ -63,7 +63,7 @@
</goal>
<goal name="WP_parameter quick_rec.7.3" expl="for loop preservation" sum="228d233acd3a7e42d2e375f8e798d716" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.06"/>
<result status="valid" time="0.04"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.7.4" expl="for loop preservation" sum="87f84d18958588ba63f323710cd9d25a" proved="true" expanded="false">
......@@ -73,32 +73,32 @@
</goal>
<goal name="WP_parameter quick_rec.7.5" expl="for loop preservation" sum="26d5fa5d233855efc8b3da64ecea09d1" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.39"/>
<result status="valid" time="0.38"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.7.6" expl="for loop preservation" sum="1e708347df6438df8c3fa3628f6ebdec" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
<result status="valid" time="0.03"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.7.7" expl="for loop preservation" sum="c1cae61d1f69fc8fb8ea60c2d075a36d" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.03"/>
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.7.8" expl="for loop preservation" sum="524f8413f2d8a9de2bd6a6ad2c4a088e" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.03"/>
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.7.9" expl="for loop preservation" sum="0b64cd1805d7a57e8bff8751f2baf675" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.03"/>
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.7.10" expl="for loop preservation" sum="497463ab5695da47ad41c0201d93fbb4" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
<result status="valid" time="0.03"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.7.11" expl="for loop preservation" sum="2e8721d1670e2d8ec7740d91c87a9e61" proved="true" expanded="false">
......@@ -108,24 +108,24 @@
</goal>
<goal name="WP_parameter quick_rec.7.12" expl="for loop preservation" sum="bbf98e9044079713e7ab2698e11485bd" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.03"/>
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.7.13" expl="for loop preservation" sum="72626c63afff611555f9e512efa1f1fc" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.03"/>
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.7.14" expl="for loop preservation" sum="d5eb94ee88f2a6582d26d227213096b3" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
<result status="valid" time="0.03"/>
</proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter quick_rec.8" expl="precondition" sum="33039b31c9c6180ab52eaf5492f2bc01" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="29" edited="" obsolete="false">
<result status="valid" time="0.03"/>
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.9" expl="precondition" sum="64b33af689e246d177effa0b1855ce6c" proved="true" expanded="false">
......@@ -137,12 +137,12 @@
<transf name="split_goal" proved="true" expanded="false">
<goal name="WP_parameter quick_rec.10.1" expl="correctness of parameter quick_rec" sum="377daa4ea73659b14aa5f353a807b1cb" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.03"/>
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.10.2" expl="correctness of parameter quick_rec" sum="89ea54e07fd5f22cfcb869807c6ccb81" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.03"/>
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter quick_rec.10.3" expl="correctness of parameter quick_rec" sum="ce9047573188eebeffdf2a00a09c300c" proved="true" expanded="false">
......@@ -164,7 +164,7 @@
</goal>
<goal name="WP_parameter quick_rec.12" expl="normal postcondition" sum="34d47e5d2d59419520785959c4866c68" proved="true" expanded="false">
<proof prover="alt-ergo" timelimit="29" edited="" obsolete="false">
<result status="valid" time="0.03"/>
<result status="valid" time="0.04"/>
</proof>
</goal>
</transf>
......@@ -178,13 +178,13 @@
</goal>
<goal name="WP_parameter quicksort.2" expl="normal postcondition" sum="e3ed7aa7c2a41c52acb920e4e3a3d9f0" proved="true" expanded="false">
<proof prover="cvc3" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.04"/>
<result status="valid" time="0.03"/>
</proof>
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.06"/>
</proof>
<proof prover="z3" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.05"/>
<result status="valid" time="0.06"/>
</proof>
</goal>
</transf>
......
(* Selectino sort. *)
(* Selection sort. *)
module Quicksort
module SelectionSort
use import int.Int
use import module ref.Ref
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE why3session SYSTEM "why3session.dtd">
<why3session name="examples/programs/selection_sort/why3session.xml">
<file name="../selection_sort.mlw" verified="true" expanded="false">
<theory name="WP Quicksort" verified="true" expanded="false">
<goal name="WP_parameter swap" expl="correctness of parameter swap" sum="f3c5d9d4f0bee2e3a859ce9ee3052bcc" proved="true" expanded="false">
<file name="../selection_sort.mlw" verified="true" expanded="true">
<theory name="WP SelectionSort" verified="true" expanded="true">
<goal name="WP_parameter swap" expl="correctness of parameter swap" sum="228748179ff91d7d4907ff8d193c120f" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.03"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort" expl="correctness of parameter selection_sort" sum="ea7c27f1228bfe6da1c80c9b58603576" proved="true" expanded="false">
<transf name="split_goal" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.1" expl="normal postcondition" sum="1ae852d9e2fe9181528e054546740333" proved="true" expanded="false">
<goal name="WP_parameter selection_sort" expl="correctness of parameter selection_sort" sum="3106a444f67b92223abfee7626b7824d" proved="true" expanded="true">
<transf name="split_goal" proved="true" expanded="true">
<goal name="WP_parameter selection_sort.1" expl="normal postcondition" sum="857fd3863b180eb0bc3f316dcaab5c5e" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
<result status="valid" time="0.04"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.2" expl="for loop initialization" sum="29a9a92c4b329241b917ddb8ec31f738" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.2" expl="for loop initialization" sum="d5cbd3f808e9743f9f999d44f7bb1cba" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
<result status="valid" time="0.03"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3" expl="for loop preservation" sum="dc0dc9a51c343b5bf5ca9a13f4adbe55" proved="true" expanded="false">
<transf name="split_goal" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.1" expl="for loop preservation" sum="36491ebcf42af5dde3a5f3a4844dcbeb" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3" expl="for loop preservation" sum="67c41c15e213a16699f666348d7602c0" proved="true" expanded="true">
<transf name="split_goal" proved="true" expanded="true">
<goal name="WP_parameter selection_sort.3.1" expl="for loop preservation" sum="4aec836f88e1c806f7e3eea168fa16e9" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.2" expl="for loop preservation" sum="1e8f791e6267d56305702f2bb26cec72" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.2" expl="for loop preservation" sum="1d1c96452b82d8451aa921e3c8d736a6" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.01"/>
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.3" expl="for loop preservation" sum="6fd9127cc5e9c6e942d945f651d5f834" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.3" expl="for loop preservation" sum="71cf76990ad78646e7f1f32321647918" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.4" expl="for loop preservation" sum="4853c43564a08ad5daf4947b1888e8bb" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.4" expl="for loop preservation" sum="a0d01007d796241b9a581fa97297b18f" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.01"/>
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.5" expl="for loop preservation" sum="0c8d0ac7ce9cdbf2ab766ba3a7b95778" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.5" expl="for loop preservation" sum="ba166b9099a09bbbbe184e86c9667b53" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.01"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.6" expl="for loop preservation" sum="cb1b6158fea4a537b535e99348fe38ed" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.6" expl="for loop preservation" sum="5ffc6a2f871accc741bb70b6dbfadaa5" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.01"/>
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.7" expl="for loop preservation" sum="24308a65cb55ef2e45a2e989c2bca5c7" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.7" expl="for loop preservation" sum="6bd8ec7e14b55248d631f8f1a09bb41d" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.8" expl="for loop preservation" sum="67aa7cd06e64947a5b5c42db4a59e2c1" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.8" expl="for loop preservation" sum="d6ea1fee5a0681f22b996d0c55755733" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
<result status="valid" time="0.03"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.9" expl="for loop preservation" sum="f6b6aa95cefce4de2617147719dfd2e2" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.9" expl="for loop preservation" sum="c4cd2d59b40e73d3c4cfd5e854160739" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.01"/>
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.10" expl="for loop preservation" sum="8f2897c801cadff0608fcab6d31d0155" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.10" expl="for loop preservation" sum="1c0c281ca52fb8cbf86b9f0fddc80fc7" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
<result status="valid" time="0.03"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.11" expl="for loop preservation" sum="c216a5675a4a34a74be0addc04c66a41" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.11" expl="for loop preservation" sum="6ddf6f53fb5249a56f11c28b809e625d" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.04"/>
<result status="valid" time="0.06"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.12" expl="for loop preservation" sum="0a8ddfb0dde609f627f5053cf1bbe6d4" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.12" expl="for loop preservation" sum="1b072b89c3b49b9a85c45e255b069a0d" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.01"/>
<result status="valid" time="0.02"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.13" expl="for loop preservation" sum="0f8de50605882d2481904ed6f5101758" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.13" expl="for loop preservation" sum="5ce0ebc0e9784b3d9e6d2bb31aba1a69" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="1.56"/>
<result status="valid" time="2.54"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.14" expl="for loop preservation" sum="11bcdb7a4b5c9af0efb310e0ae9b9529" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.14" expl="for loop preservation" sum="cc6519ab29dbdf9c1a4ca033bf119b7e" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.08"/>
<result status="valid" time="0.10"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.15" expl="for loop preservation" sum="ccbfd1defedcda9c65b8e2b67aa651fb" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.15" expl="for loop preservation" sum="e4d4299956fbff26b6803b3ecfadf1bb" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
<result status="valid" time="0.03"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.16" expl="for loop preservation" sum="239b28c5359cfc37ea55f0261208fbc9" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.16" expl="for loop preservation" sum="90581f47163208cd13ddda9d6cdfe7ba" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.08"/>
<result status="valid" time="0.12"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.17" expl="for loop preservation" sum="360fc34ac0457a1147fcc1d66296867e" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.17" expl="for loop preservation" sum="82817514c8867cdf4eb6458833db4a2f" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.01"/>
<result status="valid" time="0.03"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.18" expl="for loop preservation" sum="3cc2bcbc71096a0bbc567c4b193b2189" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.18" expl="for loop preservation" sum="ca979354c82f4835bfeb7a82013df410" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
<result status="valid" time="0.04"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.19" expl="for loop preservation" sum="21b616b131a62f7acf9f8114f44111d3" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.19" expl="for loop preservation" sum="a86d2fd520ba8946cce2a8a7b0c55249" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.01"/>
<result status="valid" time="0.03"/>
</proof>
</goal>
<goal name="WP_parameter selection_sort.3.20" expl="for loop preservation" sum="32b78ed8093a62f5bd5f396a5cb4ec01" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.3.20" expl="for loop preservation" sum="acf6bc3b20f518616d069433125a24a7" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
</proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter selection_sort.4" expl="normal postcondition" sum="5513e1179f6bb650cdb12544b8d9d888" proved="true" expanded="false">
<goal name="WP_parameter selection_sort.4" expl="normal postcondition" sum="1fe4a32b26a16b4ec4b5dac1d9b6ad28" proved="true" expanded="true">
<proof prover="alt-ergo" timelimit="10" edited="" obsolete="false">
<result status="valid" time="0.02"/>
<result status="valid" time="0.03"/>
</proof>
</goal>
</transf>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment