Reasoning About Multi-stage Programs