let cnstrnt_of x =
let c = match x with
| Slack(_, Zero) -> Real(Dom.Int)
| Slack(_, Nonneg(d)) -> Real(d)
| Const(_, _, c) -> c
| External(_, c) -> c
| Fresh(_, _, c) -> c
| Rename(_, _, c) -> c
in
if c = Unconstrained then raise Not_found else c