diff options
| author | Thomas Bauereiss | 2018-02-07 14:11:42 +0000 |
|---|---|---|
| committer | Thomas Bauereiss | 2018-02-07 16:09:24 +0000 |
| commit | b7c7675e78738f356716ba27d212225e60d5a856 (patch) | |
| tree | 70bdca0d9b8acd4097768cfcec8dcc69a22c0a5d /src | |
| parent | e7471c23826487457e87099664e2b19aa699c94e (diff) | |
Add some printing functions to Lem shallow embedding
Diffstat (limited to 'src')
| -rw-r--r-- | src/gen_lib/sail_operators_bitlists.lem | 3 | ||||
| -rw-r--r-- | src/gen_lib/sail_operators_mwords.lem | 3 | ||||
| -rw-r--r-- | src/gen_lib/sail_values.lem | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/gen_lib/sail_operators_bitlists.lem b/src/gen_lib/sail_operators_bitlists.lem index 374628a4..d2a2aea1 100644 --- a/src/gen_lib/sail_operators_bitlists.lem +++ b/src/gen_lib/sail_operators_bitlists.lem @@ -57,6 +57,9 @@ let msb = most_significant val int_of_vec : bool -> list bitU -> integer let int_of_vec = int_of_bv +val string_of_vec : list bitU -> string +let string_of_vec = string_of_bv + val and_vec : list bitU -> list bitU -> list bitU val or_vec : list bitU -> list bitU -> list bitU val xor_vec : list bitU -> list bitU -> list bitU diff --git a/src/gen_lib/sail_operators_mwords.lem b/src/gen_lib/sail_operators_mwords.lem index 7fa09b9b..bd7ef2b4 100644 --- a/src/gen_lib/sail_operators_mwords.lem +++ b/src/gen_lib/sail_operators_mwords.lem @@ -57,6 +57,9 @@ let msb = most_significant val int_of_vec : forall 'a. Size 'a => bool -> mword 'a -> integer let int_of_vec = int_of_bv +val string_of_vec : forall 'a. Size 'a => mword 'a -> string +let string_of_vec = string_of_bv + val and_vec : forall 'a. Size 'a => mword 'a -> mword 'a -> mword 'a val or_vec : forall 'a. Size 'a => mword 'a -> mword 'a -> mword 'a val xor_vec : forall 'a. Size 'a => mword 'a -> mword 'a -> mword 'a diff --git a/src/gen_lib/sail_values.lem b/src/gen_lib/sail_values.lem index 50dacf5e..4cbcc269 100644 --- a/src/gen_lib/sail_values.lem +++ b/src/gen_lib/sail_values.lem @@ -498,6 +498,9 @@ let extz_bv n v = of_bits (extz_bits n (bits_of v)) val exts_bv : forall 'a 'b. Bitvector 'a, Bitvector 'b => integer -> 'a -> 'b let exts_bv n v = of_bits (exts_bits n (bits_of v)) +val string_of_bv : forall 'a. Bitvector 'a => 'a -> string +let string_of_bv v = show_bitlist (bits_of v) + (*** Bytes and addresses *) val byte_chunks : forall 'a. nat -> list 'a -> list (list 'a) |
