How can I state (in Dafny) an \"ensures\" guarantee that the object returned by a method will be \"new\", i.e., will not be the same as an object used anywhere else (ye
You can say ensures fresh(b) on newArray.
ensures fresh(b)
newArray
fresh means exactly what you described: the object is not the same as any object that was allocated before the call to newArray.
fresh