let extract_from_data = function
    | Data d -> F.unwrap d
    | Value v -> F.unwrap (M.logic_of_value v)
    | _ -> assert false