Mentions légales du service

Skip to content
Snippets Groups Projects
Commit a46242fa authored by Stefan Berghofer's avatar Stefan Berghofer
Browse files

Adapted Isabelle realization to changes in bv.why

parent 918b8542
No related branches found
No related tags found
No related merge requests found
...@@ -240,6 +240,10 @@ where "rotate_left_bv v n \<equiv> word_rotl (unat n) v" ...@@ -240,6 +240,10 @@ where "rotate_left_bv v n \<equiv> word_rotl (unat n) v"
abbreviation (input) rotate_right_bv :: "'a::len0 word \<Rightarrow> 'a word \<Rightarrow> 'a word" abbreviation (input) rotate_right_bv :: "'a::len0 word \<Rightarrow> 'a word \<Rightarrow> 'a word"
where "rotate_right_bv v n \<equiv> word_rotr (unat n) v" where "rotate_right_bv v n \<equiv> word_rotr (unat n) v"
definition eq_sub_bv :: "'a::len word \<Rightarrow> 'a word \<Rightarrow> 'a word \<Rightarrow> 'a word \<Rightarrow> bool" where
eq_sub_bv_defn: "eq_sub_bv a b i n =
(b AND (mask (unat n) << unat i) = a AND (mask (unat n) << unat i))"
type_synonym word8 = "8 word" type_synonym word8 = "8 word"
why3_open "bv/BV8.xml" why3_open "bv/BV8.xml"
...@@ -271,6 +275,7 @@ why3_open "bv/BV8.xml" ...@@ -271,6 +275,7 @@ why3_open "bv/BV8.xml"
to_uint=uint to_uint=uint
to_int=sint to_int=sint
of_int=of_int of_int=of_int
eq_sub_bv=eq_sub_bv
types types
t=word8 t=word8
...@@ -347,6 +352,9 @@ why3_vc to_uint_of_int ...@@ -347,6 +352,9 @@ why3_vc to_uint_of_int
using assms using assms
by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial) by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial)
why3_vc nth_bv_def
by (simp add: word_eq_iff word_ops_nth_size word_size nth_shiftr)
why3_vc Nth_bv_is_nth why3_vc Nth_bv_is_nth
by (simp add: bv_nth_def unat_def) by (simp add: bv_nth_def unat_def)
...@@ -424,8 +432,10 @@ why3_vc Extensionality ...@@ -424,8 +432,10 @@ why3_vc Extensionality
by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat) by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat)
why3_vc eq_sub_equiv why3_vc eq_sub_equiv
by (simp add: eq_sub_equiv_aux eq_sub_def by (simp add: eq_sub_equiv_aux eq_sub_def eq_sub_bv_defn bv_nth_def)
eq_sub_bv_def [simplified of_int_1, folded mask_def] bv_nth_def)
why3_vc eq_sub_bv_def
by (simp add: eq_sub_bv_defn mask_def)
why3_end why3_end
...@@ -461,6 +471,7 @@ why3_open "bv/BV16.xml" ...@@ -461,6 +471,7 @@ why3_open "bv/BV16.xml"
to_uint=uint to_uint=uint
to_int=sint to_int=sint
of_int=of_int of_int=of_int
eq_sub_bv=eq_sub_bv
types types
t=word16 t=word16
...@@ -537,6 +548,9 @@ why3_vc to_uint_of_int ...@@ -537,6 +548,9 @@ why3_vc to_uint_of_int
using assms using assms
by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial) by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial)
why3_vc nth_bv_def
by (simp add: word_eq_iff word_ops_nth_size word_size nth_shiftr)
why3_vc Nth_bv_is_nth why3_vc Nth_bv_is_nth
by (simp add: bv_nth_def unat_def) by (simp add: bv_nth_def unat_def)
...@@ -614,8 +628,10 @@ why3_vc Extensionality ...@@ -614,8 +628,10 @@ why3_vc Extensionality
by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat) by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat)
why3_vc eq_sub_equiv why3_vc eq_sub_equiv
by (simp add: eq_sub_equiv_aux eq_sub_def by (simp add: eq_sub_equiv_aux eq_sub_def eq_sub_bv_defn bv_nth_def)
eq_sub_bv_def [simplified of_int_1, folded mask_def] bv_nth_def)
why3_vc eq_sub_bv_def
by (simp add: eq_sub_bv_defn mask_def)
why3_end why3_end
...@@ -651,6 +667,7 @@ why3_open "bv/BV32.xml" ...@@ -651,6 +667,7 @@ why3_open "bv/BV32.xml"
to_uint=uint to_uint=uint
to_int=sint to_int=sint
of_int=of_int of_int=of_int
eq_sub_bv=eq_sub_bv
types types
t=word32 t=word32
...@@ -727,6 +744,9 @@ why3_vc to_uint_of_int ...@@ -727,6 +744,9 @@ why3_vc to_uint_of_int
using assms using assms
by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial) by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial)
why3_vc nth_bv_def
by (simp add: word_eq_iff word_ops_nth_size word_size nth_shiftr)
why3_vc Nth_bv_is_nth why3_vc Nth_bv_is_nth
by (simp add: bv_nth_def unat_def) by (simp add: bv_nth_def unat_def)
...@@ -804,8 +824,10 @@ why3_vc Extensionality ...@@ -804,8 +824,10 @@ why3_vc Extensionality
by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat) by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat)
why3_vc eq_sub_equiv why3_vc eq_sub_equiv
by (simp add: eq_sub_equiv_aux eq_sub_def by (simp add: eq_sub_equiv_aux eq_sub_def eq_sub_bv_defn bv_nth_def)
eq_sub_bv_def [simplified of_int_1, folded mask_def] bv_nth_def)
why3_vc eq_sub_bv_def
by (simp add: eq_sub_bv_defn mask_def)
why3_end why3_end
...@@ -841,6 +863,7 @@ why3_open "bv/BV64.xml" ...@@ -841,6 +863,7 @@ why3_open "bv/BV64.xml"
to_uint=uint to_uint=uint
to_int=sint to_int=sint
of_int=of_int of_int=of_int
eq_sub_bv=eq_sub_bv
types types
t=word64 t=word64
...@@ -917,6 +940,9 @@ why3_vc to_uint_of_int ...@@ -917,6 +940,9 @@ why3_vc to_uint_of_int
using assms using assms
by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial) by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial)
why3_vc nth_bv_def
by (simp add: word_eq_iff word_ops_nth_size word_size nth_shiftr)
why3_vc Nth_bv_is_nth why3_vc Nth_bv_is_nth
by (simp add: bv_nth_def unat_def) by (simp add: bv_nth_def unat_def)
...@@ -994,8 +1020,10 @@ why3_vc Extensionality ...@@ -994,8 +1020,10 @@ why3_vc Extensionality
by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat) by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat)
why3_vc eq_sub_equiv why3_vc eq_sub_equiv
by (simp add: eq_sub_equiv_aux eq_sub_def by (simp add: eq_sub_equiv_aux eq_sub_def eq_sub_bv_defn bv_nth_def)
eq_sub_bv_def [simplified of_int_1, folded mask_def] bv_nth_def)
why3_vc eq_sub_bv_def
by (simp add: eq_sub_bv_defn mask_def)
why3_end why3_end
......
...@@ -240,6 +240,10 @@ where "rotate_left_bv v n \<equiv> word_rotl (unat n) v" ...@@ -240,6 +240,10 @@ where "rotate_left_bv v n \<equiv> word_rotl (unat n) v"
abbreviation (input) rotate_right_bv :: "'a::len0 word \<Rightarrow> 'a word \<Rightarrow> 'a word" abbreviation (input) rotate_right_bv :: "'a::len0 word \<Rightarrow> 'a word \<Rightarrow> 'a word"
where "rotate_right_bv v n \<equiv> word_rotr (unat n) v" where "rotate_right_bv v n \<equiv> word_rotr (unat n) v"
definition eq_sub_bv :: "'a::len word \<Rightarrow> 'a word \<Rightarrow> 'a word \<Rightarrow> 'a word \<Rightarrow> bool" where
eq_sub_bv_defn: "eq_sub_bv a b i n =
(b AND (mask (unat n) << unat i) = a AND (mask (unat n) << unat i))"
type_synonym word8 = "8 word" type_synonym word8 = "8 word"
why3_open "bv/BV8.xml" why3_open "bv/BV8.xml"
...@@ -271,6 +275,7 @@ why3_open "bv/BV8.xml" ...@@ -271,6 +275,7 @@ why3_open "bv/BV8.xml"
to_uint=uint to_uint=uint
to_int=sint to_int=sint
of_int=of_int of_int=of_int
eq_sub_bv=eq_sub_bv
types types
t=word8 t=word8
...@@ -347,6 +352,9 @@ why3_vc to_uint_of_int ...@@ -347,6 +352,9 @@ why3_vc to_uint_of_int
using assms using assms
by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial) by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial)
why3_vc nth_bv_def
by (simp add: word_eq_iff word_ops_nth_size word_size nth_shiftr)
why3_vc Nth_bv_is_nth why3_vc Nth_bv_is_nth
by (simp add: bv_nth_def unat_def) by (simp add: bv_nth_def unat_def)
...@@ -424,8 +432,10 @@ why3_vc Extensionality ...@@ -424,8 +432,10 @@ why3_vc Extensionality
by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat) by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat)
why3_vc eq_sub_equiv why3_vc eq_sub_equiv
by (simp add: eq_sub_equiv_aux eq_sub_def by (simp add: eq_sub_equiv_aux eq_sub_def eq_sub_bv_defn bv_nth_def)
eq_sub_bv_def [simplified of_int_1, folded mask_def] bv_nth_def)
why3_vc eq_sub_bv_def
by (simp add: eq_sub_bv_defn mask_def)
why3_end why3_end
...@@ -461,6 +471,7 @@ why3_open "bv/BV16.xml" ...@@ -461,6 +471,7 @@ why3_open "bv/BV16.xml"
to_uint=uint to_uint=uint
to_int=sint to_int=sint
of_int=of_int of_int=of_int
eq_sub_bv=eq_sub_bv
types types
t=word16 t=word16
...@@ -537,6 +548,9 @@ why3_vc to_uint_of_int ...@@ -537,6 +548,9 @@ why3_vc to_uint_of_int
using assms using assms
by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial) by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial)
why3_vc nth_bv_def
by (simp add: word_eq_iff word_ops_nth_size word_size nth_shiftr)
why3_vc Nth_bv_is_nth why3_vc Nth_bv_is_nth
by (simp add: bv_nth_def unat_def) by (simp add: bv_nth_def unat_def)
...@@ -614,8 +628,10 @@ why3_vc Extensionality ...@@ -614,8 +628,10 @@ why3_vc Extensionality
by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat) by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat)
why3_vc eq_sub_equiv why3_vc eq_sub_equiv
by (simp add: eq_sub_equiv_aux eq_sub_def by (simp add: eq_sub_equiv_aux eq_sub_def eq_sub_bv_defn bv_nth_def)
eq_sub_bv_def [simplified of_int_1, folded mask_def] bv_nth_def)
why3_vc eq_sub_bv_def
by (simp add: eq_sub_bv_defn mask_def)
why3_end why3_end
...@@ -651,6 +667,7 @@ why3_open "bv/BV32.xml" ...@@ -651,6 +667,7 @@ why3_open "bv/BV32.xml"
to_uint=uint to_uint=uint
to_int=sint to_int=sint
of_int=of_int of_int=of_int
eq_sub_bv=eq_sub_bv
types types
t=word32 t=word32
...@@ -727,6 +744,9 @@ why3_vc to_uint_of_int ...@@ -727,6 +744,9 @@ why3_vc to_uint_of_int
using assms using assms
by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial) by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial)
why3_vc nth_bv_def
by (simp add: word_eq_iff word_ops_nth_size word_size nth_shiftr)
why3_vc Nth_bv_is_nth why3_vc Nth_bv_is_nth
by (simp add: bv_nth_def unat_def) by (simp add: bv_nth_def unat_def)
...@@ -804,8 +824,10 @@ why3_vc Extensionality ...@@ -804,8 +824,10 @@ why3_vc Extensionality
by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat) by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat)
why3_vc eq_sub_equiv why3_vc eq_sub_equiv
by (simp add: eq_sub_equiv_aux eq_sub_def by (simp add: eq_sub_equiv_aux eq_sub_def eq_sub_bv_defn bv_nth_def)
eq_sub_bv_def [simplified of_int_1, folded mask_def] bv_nth_def)
why3_vc eq_sub_bv_def
by (simp add: eq_sub_bv_defn mask_def)
why3_end why3_end
...@@ -841,6 +863,7 @@ why3_open "bv/BV64.xml" ...@@ -841,6 +863,7 @@ why3_open "bv/BV64.xml"
to_uint=uint to_uint=uint
to_int=sint to_int=sint
of_int=of_int of_int=of_int
eq_sub_bv=eq_sub_bv
types types
t=word64 t=word64
...@@ -917,6 +940,9 @@ why3_vc to_uint_of_int ...@@ -917,6 +940,9 @@ why3_vc to_uint_of_int
using assms using assms
by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial) by (simp add: uint_in_range_def word_of_int uint_word_of_int mod_pos_pos_trivial)
why3_vc nth_bv_def
by (simp add: word_eq_iff word_ops_nth_size word_size nth_shiftr)
why3_vc Nth_bv_is_nth why3_vc Nth_bv_is_nth
by (simp add: bv_nth_def unat_def) by (simp add: bv_nth_def unat_def)
...@@ -994,8 +1020,10 @@ why3_vc Extensionality ...@@ -994,8 +1020,10 @@ why3_vc Extensionality
by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat) by (simp add: eq_sub_def bv_nth_def word_eq_iff all_nat)
why3_vc eq_sub_equiv why3_vc eq_sub_equiv
by (simp add: eq_sub_equiv_aux eq_sub_def by (simp add: eq_sub_equiv_aux eq_sub_def eq_sub_bv_defn bv_nth_def)
eq_sub_bv_def [simplified of_int_1, folded mask_def] bv_nth_def)
why3_vc eq_sub_bv_def
by (simp add: eq_sub_bv_defn mask_def)
why3_end why3_end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment