Skip to main content
Log in

A knowledge-based approach to program synthesis from examples

  • Regular Papers
  • Published:
Journal of Computer Science and Technology Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  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.

    MATH  MathSciNet  Google Scholar 

  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. Zhu Hong, A Theory of Program Expansion and Its Application to Programming, Ph.D. Thesis, Nanjing University, Aug. 1987.

  4. Zhu Hong, A theory of program expansion.Scientia Sinica (Series A), 8(1988), 887–896.

    Google Scholar 

  5. G. Huet, Confluent reductions: abstract properties and applications to term rewriting system.J. ACM,27: 4(1980), 797–821.

    Article  MATH  MathSciNet  Google Scholar 

  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. Zhu Hong, Program transformation by solving equations,Chinese J. of Computers,13: 10(1990).

  8. Zhu Hong, An Orthogonal Expansion Approach to Transformation of Functional Programs. Proc. Int'l Conf. New Generation Computer System, April, 1989, Beijing.

  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.

  10. Jin Lingzi, Researches on Metalanguage for Transformational Programming. Ph. D. Thesis, Nanjing University, December, 1987.

  11. Jin Lingzi and Zhu Hong, Metaprogramming — Applications to Program Synthesis from Examples. Int'l Symp. for Young Computer Professionals, 1989, Beijing, 310–315.

  12. P. D. Summers, A methodology for LISP program construction from examples.J. ACM,24: 1(1977), 161–175.

    Article  MATH  MathSciNet  Google Scholar 

  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.

  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.

  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.

  16. A.W., Biermann, The inference of regular LISP programs from examples.IEEE Trans systems, Man, and Cybernetics, SMC-8: 8(1978), 585–600.

    Article  MATH  MathSciNet  Google Scholar 

  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. D. Banerjee, A methodology for synthesis of recursive functional programs,ACM TOPLAS,9: 3 (1978), 441–462.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Additional information

This research is supported by the National Science Foundation and the National Education Committee Foundation for Youths.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Zhu, H., Jin, L. A knowledge-based approach to program synthesis from examples. J. of Compt. Sci. & Technol. 6, 47–58 (1991). https://doi.org/10.1007/BF02943407

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF02943407

Keywords

Navigation