Skip to main content
Log in

The functional logic language BABEL and its implementation on a graph machine

  • Regular Papers
  • Published:
New Generation Computing Aims and scope Submit manuscript

Abstract

The first-order, untyped, functional logic language Babel is extended by polymorphic types and higher order functios. A sophisticated incompatibility check which is used to guarantee nonambiguity of BABEL programs is presented. For the implementation of the language, unification and backtracking are integrated in a programmed (functional) graph reduction machine. The implementation of this machine has been used for a comparison between Babel and PROLOG based on the runtimes of some example programs.

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. Aït-Kaci, H.,Warren’s Abstract Machine: A Tutorial Reconstruction, MIT Press, 1991.

  2. Balboni, G. P., Bosco, P. G., Cecchi, C., Melen, R., Moiso, C., and Sofi, G., “Implementation of a Parallel Logic Plus Functional Language,” inParallel Computers: Object Oriented, Functional and Logic (P. Treleaven, ed.), Wiley, 1989.

  3. Bellia, M. and Levi, G., “The Relation between Logic and Functional Languages,”Journal of Logic Programming, 3, pp. 217–236, 1986.

    Article  MATH  Google Scholar 

  4. Bosco, P. G., Cecchi, C., Giovannetti, E., Moiso, C., and Palamidessi, C., “Using Resolution for a Sound and Efficient Integration of Logic and Functional Programming,” inLanguages for Parallel Architectures: Design, Semantics, Implementation Models (J. de Bakker, ed.), Wiley, 1989.

  5. Bosco, P. G., Giovannetti, E., and Moiso, C., “Narrowing versus SLD-Resolution,”Theoretical Computer Science, 59, pp. 3–23, 1988.

    Article  MATH  MathSciNet  Google Scholar 

  6. Carlsson, M.,SICSTUS PROLOG User’s Manual, S-16313, Spanga, Sweden, 1988.

  7. Chakravarty, M. M. T. and Lock, H. C. R., “The Implementation of Lazy Narrowing,”Symposium on Programming Language Implementation and Logic Programming (PLILP) 1991, LNCS, 528, pp. 123–134, 1991.

    Google Scholar 

  8. Cheong, P. H., “Compiling Lazy Narrowing into Prolog,”New Generation Computing, 10, 1992.

  9. Damas, L. and Milner, R., “Principal Type Schemes for Functional Programs,”ACM Symposium on Principles of Programming Languages, pp. 207–212, 1982.

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

  11. van Emden, M. H. and Yukawa, K., “Logic Programming with Equations,”Journal of Logic Programming, 4, pp. 265–288, 1987.

    Article  MATH  MathSciNet  Google Scholar 

  12. González-Moreno, J. C., Hortalá-González, M. T., and Rodríguez-Artalejo, M., “A Functional Logic Language with Higher Order Variables,”Technical Report, DIA 90/6, Dpto. de Informática y Automática UCM, Madrid, 1990.

    Google Scholar 

  13. Hans, W., Loogen, R., Winkler, St., “On the Interaction of Lazy Evaluation and Backtacking,”Proc. PLILP 92, LNCS, 631, Springer-Verlag, pp. 355–369, 1992.

    Google Scholar 

  14. Hanus, M., “Compiling Logic Programs with Equality,”Workshop on Programming Language Implementation and Logic Programming (PLILP) 1990, LNCS, 456, pp. 387–401, 1990.

    Article  Google Scholar 

  15. Jiménez-Martín, J. A., Mariño, J., and Moreno-Navarro, J. J., “Efficient Compilation of Lazy Narrowing into Prolog,”Procs. LOPSTR’92, LNAI, 1992.

  16. Kuchen, H. and Hans, W., “An AND-Parallel Implementation of the Functional Logic Language Babel,”Granada Workshop on Integration of Functional and Logic Programming, RWTH Aachen,Aachener Informatik-Bericht, 91/12, pp. 119–139, 1991.

    Google Scholar 

  17. Kuchen, H., Moreno-Navarro, J.J., and Hermenegildo, M., “Independent AND-Parallel Implementation of Narrowing,”Procs. PLILP’92, LNCS, 631, Springer-Verlag, pp. 24–38, 1992.

    Google Scholar 

  18. Kuchen, H., Loogen, R., Moreno-Navarro, J.J., and Rodríguez-Artalejo, M., “Graph-Based Implementation of a Functional Logic Language,”ESOP, LNCS, 432, pp. 271–290, 1990.

    Google Scholar 

  19. Kuchen, H., Loogen, R., Moreno-Navarro, J. J., and Rodríguez-Artalejo, M., “Graph-Narrowing to Implement a Functional Logic Language,”Technical Report, FIM.68.1/LyS/92, UPM Madrid, 1992.

  20. Lindstrom, G., “Implementing Logical Variables on a Graph Reduction Architecture,”Workshop on Graph Reduction, LNCS, 279, pp. 382–400, 1987.

    Google Scholar 

  21. Loogen, R., “From Reduction Machines to Narrowing Machines,”Colloq. on Combining Paradigms for Software Development, TAPSOFT 1991, LNCS, 494, pp. 438–454, 1991.

    Google Scholar 

  22. Loogen, R., Kuchen, H., Indermark, K., and Damm, W., “Distributed Implementation of Programmed Graph Reduction,”PARLE, LNCS, 365, pp. 136–157, 1989.

    Google Scholar 

  23. Loogen, R., López-Fraguas, F., and Rodríguez-Artalejo, M., “A Demand Driven Computation Strategy for Lazy Narrowing,”Symposium PLILP’93, LNCS, 714, pp. 184–200, 1993.

    Google Scholar 

  24. Loogen, R., “From Reduction Machines to Narrowing Machines,”TAPSOFT’91, LNCS, 494, 1991.

  25. Loogen, R. and Winkler, S., “Dynamic Detection of Determinism in Functional Logic Languages”,PLILP, LNCS, 528, pp. 335–346, 1991.

    Google Scholar 

  26. Milner, R., “A Theory of Type Polymorphism in Programming”,Journal of Computer and System Sciences 17, 3, pp. 348–375, 1978.

    Article  MATH  MathSciNet  Google Scholar 

  27. Moreno-Navarro, J. J., “Diseño, semántica e implementación de Babel, un lenguaje que integra la programación funcional y lógica”,Ph.D. thesis, Facultad de Informática, UPM, Madrid (in Spanish), 1989.

    Google Scholar 

  28. Moreno-Navarro, J. J., Kuchen, H., Loogen, R., and Rodríguez-Artalejo, M., “Lazy Narrowing in a Graph Machine”,ALP, LNCS 456, pp. 298–317, 1990.

    Google Scholar 

  29. Moreno-Navarro, J. J., Kuchen, H., Mariño-Carballo, J., Winkler, S., and Hans, W., “Efficient Lazy Narrowing Using Demandedness Analysis”,Symposium PLILP’93, LNCS, 714, pp. 167–183, 1993.

    Google Scholar 

  30. Moreno-Navarro, J. J. and Rodríguez-Artalejo, M., “Babel: A Functional and Logic Programming Language Based on Constructor Discipline and Narrowing”,Conference on Algebraic and Logic Programming (ALP), LNCS, 343, pp. 223–232, 1989.

    Google Scholar 

  31. Moreno-Navarro, J. J. and Rodríguez-Artalejo, M., “Logic Programming with Functions and Predicates: The Language Babel”,Journal of Logic Programming, 12, pp. 191–223, 1992.

    Article  MATH  Google Scholar 

  32. Mück, A., “Compilation of Narrowing”,PLILP, LNCS, 456, pp. 16–39, 1990.

    Google Scholar 

  33. Nutt, W., Réty, P., and Smolka, G., “Basic Narrowing Revisited”,J. Symbolic Computation, 7, pp. 295–317, 1988.

    Article  Google Scholar 

  34. Peyton Jones, S. and Salkild, J., “The Spineless Tagless G-Machine”,Conference on Functional Programming Languages and Computer Architectures, ACM, pp. 184–201, 1989.

  35. Reddy, U. S., “Narrowing as the Operational Semantics of Functional Languages,”IEEE International Symposium on Logic Programming, IEEE Computer Society Press, pp. 138–151, 1985.

  36. Reddy, U. S., “Functional Logic Languages, Part I”,Workshop on Graph Reduction, LNCS, 279, pp. 401–425, 1987.

    Google Scholar 

  37. Sterling, L. and Shapiro, E.,The Art of PROLOG, MIT Press, 1986.

  38. Turner, D. A., “Miranda: A Non-Strict Functional Language with Polymorphic Types”,ACM Conference on Functional Languages and Computer Architecture, LNCS, 201, pp. 1–16, 1985.

    Google Scholar 

  39. Warren, D. H. D., “Applied Logic—Its Use and Implementation as a Programming Tool”,Technical Note, 290, SRI International, Menlo Park California, 1983.

    Google Scholar 

  40. Warren, D. H. D., “An Abstract PROLOG Instruction Set”,Technical Note, 309, SRI International, Menlo Park, California, 1983.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Herbert Kuchen.

