summaryrefslogtreecommitdiff
path: root/interpret/data.ml
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ansys.com>2014-06-13 14:17:22 +0200
committerAlex Auvolat <alex.auvolat@ansys.com>2014-06-13 14:17:22 +0200
commitdedc98b0c14262c53e8573d7fe1dcaa370e43fb5 (patch)
treeac02f7271b054247984caa8aac13451ba98dc15b /interpret/data.ml
parentf7868083de2f351b5195149870e6e77398da44f9 (diff)
downloadscade-analyzer-dedc98b0c14262c53e8573d7fe1dcaa370e43fb5.tar.gz
scade-analyzer-dedc98b0c14262c53e8573d7fe1dcaa370e43fb5.zip
Move a lot of things.
Diffstat (limited to 'interpret/data.ml')
-rw-r--r--interpret/data.ml12
1 files changed, 3 insertions, 9 deletions
diff --git a/interpret/data.ml b/interpret/data.ml
index 51afcc3..cf7d820 100644
--- a/interpret/data.ml
+++ b/interpret/data.ml
@@ -2,13 +2,7 @@
open Util
open Ast
-
-exception Combinatorial_cycle of string
-exception No_variable of string
-exception Type_error of string
-let type_error e = raise (Type_error e)
-exception Not_implemented of string
-let not_implemented e = raise (Not_implemented e)
+open Ast_util
type scope = string
@@ -38,10 +32,10 @@ let get_var (st: state) (c: calc_map) (id: id) : (state * svalue) =
let r = f (VarMap.add id VBusy st) c in
(* Format.printf "]%s " id; *)
r
- with Not_found -> raise (No_variable id)
+ with Not_found -> no_variable id
in
match VarMap.find id st with
- | VBusy -> raise (Combinatorial_cycle id)
+ | VBusy -> combinatorial_cycle id
| v -> st, v
(* pretty-printing *)