let inter c1 c2 =
match c1, c2 with
| Unconstrained, Unconstrained -> Unconstrained
| Unconstrained, _ -> c2
| _, Unconstrained -> c1
| Real(d1), Real(d2) ->
(try
let d = Dom.inter d1 d2 in
mk_real (Dom.inter d1 d2)
with
Dom.Empty -> raise Empty)
| Bitvector(n1), Bitvector(n2) ->
if n1 = n2 then c1 else raise Empty
| _ -> (* bitvectors and real domains assumed to be disjoint. *)
raise Empty