Skip to main content

A “Functional + Logic” programming language in interpretation-compilation implementation

Abstract

We have implemented a “Functional + Logic” programming language which is mainly used in knowledge-based programming. By making use of LISP's rich environment, it naturally integrates LISP and PROLOG through the S-expression. The resulting system, in which the user can program either independently or in the mixed paradigms of LISP and PROLOG, has flexible computational mechanisms, two programming paradigms, and powerful descriptive abilities. In order to overcome the serious problems in an interpreted implementation that the execution efficiency of the logic part is much worse than that of functional part and the inefficient interface is invoked repeatedly, we have implemented an interpretation-compilation system of the “Functional + Logic” language. This paper introduces the design principles, internal structure, and implementation details of the system.

This is a preview of subscription content, access via your institution.

References

  1. 1.

    Bailey, D.The University of Salford LISP/PROLOG System. Software Practice & Experience, Vol. 15, No. 6 (June 1985), 595–609.

    Google Scholar 

  2. 2.

    Barbutti, R.On the Integration of Logic Programming and Functional Programming. Proceedings IEEE Int. Symposium on Logic Programming, Atlantic City, (February 1984), 160–166.

  3. 3.

    Bellia, M., Degano, P., and Levi, G.The Call by Name Semantics of a Clause Language with Functions. In Logic Programming, Clark, K. L., and Tarnund, S. A., (ed.), Academic Press, (1982), 281–298.

  4. 4.

    Bobrow, D. G.If PROLOG is the Answer, What is the Question?. IEEE Transactions on Software Engineering, Vol. SE-11, No. 11 (November 1985).

  5. 5.

    Boyer, R. S. and Moore, J. S.The Sharing of Structure in Theorem-Proving Programs. Machine Intelligence, Edinburgh University Press (1972).

  6. 6.

    Corlett, R. A.Feature of Artificial Intelligence Languages and Their Environments. Software Engineering Journal, (July 1988), 159–164.

  7. 7.

    DeGroot, D. and Lindstrom, G. (ed.).Logic Programming: Functions, Relations, and Equations. Prentice-Hall (1986).

  8. 8.

    Dershowitz, N. and Plaisted, D. A.Logic Programming cum Applicative Programming. IEEE International Symposium on Logic Programming, (1985), 54–66.

  9. 9.

    Hailpern, B.Multi-Paradigm Languages. IEEE Software, Vol. 3 No. 1 (1986), 6–9.

    Google Scholar 

  10. 10.

    Hailpern, B.Multi-Paradigm Research: A Survey of Nine Projects. IEEE Software, Vol. 3, No. 1 (1986), 70–77.

    Google Scholar 

  11. 11.

    Kahn, K. M.UNIFORM — A Language Based on Unification Which Unifies (much of) LISP, PROLOG and ACT1. Proceedings 7th IJCAI, (1981), 65–71.

  12. 12.

    Komorowski.The Programming Environment for LISP in PROLOG. In Logic Programming, Clark, K. L., and Tarnund, S. A., (ed.), Academic Press, (1982).

  13. 13.

    Kornfeld, W. A.Equality for PROLOG. Proceedings 8th IJCAI, Karlsruhe, Germany (1983), 514–519.

  14. 14.

    Lindstrom, G.Functional Programming and the Logical Variable. Proceedings 12th ACM Symposium on Principles of Programming Languages, New Orleans (1885), 266–280.

  15. 15.

    Malachi, Y., Manna, Z., and Waldinger, R. J.TABLOG: The Deductive Tableau Programming Language. Proceedings ACM LISP and Functional Programming, Austin (1984), 323–330.

  16. 16.

    Mellish, C. and Hardy, S.Integrating PROLOG in the POPLOG Environment. Implementation of PROLOG, Campbell, J. A (ed.) Ellis-Horwood (1984), 147–162.

  17. 17.

    Paul, J. V. and Benjamin, Y.RF-Maple: A Logic Programming Language with Functions, Types, and Concurrency. Proceedings International Conference on FCGS '84, ICOT, (1984), 341–347.

  18. 18.

    Robinson, J. A. and Sibert, E. E.LOGLISP: Motivation, Design and Implementation. Logic Programming, Clark, K. L. and Tarnlund, S. A. (eds.), Academic Press, New York, (1982).

    Google Scholar 

  19. 19.

    Robinson, J. A. and Sibert, E. E.The LOGLISP Programming System. Technical Report, Logic Programming Research Group, Syracuse University, (March, 1984).

  20. 20.

    Sato, M. and Sakurai, T.QUTE: A Functional Language Base on Unification. Proceedings of Int. Conf. on FCGS 84, ICOT, (1984), 157–165.

  21. 21.

    Subrahmanyam, P. A. and You, J. H.On Embedding Functions in Logic. Information Processing Letters 19, (1984), 41–46.

    Google Scholar 

  22. 22.

    Takeuchi, I., et al.TAO — A harmonic mean of LISP, PROLOG, and Smalltalk. SIGPLAN NOTICES, Vol. 18 No.7 (July 1983).

  23. 23.

    Takeuchi, I., et al.A List Processing Language Tao with Multiple Programming Paradigms. New Generation Computing, 4, OHMSHA, LTD. and Springer-Verlag, (1986), 401–444.

  24. 24.

    Warren, D. H. D.Implementing PROLOG — Compiling Predicate Logic Programs. D. A. I. Research Report, No. 39 & 40, Dept. of Artificial Intelligence, Univ. of Edinburgh, 1977.

  25. 25.

    Warren, D. H. D. and Pereira, L. M.PROLOG — The Language and Its Implementation Compared with LISP. ACM, Proc. of Artificial Intelligence and Programming languages, (1977), 109–115.

  26. 26.

    Zhang, Y. Z. and Li, Z. Y.The Design and Implementation of LISPELP. Computer Journal, (in Chinese), 1, (1989).

Download references

Author information

Affiliations

Authors

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Cheng, G., Yun-Zheng, Z. A “Functional + Logic” programming language in interpretation-compilation implementation. Lisp and Symbolic Computation 5, 133–156 (1992). https://doi.org/10.1007/BF01807503

Download citation

Keywords

  • Operating System
  • Artificial Intelligence
  • Internal Structure
  • Programming Language
  • Design Principle