diff options
author | Alex Auvolat <alex.auvolat@ansys.com> | 2014-06-19 10:51:59 +0200 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ansys.com> | 2014-06-19 10:51:59 +0200 |
commit | 8286c7c23a47c166aa87337a3146cdf3b278b144 (patch) | |
tree | 8126efa61eb9af62d1c4e97b504e78d5e9c772df /abstract/apron_domain.ml | |
parent | a2da1268c4a9af6755723698b7b6ba669aa7fd46 (diff) | |
download | scade-analyzer-8286c7c23a47c166aa87337a3146cdf3b278b144.tar.gz scade-analyzer-8286c7c23a47c166aa87337a3146cdf3b278b144.zip |
Isolate numerical part of domain. Next: isolate numerical part of equations.
Diffstat (limited to 'abstract/apron_domain.ml')
-rw-r--r-- | abstract/apron_domain.ml | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/abstract/apron_domain.ml b/abstract/apron_domain.ml index cef6b66..369f4b7 100644 --- a/abstract/apron_domain.ml +++ b/abstract/apron_domain.ml @@ -2,11 +2,11 @@ open Formula open Ast open Util -open Environment_domain +open Num_domain open Apron -module D : ENVIRONMENT_DOMAIN = struct +module ND : NUMERICAL_ENVIRONMENT_DOMAIN = struct (* manager *) type man = Polka.loose Polka.t @@ -93,27 +93,14 @@ module D : ENVIRONMENT_DOMAIN = struct Abstract1.bound_variable manager x (Var.of_string id) (* Apply some formula to the environment *) - let rec apply_cl x (cons, rest) = + let rec apply_ncl x cons = let env = Abstract1.env x in let tca = Array.of_list (List.map (tcons_of_cons env) cons) in let ar = Tcons1.array_make env (Array.length tca) in Array.iteri (Tcons1.array_set ar) tca; - let y = Abstract1.meet_tcons_array manager x ar in - apply_cl_r y rest - - and apply_cl_r x = function - | CLTrue -> x - | CLFalse -> vbottom x - | CLAnd(a, b) -> - let y = apply_cl_r x a in - apply_cl_r y b - | CLOr(a, b) -> - let y = apply_cl x a in - let z = apply_cl x b in - Abstract1.join manager y z - - let apply_f x f = apply_cl x (conslist_of_f f) - + Abstract1.meet_tcons_array manager x ar + + let assign x eqs = let env = Abstract1.env x in let vars = Array.of_list |