Inferring Flow of Control in Program Synthesis by Example
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.
KeywordsRegular Language Execution Trace Membership Query Deterministic Finite Automaton Program Synthesis
Unable to display preview. Download preview PDF.
- 1.A. V. Aho, J. E. Hopcroft, and J. Ullman. The design and analysis of computer algorithms. Addison-Wesley, 1974.Google Scholar
- 5.A. Cypher, editor. Watch What I Do: Programming by Demonstration. MIT Press, 1993.Google Scholar
- 6.P. Flener. Logic Program Synthesis from Incomplete Information. Kluwer Academic Publishers, 1995.Google Scholar
- 10.D. E. Knuth. The Art of Computer Programming, Volume 3: Sorting and Searching. Addison-Wesley Publishing Company, Reading, 1973.Google Scholar
- 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.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.E. Y. Shapiro. Algorithmic Program Debuggging. PhD thesis, Yale University, 1983. Published under the same title by MIT press.Google Scholar