summaryrefslogtreecommitdiff
path: root/aarch64
diff options
context:
space:
mode:
authorThomas Bauereiss2018-06-22 19:03:02 +0100
committerThomas Bauereiss2018-07-09 14:38:51 +0100
commitedc2be164fcf53c333796e55b93f94bf6c9ed152 (patch)
treee1ac424b8d6ee3ca7a5264bd7067c06fba283c9d /aarch64
parenta6770dbaf3231a8a8050cea588eb186ab8b36a77 (diff)
Simplify treating of undefined_bool in Lem library
Use nondeterministic choice by default instead of a deterministic bitstream generator in the state, which is slightly awkward to reason about, because every use of undefined_boolS changes the state. The previous behaviour can be implemented as Sail code, if desired. Also add a default implementation of internal_pick that nondeterministically chooses an element from a list.
Diffstat (limited to 'aarch64')
-rw-r--r--aarch64/aarch64_extras.lem2
-rw-r--r--aarch64/mono/aarch64_extras.lem4
2 files changed, 1 insertions, 5 deletions
diff --git a/aarch64/aarch64_extras.lem b/aarch64/aarch64_extras.lem
index a8bc6431..d22ece00 100644
--- a/aarch64/aarch64_extras.lem
+++ b/aarch64/aarch64_extras.lem
@@ -58,8 +58,6 @@ let hex_slice v len lo =
| Nothing -> Fail "hex_slice"
end
-let internal_pick vs = return (head vs)
-
(* Use constants for undefined values for now *)
let undefined_string () = return ""
let undefined_unit () = return ()
diff --git a/aarch64/mono/aarch64_extras.lem b/aarch64/mono/aarch64_extras.lem
index 1e91dd31..ffc8baf0 100644
--- a/aarch64/mono/aarch64_extras.lem
+++ b/aarch64/mono/aarch64_extras.lem
@@ -61,9 +61,7 @@ let hex_slice v len lo =
val BigEndianReverse : forall 'rv 'n 'e. Size 'n => mword 'n -> monad 'rv (mword 'n) 'e
let BigEndianReverse w = return (reverse_endianness w)
-let internal_pick vs = return (head vs)
-
-(* Use constants for undefined values for now *)
+(* Use constants for some undefined values for now *)
let undefined_string () = return ""
let undefined_unit () = return ()
let undefined_int () = return (0:ii)