Text this: Logical theory for program construction