Formal description of program structure and semantics in first order logic