summaryrefslogtreecommitdiff
path: root/src/lem_interp/interp_interface.lem
diff options
context:
space:
mode:
authorKathy Gray2016-01-28 13:05:46 +0000
committerKathy Gray2016-01-28 13:05:46 +0000
commitf2f9a5859d6bae6a1d2eced2393f970c4bba85da (patch)
tree992f63d5d75c83c777bc86b3338c16032e08b0fe /src/lem_interp/interp_interface.lem
parentdeef7b2014e05e6ffedb7d5405520cae0fc288e6 (diff)
Support exit and assert better in sequential interpreter and general interpreter interface
Diffstat (limited to 'src/lem_interp/interp_interface.lem')
-rw-r--r--src/lem_interp/interp_interface.lem4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lem_interp/interp_interface.lem b/src/lem_interp/interp_interface.lem
index ad60699e..479ecdca 100644
--- a/src/lem_interp/interp_interface.lem
+++ b/src/lem_interp/interp_interface.lem
@@ -460,12 +460,16 @@ type outcome =
(* Escape the current instruction, for traps, some sys calls, interrupts, etc. Can optionally provide a handler
The non-optional instruction_state is what we would be doing if we're not escaping. This is for exhaustive interp*)
| Escape of maybe instruction_state * instruction_state
+(*Result of a failed assert with possible error message to report*)
+| Fail of maybe string
(* Stop for incremental stepping, function can be used to display function call data *)
| Internal of maybe string * maybe (unit -> string) * instruction_state
(* Analysis can lead to non_deterministic evaluation, represented with this outcome *)
(*Note: this should not be externally visible *)
| Analysis_non_det of list instruction_state * instruction_state
+(*Completed interpreter*)
| Done
+(*Interpreter error*)
| Error of string
type event =