A Refinement Calculus for Tuple Spaces