Commit db0572e2 authored by Marc Schoolderman's avatar Marc Schoolderman
Browse files

major cleanup of directory structure

parent ca07259c
*.bak
*.swp
......@@ -35,7 +35,7 @@ end
module KaratAvr
use import avrmodel2.AVRint
use import avrmodel.AVRint
use import int.Int
use import int.EuclideanDivision
use import bv.Pow2int
......@@ -1234,7 +1234,7 @@ assert { at(uint 3 reg 8)'L11 + pow2 24*uint 6 reg 8 + pow2 72*uint 3 reg 20 +
std rZ 10 r21;
std rZ 11 r22
use avrmodel2.Shadow as S
use avrmodel.Shadow as S
lemma mul_bound_preserve:
forall x y l. 0 <= x <= l -> 0 <= y <= l -> x*y <= l*l
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
No preview for this file type
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE why3session PUBLIC "-//Why3//proof session v5//EN"
"http://why3.lri.fr/why3session.dtd">
<why3session shape_version="4">
<prover id="0" name="CVC3" version="2.4.1" timelimit="13" steplimit="1" memlimit="1000"/>
<prover id="1" name="Z3" version="4.5.0" alternative="noBV" timelimit="13" steplimit="1" memlimit="1000"/>
<prover id="2" name="CVC4" version="1.4" timelimit="13" steplimit="1" memlimit="1000"/>
<prover id="4" name="Alt-Ergo" version="2.0.0" timelimit="13" steplimit="1" memlimit="1000"/>
<prover id="5" name="CVC4" version="1.4" alternative="noBV" timelimit="13" steplimit="1" memlimit="1000"/>
<file name="../avrmodel2.mlw">
<theory name="AVRint" sum="72bdc6d811b5de8a7345c75ceae8dbad">
<goal name="WP_parameter prefix ?" expl="VC for prefix ?">
<proof prover="4"><result status="valid" time="0.02" steps="70"/></proof>
</goal>
<goal name="WP_parameter mov" expl="VC for mov">
<proof prover="4"><result status="valid" time="0.07" steps="83"/></proof>
</goal>
<goal name="WP_parameter mul" expl="VC for mul">
<proof prover="4"><result status="valid" time="1.66" steps="255"/></proof>
</goal>
<goal name="WP_parameter add" expl="VC for add">
<proof prover="4"><result status="valid" time="1.76" steps="339"/></proof>
</goal>
<goal name="WP_parameter adc" expl="VC for adc">
<proof prover="4"><result status="valid" time="0.98" steps="167"/></proof>
</goal>
<goal name="WP_parameter sub" expl="VC for sub">
<proof prover="4"><result status="valid" time="0.85" steps="176"/></proof>
</goal>
<goal name="WP_parameter sbc" expl="VC for sbc">
<proof prover="4"><result status="valid" time="0.40" steps="158"/></proof>
</goal>
<goal name="WP_parameter subi" expl="VC for subi">
<proof prover="4" steplimit="-1"><result status="valid" time="0.72" steps="208"/></proof>
</goal>
<goal name="WP_parameter sbci" expl="VC for sbci">
<proof prover="4"><result status="valid" time="0.38" steps="140"/></proof>
</goal>
<goal name="WP_parameter inc" expl="VC for inc">
<proof prover="4"><result status="valid" time="0.11" steps="84"/></proof>
</goal>
<goal name="WP_parameter dec" expl="VC for dec">
<proof prover="4"><result status="valid" time="0.12" steps="84"/></proof>
</goal>
<goal name="WP_parameter ld_inc" expl="VC for ld_inc">
<proof prover="0" steplimit="-1"><result status="valid" time="6.20"/></proof>
</goal>
<goal name="WP_parameter ldd" expl="VC for ldd">
<proof prover="4"><result status="valid" time="0.28" steps="173"/></proof>
</goal>
<goal name="WP_parameter std" expl="VC for std">
<proof prover="4"><result status="valid" time="0.46" steps="176"/></proof>
</goal>
<goal name="WP_parameter push" expl="VC for push">
<proof prover="4" steplimit="-1"><result status="valid" time="0.02" steps="89"/></proof>
</goal>
<goal name="WP_parameter pop" expl="VC for pop">
<proof prover="4" steplimit="-1"><result status="valid" time="0.07" steps="89"/></proof>
</goal>
<goal name="WP_parameter nop" expl="VC for nop">
<proof prover="4"><result status="valid" time="0.05" steps="66"/></proof>
</goal>
<goal name="eq_narrow" expl="">
<proof prover="4"><result status="valid" time="0.03" steps="79"/></proof>
</goal>
<goal name="eq_combine" expl="">
<proof prover="4"><result status="valid" time="0.04" steps="78"/></proof>
</goal>
<goal name="eq_uint" expl="">
<proof prover="0"><result status="valid" time="0.63"/></proof>
</goal>
<goal name="uint_0" expl="">
<proof prover="4"><result status="valid" time="0.04" steps="68"/></proof>
</goal>
<goal name="uint_1" expl="">
<proof prover="4"><result status="valid" time="0.08" steps="72"/></proof>
</goal>
<goal name="uint_2" expl="">
<proof prover="4"><result status="valid" time="0.04" steps="74"/></proof>
</goal>
<goal name="uint_3" expl="">
<proof prover="4"><result status="valid" time="0.10" steps="76"/></proof>
</goal>
<goal name="uint_4" expl="">
<proof prover="4"><result status="valid" time="0.07" steps="78"/></proof>
</goal>
<goal name="uint_5" expl="">
<proof prover="4"><result status="valid" time="0.10" steps="80"/></proof>
</goal>
<goal name="uint_6" expl="">
<proof prover="4"><result status="valid" time="0.07" steps="82"/></proof>
</goal>
<goal name="uint_7" expl="">
<proof prover="4"><result status="valid" time="0.10" steps="84"/></proof>
</goal>
<goal name="uint_8" expl="">
<proof prover="4"><result status="valid" time="0.10" steps="86"/></proof>
</goal>
<goal name="uint_9" expl="">
<proof prover="4"><result status="valid" time="0.04" steps="88"/></proof>
</goal>
<goal name="uint_10" expl="">
<proof prover="4"><result status="valid" time="0.16" steps="92"/></proof>
</goal>
<goal name="uint_11" expl="">
<proof prover="4"><result status="valid" time="0.08" steps="96"/></proof>
</goal>
<goal name="uint_12" expl="">
<proof prover="4"><result status="valid" time="0.10" steps="100"/></proof>
</goal>
<goal name="uint_13" expl="">
<proof prover="4"><result status="valid" time="0.15" steps="104"/></proof>
</goal>
<goal name="uint_14" expl="">
<proof prover="4"><result status="valid" time="0.22" steps="108"/></proof>
</goal>
<goal name="uint_15" expl="">
<proof prover="4"><result status="valid" time="0.24" steps="112"/></proof>
</goal>
<goal name="uint_16" expl="">
<proof prover="4"><result status="valid" time="0.30" steps="116"/></proof>
</goal>
<goal name="uint_17" expl="">
<proof prover="4"><result status="valid" time="0.26" steps="120"/></proof>
</goal>
<goal name="uint_18" expl="">
<proof prover="4"><result status="valid" time="0.37" steps="124"/></proof>
</goal>
<goal name="uint_19" expl="">
<proof prover="4"><result status="valid" time="0.29" steps="128"/></proof>
</goal>
<goal name="uint_20" expl="">
<proof prover="4"><result status="valid" time="0.55" steps="132"/></proof>
</goal>
<goal name="uint_21" expl="">
<proof prover="4"><result status="valid" time="0.55" steps="136"/></proof>
</goal>
<goal name="uint_22" expl="">
<proof prover="4"><result status="valid" time="0.80" steps="140"/></proof>
</goal>
<goal name="uint_23" expl="">
<proof prover="4"><result status="valid" time="0.68" steps="144"/></proof>
</goal>
<goal name="uint_24" expl="">
<proof prover="4"><result status="valid" time="0.49" steps="148"/></proof>
</goal>
<goal name="uint_25" expl="">
<proof prover="4"><result status="valid" time="0.65" steps="152"/></proof>
</goal>
<goal name="uint_26" expl="">
<proof prover="4"><result status="valid" time="0.71" steps="156"/></proof>
</goal>
<goal name="uint_27" expl="">
<proof prover="4"><result status="valid" time="0.81" steps="160"/></proof>
</goal>
<goal name="uint_28" expl="">
<proof prover="4"><result status="valid" time="0.91" steps="164"/></proof>
</goal>
<goal name="uint_29" expl="">
<proof prover="4"><result status="valid" time="0.97" steps="168"/></proof>
</goal>
<goal name="uint_30" expl="">
<proof prover="4"><result status="valid" time="1.16" steps="172"/></proof>
</goal>
<goal name="uint_31" expl="">
<proof prover="4"><result status="valid" time="1.10" steps="176"/></proof>
</goal>
<goal name="uint_32" expl="">
<proof prover="4"><result status="valid" time="1.23" steps="180"/></proof>
</goal>
<goal name="WP_parameter movw" expl="VC for movw">
<proof prover="4"><result status="valid" time="0.13" steps="89"/></proof>
</goal>
<goal name="WP_parameter adiw" expl="VC for adiw">
<transf name="split_goal_wp">
<goal name="WP_parameter adiw.1" expl="type invariant">
<proof prover="5" steplimit="-1"><result status="valid" time="0.28"/></proof>
</goal>
<goal name="WP_parameter adiw.2" expl="postcondition">
<proof prover="5" steplimit="-1"><result status="valid" time="0.30"/></proof>
</goal>
<goal name="WP_parameter adiw.3" expl="postcondition">
<transf name="compute_in_goal">
<goal name="WP_parameter adiw.3.1" expl="postcondition">
<proof prover="5"><result status="valid" time="0.22"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter adiw.4" expl="postcondition">
<transf name="compute_in_goal">
<goal name="WP_parameter adiw.4.1" expl="postcondition">
<proof prover="5"><result status="valid" time="0.23"/></proof>
</goal>
</transf>
</goal>
</transf>
</goal>
<goal name="WP_parameter sbiw" expl="VC for sbiw">
<transf name="split_goal_wp">
<goal name="WP_parameter sbiw.1" expl="precondition">
<proof prover="5" steplimit="-1"><result status="valid" time="0.10"/></proof>
</goal>
<goal name="WP_parameter sbiw.2" expl="precondition">
<proof prover="5" steplimit="-1"><result status="valid" time="0.06"/></proof>
</goal>
<goal name="WP_parameter sbiw.3" expl="postcondition">
<proof prover="5"><result status="valid" time="0.24"/></proof>
</goal>
<goal name="WP_parameter sbiw.4" expl="postcondition">
<transf name="compute_in_goal">
<goal name="WP_parameter sbiw.4.1" expl="postcondition">
<proof prover="5"><result status="valid" time="0.26"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter sbiw.5" expl="postcondition">
<transf name="compute_in_goal">
<goal name="WP_parameter sbiw.5.1" expl="postcondition">
<proof prover="5"><result status="valid" time="0.26"/></proof>
</goal>
</transf>
</goal>
</transf>
</goal>
<goal name="WP_parameter add_" expl="VC for add_">
<transf name="split_goal_wp">
<goal name="WP_parameter add_.1" expl="type invariant">
<proof prover="4"><result status="valid" time="0.14" steps="146"/></proof>
</goal>
<goal name="WP_parameter add_.2" expl="postcondition">
<proof prover="0"><result status="valid" time="0.24"/></proof>
</goal>
<goal name="WP_parameter add_.3" expl="postcondition">
<proof prover="2" timelimit="130"><result status="valid" time="76.52"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter inc_" expl="VC for inc_">
<proof prover="2"><result status="valid" time="1.18"/></proof>
</goal>
<goal name="WP_parameter dec_" expl="VC for dec_">
<proof prover="4"><result status="valid" time="0.23" steps="124"/></proof>
</goal>
<goal name="WP_parameter eor" expl="VC for eor">
<proof prover="4"><result status="valid" time="0.12" steps="140"/></proof>
</goal>
<goal name="WP_parameter clr" expl="VC for clr">
<proof prover="2"><result status="valid" time="0.15"/></proof>
</goal>
<goal name="WP_parameter com" expl="VC for com">
<proof prover="4"><result status="valid" time="0.09" steps="133"/></proof>
</goal>
<goal name="WP_parameter asr" expl="VC for asr">
<proof prover="2"><result status="valid" time="0.28"/></proof>
</goal>
<goal name="WP_parameter bst" expl="VC for bst">
<proof prover="4"><result status="valid" time="0.08" steps="72"/></proof>
</goal>
<goal name="one_def" expl="">
<proof prover="2"><result status="valid" time="0.33"/></proof>
</goal>
<goal name="bitset_correct1" expl="">
<proof prover="0"><result status="valid" time="2.43"/></proof>
</goal>
<goal name="bitset_correct2" expl="">
<proof prover="5"><result status="valid" time="0.30"/></proof>
</goal>
<goal name="bitset_equiv_def" expl="">
<proof prover="0"><result status="valid" time="4.64"/></proof>
</goal>
<goal name="bitsetx_equiv_def" expl="">
<proof prover="5"><result status="valid" time="0.22"/></proof>
</goal>
<goal name="WP_parameter bld" expl="VC for bld">
<proof prover="4"><result status="valid" time="1.36" steps="786"/></proof>
</goal>
<goal name="WP_parameter uint_recursion" expl="VC for uint_recursion">
<transf name="split_goal_wp">
<goal name="WP_parameter uint_recursion.1" expl="assertion">
<transf name="compute_in_goal">
<goal name="WP_parameter uint_recursion.1.1" expl="assertion">
<proof prover="0"><result status="valid" time="3.08"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter uint_recursion.2" expl="variant decrease">
<proof prover="4" steplimit="-1"><result status="valid" time="0.13" steps="73"/></proof>
</goal>
<goal name="WP_parameter uint_recursion.3" expl="precondition">
<proof prover="4" steplimit="-1"><result status="valid" time="0.14" steps="73"/></proof>
</goal>
<goal name="WP_parameter uint_recursion.4" expl="postcondition">
<proof prover="5"><result status="valid" time="3.55"/></proof>
</goal>
<goal name="WP_parameter uint_recursion.5" expl="postcondition">
<proof prover="0"><result status="valid" time="0.60"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter uint_bound" expl="VC for uint_bound">
<transf name="split_goal_wp">
<goal name="WP_parameter uint_bound.1" expl="precondition">
<proof prover="4" steplimit="-1"><result status="valid" time="0.10" steps="73"/></proof>
</goal>
<goal name="WP_parameter uint_bound.2" expl="assertion">
<proof prover="5"><result status="valid" time="3.11"/></proof>
</goal>
<goal name="WP_parameter uint_bound.3" expl="variant decrease">
<proof prover="4" steplimit="-1"><result status="valid" time="0.06" steps="75"/></proof>
</goal>
<goal name="WP_parameter uint_bound.4" expl="precondition">
<proof prover="4" steplimit="-1"><result status="valid" time="0.08" steps="75"/></proof>
</goal>
<goal name="WP_parameter uint_bound.5" expl="postcondition">
<proof prover="1"><result status="valid" time="4.13"/></proof>
</goal>
<goal name="WP_parameter uint_bound.6" expl="postcondition">
<proof prover="0" steplimit="-1"><result status="valid" time="0.21"/></proof>
</goal>
</transf>
</goal>
</theory>
<theory name="Shadow" sum="b68cde8d7dc402517d59c758cb43fec2">
<goal name="WP_parameter modify_r0" expl="VC for modify_r0">
<proof prover="4" steplimit="-1"><result status="valid" time="0.07" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r1" expl="VC for modify_r1">
<proof prover="4" steplimit="-1"><result status="valid" time="0.09" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r2" expl="VC for modify_r2">
<proof prover="4" steplimit="-1"><result status="valid" time="0.08" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r3" expl="VC for modify_r3">
<proof prover="4" steplimit="-1"><result status="valid" time="0.08" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r4" expl="VC for modify_r4">
<proof prover="4" steplimit="-1"><result status="valid" time="0.07" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r5" expl="VC for modify_r5">
<proof prover="4" steplimit="-1"><result status="valid" time="0.09" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r6" expl="VC for modify_r6">
<proof prover="4" steplimit="-1"><result status="valid" time="0.07" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r7" expl="VC for modify_r7">
<proof prover="4" steplimit="-1"><result status="valid" time="0.07" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r8" expl="VC for modify_r8">
<proof prover="4" steplimit="-1"><result status="valid" time="0.08" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r9" expl="VC for modify_r9">
<proof prover="4" steplimit="-1"><result status="valid" time="0.08" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r10" expl="VC for modify_r10">
<proof prover="4" steplimit="-1"><result status="valid" time="0.06" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r11" expl="VC for modify_r11">
<proof prover="4" steplimit="-1"><result status="valid" time="0.06" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r12" expl="VC for modify_r12">
<proof prover="4" steplimit="-1"><result status="valid" time="0.08" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r13" expl="VC for modify_r13">
<proof prover="4" steplimit="-1"><result status="valid" time="0.08" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r14" expl="VC for modify_r14">
<proof prover="4" steplimit="-1"><result status="valid" time="0.04" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r15" expl="VC for modify_r15">
<proof prover="4" steplimit="-1"><result status="valid" time="0.06" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r16" expl="VC for modify_r16">
<proof prover="4" steplimit="-1"><result status="valid" time="0.09" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r17" expl="VC for modify_r17">
<proof prover="4" steplimit="-1"><result status="valid" time="0.07" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r18" expl="VC for modify_r18">
<proof prover="4" steplimit="-1"><result status="valid" time="0.08" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r19" expl="VC for modify_r19">
<proof prover="4" steplimit="-1"><result status="valid" time="0.08" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r20" expl="VC for modify_r20">
<proof prover="4" steplimit="-1"><result status="valid" time="0.06" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r21" expl="VC for modify_r21">
<proof prover="4" steplimit="-1"><result status="valid" time="0.04" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r22" expl="VC for modify_r22">
<proof prover="4" steplimit="-1"><result status="valid" time="0.06" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r23" expl="VC for modify_r23">
<proof prover="4" steplimit="-1"><result status="valid" time="0.06" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r24" expl="VC for modify_r24">
<proof prover="4" steplimit="-1"><result status="valid" time="0.06" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r25" expl="VC for modify_r25">
<proof prover="4" steplimit="-1"><result status="valid" time="0.06" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r26" expl="VC for modify_r26">
<proof prover="4" steplimit="-1"><result status="valid" time="0.06" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r27" expl="VC for modify_r27">
<proof prover="4" steplimit="-1"><result status="valid" time="0.06" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r28" expl="VC for modify_r28">
<proof prover="4" steplimit="-1"><result status="valid" time="0.06" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r29" expl="VC for modify_r29">
<proof prover="4" steplimit="-1"><result status="valid" time="0.07" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r30" expl="VC for modify_r30">
<proof prover="4" steplimit="-1"><result status="valid" time="0.06" steps="72"/></proof>
</goal>
<goal name="WP_parameter modify_r31" expl="VC for modify_r31">
<proof prover="4" steplimit="-1"><result status="valid" time="0.06" steps="72"/></proof>
</goal>
<goal name="WP_parameter init" expl="VC for init">
<proof prover="4" steplimit="-1"><result status="valid" time="0.14" steps="138"/></proof>
</goal>
</theory>
</file>
</why3session>
This diff is collapsed.
#! /usr/bin/env bash
# generate the rewrite rules to expand 'uint' into a power series; these will be proven in why3, so
# this script is not part of the trusted code base
echo "lemma uint_0:"
echo " forall reg, lo. B.sum (reg,lo) 0 0 = 0"
for i in `seq 1 32`; do
echo "lemma uint_$i:"
echo -n " forall reg, lo. B.sum (reg,lo) 0 $i = reg[lo]"
for j in `seq 2 $i`; do
echo -n " + pow2 $((8*(j-1)))*reg[lo+$((j-1))]"
done
echo
echo "meta rewrite prop uint_$i"
done
#!/usr/bin/env python
# generate the simple lemmas equating pow-evocations to constants
for i in range(9,32):
print "lemma pow2_%(x)d: pow2 %(x)d = 0x%(y)x" % { 'x': 8*i, 'y': 2**(8*i) }
This diff is collapsed.
This diff is collapsed.
Supports Markdown
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