let ptr = function
      | Addr(b,d) -> model_ptr b d
      | Ptr p -> p