Similar Items: Flexible Correct-by-Construction Programming