diff options
author | Son HO | 2023-11-29 16:02:42 +0100 |
---|---|---|
committer | GitHub | 2023-11-29 16:02:42 +0100 |
commit | 789ba1473acd287814a0d659b5f5a0e480e4e9d7 (patch) | |
tree | 983ad685eb6b3c60b0baa3e3920dedbc6eaa0e57 /tests/fstar/misc/Bitwise.fst | |
parent | 90e42e0e1c1889aabfa66283fb15b43a5852a02a (diff) | |
parent | e732f97d09179fae43fafcb244340f98e3ca9229 (diff) |
Merge pull request #39 from AeneasVerif/afromher_shifts
Add support for bitshifts
Diffstat (limited to '')
-rw-r--r-- | tests/fstar/misc/Bitwise.fst | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/fstar/misc/Bitwise.fst b/tests/fstar/misc/Bitwise.fst new file mode 100644 index 00000000..d7ba2c57 --- /dev/null +++ b/tests/fstar/misc/Bitwise.fst @@ -0,0 +1,32 @@ +(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) +(** [bitwise] *) +module Bitwise +open Primitives + +#set-options "--z3rlimit 50 --fuel 1 --ifuel 1" + +(** [bitwise::shift_u32]: forward function + Source: 'src/bitwise.rs', lines 3:0-3:31 *) +let shift_u32 (a : u32) : result u32 = + let* t = u32_shr #Usize a 16 in u32_shl #Usize t 16 + +(** [bitwise::shift_i32]: forward function + Source: 'src/bitwise.rs', lines 10:0-10:31 *) +let shift_i32 (a : i32) : result i32 = + let* t = i32_shr #Isize a 16 in i32_shl #Isize t 16 + +(** [bitwise::xor_u32]: forward function + Source: 'src/bitwise.rs', lines 17:0-17:37 *) +let xor_u32 (a : u32) (b : u32) : result u32 = + Return (u32_xor a b) + +(** [bitwise::or_u32]: forward function + Source: 'src/bitwise.rs', lines 21:0-21:36 *) +let or_u32 (a : u32) (b : u32) : result u32 = + Return (u32_or a b) + +(** [bitwise::and_u32]: forward function + Source: 'src/bitwise.rs', lines 25:0-25:37 *) +let and_u32 (a : u32) (b : u32) : result u32 = + Return (u32_and a b) + |