diff options
author | Alex Auvolat <alex.auvolat@ansys.com> | 2014-06-17 17:38:29 +0200 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ansys.com> | 2014-06-17 17:38:29 +0200 |
commit | 2b62d844cc81b60bcbdfc145097139995ea6f3a0 (patch) | |
tree | 8c34ecf12daf28569ac8a5364eb0438b9262308c /abstract/apron_domain.ml | |
parent | ce4f339ced19e2ff7d79c2c8ec5b3ee478d5d365 (diff) | |
download | scade-analyzer-2b62d844cc81b60bcbdfc145097139995ea6f3a0.tar.gz scade-analyzer-2b62d844cc81b60bcbdfc145097139995ea6f3a0.zip |
Some abstract interpretation does something now.
Diffstat (limited to 'abstract/apron_domain.ml')
-rw-r--r-- | abstract/apron_domain.ml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/abstract/apron_domain.ml b/abstract/apron_domain.ml index 1cc418e..ad483ec 100644 --- a/abstract/apron_domain.ml +++ b/abstract/apron_domain.ml @@ -68,6 +68,9 @@ module D : ENVIRONMENT_DOMAIN = struct Environment.add env [| Var.of_string id |] [||] in Abstract1.change_environment manager x env2 false + let forgetvar x id = + let v = [| Var.of_string id |] in + Abstract1.forget_array manager x v false let rmvar x id = let v = [| Var.of_string id |] in let env = Abstract1.env x in @@ -105,6 +108,14 @@ module D : ENVIRONMENT_DOMAIN = struct Abstract1.join manager y z let apply_f x f = apply_cl x (conslist_of_f f) + + let assign x eqs = + let env = Abstract1.env x in + let vars = Array.of_list + (List.map (fun (id, _) -> Var.of_string id) eqs) in + let vals = Array.of_list + (List.map (fun (_, v) -> Texpr1.of_expr env (texpr_of_nexpr v)) eqs) in + Abstract1.assign_texpr_array manager x vars vals None (* Ensemblistic operations *) |