Skip to content

Commit

Permalink
qfabv
Browse files Browse the repository at this point in the history
  • Loading branch information
strub committed Nov 14, 2024
1 parent ff24051 commit 1d04ab9
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions theories/datatypes/QFABV.ec
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ theory BVOperators.
op bvrol : bv -> bv -> bv.
axiom bvrolP (bv1 bv2 : bv) : false.
axiom bvrolP (bv1 bv2 : bv) (i: int) :
0 <= i < BV.size =>
List.nth false (tolist (bvrol bv1 bv2)) i =
List.nth false (tolist bv1) ((i-touint bv2)%%BV.size).
end BVROL.
(* ------------------------------------------------------------------ *)
Expand All @@ -150,7 +154,11 @@ theory BVOperators.
op bvror : bv -> bv -> bv.
axiom bvrorP (bv1 bv2 : bv) : false.
axiom bvrorP (bv1 bv2 : bv) (i: int):
0 <= i < BV.size =>
List.nth false (tolist (bvror bv1 bv2)) i =
List.nth false (tolist bv1) ((i+touint bv2)%%BV.size).
end BVROR.
(* ------------------------------------------------------------------ *)
Expand Down Expand Up @@ -198,9 +206,9 @@ theory BVOperators.
clone import BV.
op bvxor: bv -> bv -> bv.
axiom bvxorP (bv1 bv2 : bv) : tolist (bvxor bv1 bv2) =
map (fun (b : _ * _) => b.`1 \/ b.`2) (zip (tolist bv1) (tolist bv2)).
map (fun (b : _ * _) => Bool.(^^) b.`1 b.`2)%Bool (zip (tolist bv1) (tolist bv2)).
end BVXor.
(* ------------------------------------------------------------------ *)
Expand Down

0 comments on commit 1d04ab9

Please sign in to comment.