Correct-schema-guided Synthesis of Steadfast Programs Pierre Flener Dept of Computer Science Bilkent University 06533 Bilkent, Ankara, Turkey pf@cs.bilkent.edu.tr Kung-Kiu Lau Dept of Computer Science University of Manchester Manchester M13 9PL, UK kung-kiu@cs.man.ac.uk Mario Ornaghi DSI Univ. degli studi di Milano 20135 Milano, Italy ornaghi@dsi.unimi.it Abstract: It can be argued that for (semi-)automated software development, program schemas are indispensable, since they capture not only structured program design principles, but also domain knowledge, both of which are of crucial importance for hierarchical program synthesis. Most researchers represent schemas purely syntactically (as higher-order expressions). This means that the knowledge captured by a schema is not formalised. We take a semantic approach and show that a schema can be formalised as an open (first-order) logical theory that contains an open logic program. By using a special kind of correctness for open programs, called steadfastness, we can define and reason about the correctness of schemas. We also show how to use correct schemas to synthesise steadfast programs.