Refinement over anonymous objects