Heuristics for program synthesis using loop invariants

  • Authors:
  • Joe W. Duran

  • Affiliations:
  • -

  • Venue:
  • ACM '78 Proceedings of the 1978 annual conference - Volume 2
  • Year:
  • 1978

Quantified Score

Hi-index 0.00

Visualization

Abstract

The problem of automatically synthesizing programs from formal specifications can be stated as, “constructively prove that there exists a program P which transforms valid input into output satisfying the required output assertion.” If Prequires a loop, the proof will contain an induction. This is beyond the ability of current theorem provers and synthesis systems. In this paper, the loop invariant is used to reduce the problem of synthesizing loops to that of synthesizing three loop free sections — initialization, assignment to loop control variables, and assignment to all other program variables. The three sections are then assembled into a standard loop form, namely “(initialization) WHILE B DO (loop body) OD”. Second order theorem provers adequate for these subproblems have not yet been developed. Therefore, heuristics are presented for synthesizing the three sections. Several examples are presented.