-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
220 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,55 @@ | ||
|
||
(* Converts Coq Z to ZArith Z. *) | ||
(** This module provides extra functions. *) | ||
|
||
val z_of_coqZ : Extracted.z -> Z.t | ||
(** Converts Coq Z to ZArith Z. *) | ||
|
||
(* Converts Zarith Z to Coq positive. *) | ||
val coqZ_of_z : Z.t -> Extracted.z | ||
(** Converts Zarith Z to Coq positive. *) | ||
|
||
(* Returns the unsigned value of a bit vector. *) | ||
val unsigned : Extracted.bits -> Z.t | ||
(** Returns the unsigned value of a bit vector. *) | ||
|
||
(* Returns the signed value of a bit vector. *) | ||
val signed : Extracted.bits -> Z.t | ||
(** Returns the signed value of a bit vector. *) | ||
|
||
(* Returns the bit vector of a Zarith Z. *) | ||
val bits_of_z : int -> Z.t -> Extracted.bits | ||
(** Returns the bit vector of a Zarith Z. *) | ||
|
||
(* Returns the string representation of a bit vector. MSB appears first. *) | ||
val string_of_bits : Extracted.bits -> string | ||
(** Returns the string representation of a bit vector. MSB appears first. *) | ||
|
||
(* Returns the bit vector represented as a binary string *) | ||
val bits_of_binary : string -> Extracted.bits | ||
(** Returns the bit vector represented as a binary string *) | ||
|
||
(* Returns the bit vector represented as a hex string *) | ||
val bits_of_hex : string -> Extracted.bits | ||
(** Returns the bit vector represented as a hex string *) | ||
|
||
(* Returns the bit vector represented as a numeric string. The bit width of | ||
the result is minimal. If the numeric string is positive, the unsigned | ||
value of the bit vector corresponds to the numeric string. If the numeric | ||
string is negative, the signed value of the bit vector corresponds to the | ||
numeric string. *) | ||
val bits_of_num : string -> Extracted.bits | ||
(** Returns the bit vector represented as a numeric string. The bit width of | ||
the result is minimal. If the numeric string is positive, the unsigned | ||
value of the bit vector corresponds to the numeric string. If the numeric | ||
string is negative, the signed value of the bit vector corresponds to the | ||
numeric string. *) | ||
|
||
(* Unsigned full multiplication. *) | ||
val umuljB : Extracted.bits -> Extracted.bits -> Extracted.bits | ||
(** Unsigned full multiplication. *) | ||
|
||
(* Signed full multiplication. *) | ||
val smuljB : Extracted.bits -> Extracted.bits -> Extracted.bits | ||
(** Signed full multiplication. *) | ||
|
||
(* Unsigned full multiplication. The first element of the result represents | ||
high bits. The first element of the result represents low bits. Raises | ||
Invalid_argument if the bit widths of the two inputs are different. *) | ||
val umullB : Extracted.bits -> Extracted.bits -> Extracted.bits * Extracted.bits | ||
(** Unsigned full multiplication. The first element of the result represents | ||
high bits. The first element of the result represents low bits. Raises | ||
Invalid_argument if the bit widths of the two inputs are different. *) | ||
|
||
(* Signed full multiplication. The first element of the result represents | ||
high bits. The first element of the result represents low bits. Raises | ||
Invalid_argument if the bit widths of the two inputs are different. *) | ||
val smullB : Extracted.bits -> Extracted.bits -> Extracted.bits * Extracted.bits | ||
(** Signed full multiplication. The first element of the result represents | ||
high bits. The first element of the result represents low bits. Raises | ||
Invalid_argument if the bit widths of the two inputs are different. *) | ||
|
||
(* Unsigned splitting. The results and the input have the same size. *) | ||
val usplB : Extracted.bits -> int -> Extracted.bits * Extracted.bits | ||
(** Unsigned splitting. The results and the input have the same size. *) | ||
|
||
(* Signed splitting. The results and the input have the same size. *) | ||
val ssplB : Extracted.bits -> int -> Extracted.bits * Extracted.bits | ||
(** Signed splitting. The results and the input have the same size. *) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.