Journal of Computer Science and Technology

, Volume 6, Issue 1, pp 47–58 | Cite as

A knowledge-based approach to program synthesis from examples

  • Zhu Hong 
  • Jin Lingzi 
Regular Papers

Abstract

This paper proposes an approach to synthesize functional programs of Backus' FP system[1,2] from input/output instances. Based on a theory of orthogonal expansion of programs[3,4], the task of program synthesis is expressed in program equations, and fulfilled by solving them according to the knowledge about the equivalence between programs. Some general knowledge of solving program equations with a number of examples are given in the paper.

Keywords

Result Program Functional Program Simple Program Program Expansion Orthogonal Expansion 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    J. Backus, Can programming be ‘liberated from the von Neumann style? A functional style and its algebra of programs.CACM.21: 8(1978), 613–641.MATHMathSciNetGoogle Scholar
  2. [2]
    J. Backus, The Algebra of Functional Programs: Function Level Reasoning, Linear Equations and Extended Definitions. InFormalization of Programming Concepts, J. Diaz and I. Ramos, Eds., LNCS 107, Springer-Verlag, 1981, New York, 1–43.Google Scholar
  3. [3]
    Zhu Hong, A Theory of Program Expansion and Its Application to Programming, Ph.D. Thesis, Nanjing University, Aug. 1987.Google Scholar
  4. [4]
    Zhu Hong, A theory of program expansion.Scientia Sinica (Series A), 8(1988), 887–896.Google Scholar
  5. [5]
    G. Huet, Confluent reductions: abstract properties and applications to term rewriting system.J. ACM,27: 4(1980), 797–821.MATHCrossRefMathSciNetGoogle Scholar
  6. [6]
    U.S. Reddy and B. Jayaraman, Theory of Linear Equations Applied to Program Transformation, Proc. 8'th IJCAI, 1983, Vol. 1, 10–16.Google Scholar
  7. [7]
    Zhu Hong, Program transformation by solving equations,Chinese J. of Computers,13: 10(1990).Google Scholar
  8. [8]
    Zhu Hong, An Orthogonal Expansion Approach to Transformation of Functional Programs. Proc. Int'l Conf. New Generation Computer System, April, 1989, Beijing.Google Scholar
  9. [9]
    Jin Lingzi, Zhu Hong and Xu Jiafu, NDTPS — An Experimental Metalanguage Transformational Programming System, Proc. Int'l Conf. New Generation Computer Systems, April, 1989, Beijing.Google Scholar
  10. [10]
    Jin Lingzi, Researches on Metalanguage for Transformational Programming. Ph. D. Thesis, Nanjing University, December, 1987.Google Scholar
  11. [11]
    Jin Lingzi and Zhu Hong, Metaprogramming — Applications to Program Synthesis from Examples. Int'l Symp. for Young Computer Professionals, 1989, Beijing, 310–315.Google Scholar
  12. [12]
    P. D. Summers, A methodology for LISP program construction from examples.J. ACM,24: 1(1977), 161–175.MATHCrossRefMathSciNetGoogle Scholar
  13. [13]
    D. R. Smith, The Synthesis of LISP Programs from Examples: A Survey. InAutomatic Program Construction Techniques, A. W. Biermann, G. Guiho and Y. Kodratoff, Eds., Macmillan Publishing Company, 1984, 307–324.Google Scholar
  14. [14]
    Y. Kodratoff and J-P. Jouannaud, Synthesizing LISP Programs Working on the List Level of Embedding. InAutomatic Program Construction Techniques. A.W. Biermann, G. Guiho and Y. Kodratoff, Eds. Macmillan Publishing Company, 1984, 325–374.Google Scholar
  15. [15]
    A. W. Biermann, Dealing with Search. InAutomatic Program Construction Techniques, A.W. Biermann, G. Guiho and Y. Kodratoff, Eds. Macmillan Publishing Company, 1984, 375–392.Google Scholar
  16. [16]
    A.W., Biermann, The inference of regular LISP programs from examples.IEEE Trans systems, Man, and Cybernetics, SMC-8: 8(1978), 585–600.MATHCrossRefMathSciNetGoogle Scholar
  17. [17]
    J-P. Jouanaud and G. Guiho, Inference of Functions with an Interactive System. InMachine Intelligence 9, J.E. Hages, D. Michie, and L.I. Mikulich, Eds. Ellis Horwood, Chichester, England, 1979, 227–250.Google Scholar
  18. [18]
    D. Banerjee, A methodology for synthesis of recursive functional programs,ACM TOPLAS,9: 3 (1978), 441–462.CrossRefGoogle Scholar

Copyright information

© Science Press, Beijing China and Allerton Press Inc. 1991

Authors and Affiliations

  • Zhu Hong 
    • 1
  • Jin Lingzi 
    • 1
  1. 1.Computer Science DepartmentNanjing UniversityNanjing

Personalised recommendations