Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
why3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.4.
Show more breadcrumbs
Why3
why3
Commits
a46242fa
Commit
a46242fa
authored
9 years ago
by
Stefan Berghofer
Browse files
Options
Downloads
Patches
Plain Diff
Adapted Isabelle realization to changes in bv.why
parent
918b8542
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/isabelle/Why3_BV.thy.2015
+36
-8
36 additions, 8 deletions
lib/isabelle/Why3_BV.thy.2015
lib/isabelle/Why3_BV.thy.2016
+36
-8
36 additions, 8 deletions
lib/isabelle/Why3_BV.thy.2016
with
72 additions
and
16 deletions
lib/isabelle/Why3_BV.thy.2015
+
36
−
8
View file @
a46242fa
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
lib/isabelle/Why3_BV.thy.2016
+
36
−
8
View file @
a46242fa
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment