summaryrefslogtreecommitdiff
path: root/abstract/abs_interp.ml
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ansys.com>2014-07-02 16:31:39 +0200
committerAlex Auvolat <alex.auvolat@ansys.com>2014-07-02 16:31:39 +0200
commit756c17d03b94919bfeaad55e2903e56dbac807bb (patch)
tree72f2405d6159a14817622dbd0291dc3781b1eb38 /abstract/abs_interp.ml
parentbc679afc4ac59c256a1b5f200078e495c188d066 (diff)
downloadscade-analyzer-756c17d03b94919bfeaad55e2903e56dbac807bb.tar.gz
scade-analyzer-756c17d03b94919bfeaad55e2903e56dbac807bb.zip
Add message when a step goes on BOT, ie. contradiction in assumes.
Diffstat (limited to 'abstract/abs_interp.ml')
-rw-r--r--abstract/abs_interp.ml30
1 files changed, 17 insertions, 13 deletions
diff --git a/abstract/abs_interp.ml b/abstract/abs_interp.ml
index 0db128f..c3db657 100644
--- a/abstract/abs_interp.ml
+++ b/abstract/abs_interp.ml
@@ -412,19 +412,23 @@ end = struct
let i = dd_singleton st.d_vars z in
let j = cycle st st.cl i in
- let cases = ref [] in
- Hashtbl.iter (fun case _ -> cases := case::(!cases)) j.data;
- List.iter
- (fun case ->
- let i' = set_target_case st i case in
- let j = cycle st st.cl i' in
- Hashtbl.iter (fun _ q -> add_case st q) j.data)
- !cases;
-
- st.delta <- List.filter ((<>) case) st.delta;
-
- if st.opt.verbose_ci then
- Format.printf "-> @[<hov>%a@]@." print_st st;
+ if Hashtbl.length j.data = 0 then
+ Format.printf "@.WARNING: contradictory hypotheses!@.@."
+ else begin
+ let cases = ref [] in
+ Hashtbl.iter (fun case _ -> cases := case::(!cases)) j.data;
+ List.iter
+ (fun case ->
+ let i' = set_target_case st i case in
+ let j = cycle st st.cl i' in
+ Hashtbl.iter (fun _ q -> add_case st q) j.data)
+ !cases;
+
+ st.delta <- List.filter ((<>) case) st.delta;
+
+ if st.opt.verbose_ci then
+ Format.printf "-> @[<hov>%a@]@." print_st st;
+ end
done;