Inferring Flow of Control in Program Synthesis by Example

  • Stefan Schrödl
  • Stefan Edelkamp
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1701)


Abstract. We present a supervised, interactive learning technique that infers control structures of computer programs from user-demonstrated traces. A two-stage process is applied: first, a minimal deterministic finite automaton (DFA) M labeled by the instructions of the program is learned from a set of example traces and membership queries to the user. It accepts all preffixes of traces of the target program. The number of queries is bounded by O(k•|M|), with k being the total number of instructions in the initial example traces. In the second step we parse this automaton into a high-level programming language in O(|M|2) steps, replacing jumps by conditional control structures.


Regular Language Execution Trace Membership Query Deterministic Finite Automaton Program Synthesis 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    A. V. Aho, J. E. Hopcroft, and J. Ullman. The design and analysis of computer algorithms. Addison-Wesley, 1974.Google Scholar
  2. 2.
    D. Angluin. A note on the number of queries needed to identify regular languages. Information and Control, 51(1):76–87, 1981.zbMATHCrossRefMathSciNetGoogle Scholar
  3. 3.
    D. Angluin. Inferrence of reversible languages. Journal of the Association of Computing Machinery, 29:741–765, 1982.zbMATHMathSciNetGoogle Scholar
  4. 4.
    A. W. Biermann. The inference of regular lisp programs from examples. IEEE Trans. on Systems, Man, and Cybernetics, 8(8):585–600, 1978.zbMATHMathSciNetCrossRefGoogle Scholar
  5. 5.
    A. Cypher, editor. Watch What I Do: Programming by Demonstration. MIT Press, 1993.Google Scholar
  6. 6.
    P. Flener. Logic Program Synthesis from Incomplete Information. Kluwer Academic Publishers, 1995.Google Scholar
  7. 7.
    B. Gaines. Behaviour/structure transformations under uncertainty. International Journal of Man-Machine Studies, 8(3):337–365, 1976.zbMATHMathSciNetCrossRefGoogle Scholar
  8. 8.
    E. M. Gold. Language identification in the limit. Information and Control, 10(5):447–474, 1967.CrossRefzbMATHGoogle Scholar
  9. 9.
    E. M. Gold. Complexity of automaton identification from given data. Information and Control, 37(3):302–320, 1978.zbMATHCrossRefMathSciNetGoogle Scholar
  10. 10.
    D. E. Knuth. The Art of Computer Programming, Volume 3: Sorting and Searching. Addison-Wesley Publishing Company, Reading, 1973.Google Scholar
  11. 11.
    R. Parekh, C. Nichitiu, and V. Honovar. A polynomial time incremental algorithm for regular grammar inference. Technical Report 97-03, Department of computer science, Iowa State University, 1997.Google Scholar
  12. 12.
    J. C. Schlimmer and L. A. Hermens. Software agents: Completing patterns and constructing user interfaces. Journal of Artificial Intelligence Research, 1:61–89, 1993.Google Scholar
  13. 13.
    E. Y. Shapiro. Algorithmic Program Debuggging. PhD thesis, Yale University, 1983. Published under the same title by MIT press.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1999

Authors and Affiliations

  • Stefan Schrödl
    • 1
  • Stefan Edelkamp
    • 1
  1. 1.Institut für InformatikAlbert-Ludwigs-UniversitätFreiburgGermany

Personalised recommendations