summaryrefslogtreecommitdiff
path: root/tests/fstar/misc/Bitwise.fst
blob: 8d6bab58b354376b8999bbf4eab4652d8e605095 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *)
(** [bitwise] *)
module Bitwise
open Primitives

#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"

(** [bitwise::shift_u32]:
    Source: 'tests/src/bitwise.rs', lines 4:0-4:31 *)
let shift_u32 (a : u32) : result u32 =
  let* t = u32_shr #Usize a 16 in u32_shl #Usize t 16

(** [bitwise::shift_i32]:
    Source: 'tests/src/bitwise.rs', lines 11:0-11:31 *)
let shift_i32 (a : i32) : result i32 =
  let* t = i32_shr #Isize a 16 in i32_shl #Isize t 16

(** [bitwise::xor_u32]:
    Source: 'tests/src/bitwise.rs', lines 18:0-18:37 *)
let xor_u32 (a : u32) (b : u32) : result u32 =
  Ok (u32_xor a b)

(** [bitwise::or_u32]:
    Source: 'tests/src/bitwise.rs', lines 22:0-22:36 *)
let or_u32 (a : u32) (b : u32) : result u32 =
  Ok (u32_or a b)

(** [bitwise::and_u32]:
    Source: 'tests/src/bitwise.rs', lines 26:0-26:37 *)
let and_u32 (a : u32) (b : u32) : result u32 =
  Ok (u32_and a b)