@@ -278,7 +278,6 @@ struct
278
278
let to_yojson _ = failwith " ToDo Implement in future"
279
279
280
280
let is_bot t = equal t (bot () )
281
- let is_bot_env t = t.d = None
282
281
283
282
(* this shows "top" for a specific environment to enable the calculations. It is the top_of of all equalities *)
284
283
let top_of env = {d = Some (EArray. make_empty_array (Environment. size env)); env = env}
@@ -417,22 +416,19 @@ struct
417
416
List. iter iterate new_components ; Some ad
418
417
in
419
418
(* Normalize the two domains a and b such that both talk about the same variables*)
420
- if is_bot_env a then
421
- b
422
- else if is_bot_env b then
423
- a
424
- else
425
- match Option. get a .d , Option. get b .d with
426
- | x , y when is_top a || is_top b ->
419
+ match a .d , b .d with
420
+ | None, _ -> b
421
+ | _ , None -> a
422
+ | Some x , Some y when is_top a || is_top b ->
427
423
let new_env = Environment. lce a.env b.env in
428
424
top_of new_env
429
- | x , y when (Environment. compare a.env b.env <> 0 ) ->
425
+ | Some x , Some y when (Environment. compare a.env b.env <> 0 ) ->
430
426
let sup_env = Environment. lce a.env b.env in
431
427
let mod_x = dim_add (Environment. dimchange a.env sup_env) x in
432
428
let mod_y = dim_add (Environment. dimchange b.env sup_env) y in
433
429
{d = join_d mod_x mod_y; env = sup_env}
434
- | x , y when EArray. equal x y -> {d = Some x; env = a.env}
435
- | x , y -> {d = join_d x y; env = a.env}
430
+ | Some x , Some y when EArray. equal x y -> {d = Some x; env = a.env}
431
+ | Some x , Some y -> {d = join_d x y; env = a.env}
436
432
437
433
let join a b = timing_wrap " join" (join a) b
438
434
@@ -601,7 +597,7 @@ struct
601
597
*)
602
598
let meet_tcons ask t tcons original_expr no_ov =
603
599
match t.d with
604
- | None -> bot_env (* same as is_bot_env t *)
600
+ | None -> t
605
601
| Some d ->
606
602
match simplified_monomials_from_texp t (Texpr1. to_expr @@ Tcons1. get_texpr1 tcons) with
607
603
| None -> t
0 commit comments