let width b = match b with | Const(c) -> Bitv.length c | Sub(n, i, j) -> j - i + 1 | Conc(n, m) -> n + m