Schema-guided synthesis of imperative programs by constraint solving

  • Authors:
  • Michael A. Colón

  • Affiliations:
  • Naval Research Laboratory, Center for High Assurance Computer Systems, Washington, D.C.

  • Venue:
  • LOPSTR'04 Proceedings of the 14th international conference on Logic Based Program Synthesis and Transformation
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a method for schema-guided synthesis of imperative programs computing polynomial functions and their inverses. The schemas of our approach contain parameters representing both fragments of code and fragments of invariants, and they generate programs annotated with loop invariants establishing partial correctness. Schema application entails simultaneously instantiating the code parameters to polynomials and the invariant parameters to systems of polynomial equalities. By bounding the degrees of these polynomials and their number, our method reduces schema instantiation to non-linear constraint solving, based on the theory of polynomial ideals. Although non-linear constraint solving is NP-hard, a solution can be generated automatically when the resulting system contains few constraints. A specialization of our method yields linear constraints by further restricting the form of the invariants. This restriction improves the efficiency of constraint solving, but may fail to synthesize programs derivable by the general method.