A Purely Logical Approach to the Termination of Imperative Loops

Ma Eras, Tudor Jebelean
2010 2010 12th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing  
We present and illustrate a method for the generation of the termination conditions for nested loops with abrupt termination statements. The conditions are (first-order) formulae obtained by certain transformations of the program text. The loops are treated similarly to calls of recursively defined functions. The program text is analyzed on all possible execution paths by forward symbolic execution using certain meta-level functions which define the syntax, the semantics, the verification
more » ... ions for the partial correctness, and the termination conditions. The termination conditions are expressed as induction principles, however, still in first-order logic. Our approach is simpler than others because we use neither an additional model for program execution, nor a fixpoint theory for the definition of program semantics. Because the meta-level functions are fully formalized in predicate logic, it is possible to prove in a purely logical way and at object level that the verification conditions are necessary and sufficient for the existence and uniqueness of the function implemented by the program.
doi:10.1109/synasc.2010.64 dblp:conf/synasc/ErascuJ10 fatcat:3m4hh6ejrzgybiez6nwp2ecbre