Additional information

Herbert Kuchen, PD Dr.: He works as a lecturer for computer science at the RWTH Aachen, where he received all his degrees. He wrote his dissertation on an expression-parallel implementation of functional languages on distributed memory machines. His habilitation thesis treated the dataparallel implementation of functional languages on these machines. Besides the parallel implementation of programming languages, he is working on the design and implementation of integrated functional and logic languages. Moreover, he is interested in corresponding program analysis and optimization techniques as well as extensions of functional logic languages by e.g. constraints and higher order unification.

Rita Loogen, Prof. Dr.: Her current research interests are in the field of declarative programming languages and their implementation on parallel architectures. She is interested in the design of new declarative languages which integrate the well-known paradigms of functional and logic languages in a uniform framework. Furthermore, she takes particular interest in the analysis and implementation of such languages, especially with respect to the exploitation of parallelism and the programming of parallel systems.

Juan José Moreno-Navarro, Prof. Dr.: He became “Licenciado” (M. Sc.) degree in Mathematics in 1984 at Universidad Complutense de Madrid. He obtained his Ph.D. degree in Computer Science in 1989 from Universidad Politécnica de Madrid. He is currently Professor in Computer Science in the same university. His current research interests are in declarative programming languages (functional, logic and integrated languages as well as specification languages) and their implementation, including the enhancement of the expressivity of the languages, semantics, sequential and parallel implementations, optimization by compile-time analysis, and execution visualization.

Mario Rodríguez-Artalejo, Prof. Dr.: He received his degrees from Universidad Complutense de Madrid (UCM). He wrote his dissertation on applications on Ehrenfeucht-Fraisse games to model theory in 1977, and moved to research within the area of Logic in Computer Science since 1983. From 1977 to 1983 he worked as an Associate Professor at UCM. From 1986 to 1987 he was full Professor for Computer Science at Universidad Politecnica de Madrid (UPM), and since 1987 he is full Professor for Computer Science at UCM. Currently, his main research interests are in the area of declarative programming, including in particular semantics and implementation techniques for multiparadigm declarative languages, and the role of constraint solving in declarative programming.

About this article

Cite this article

Kuchen, H., Loogen, R., Moreno-Navarro, J.J. et al. The functional logic language BABEL and its implementation on a graph machine. NGCO 14, 391–427 (1996). https://doi.org/10.1007/BF03037211

Download citation

  • Received:

  • Issue Date:

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

Keywords

Navigation