A program logic for obstruction-freedom