Design and implementation of a generic, logic and functional programming language

  • Didier Bert
  • Rachid Echahed
Functional Programming Languages
Part of the Lecture Notes in Computer Science book series (LNCS, volume 213)


This paper presents the broad outlines of LPG, a language designed for generic specification and programming. In this language one may specify different modules which can represent either particular algebras (ADTs), families of algebras (generic data types and enrichments) or Σ-structures (theories). This language is based on Horn clause logic with equality which permits logic and functional programming to be combined. As modules in LPG can be generic, an instantiation mechanism is needed; such a mechanism is described here as well as the interpreter and an E-unification algorithm, thus making LPG a powerful programming language.


Data Type Logic Programming Predicate Symbol Horn Clause Type Check 
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.


  1. [Backus 78]
    J. Backus: Can Programming be Liberated From Von Neumann Style ? A functional style of algebra of programs. CACM, vol 21, no. 8, pp. 613–641, August 1978.Google Scholar
  2. [Barberye et al. 83]
    G. Barberye, T. Joubert, M. Martin, M. Mouffron, E. Paul: Manuel OASIS. Note technique CNET, NT/PAA/CLC/LSC/959, 1983.Google Scholar
  3. [Bert 83]
    D. Bert: Refinements of Generic Specifications With Algebraic Tools. Proceedings of the IFIP 9th World Computer Congress, pp. 815–820, Paris, September 1983.Google Scholar
  4. [Bert and Bensalem 85]
    D. Bert, S. Bensalem: Algebra of Strongly Typed Functional Programs. RR. IMAG-561-LIFIA-33, Grenoble, 1985.Google Scholar
  5. [Burstall and Goguen 77]
    R. M. Burstall, J. A. Goguen: Putting theories together to make specifications. Proceedings of 5th International Joint Conference on Artificial Intelligence, pp. 1045–1058, Cambrige (Massachussets), 1977.Google Scholar
  6. [Burstall and Goguen 80]
    R. M. Burstall, J. A. Goguen: The Semantics of CLEAR, a specification language. Proceedings of Advanced Course on Abstract Software Specification, LNCS, no. 86, pp. 292–332, Copenhagen, 1980.Google Scholar
  7. [Ehrig et al. 84]
    H. Ehrig, H. J. Kreowski, J. W. Thatcher, E. W. Wagner, J. Wright: Parameter Passing in Algebraic Specification Languages. Theoretical Computer Science, no. 28, pp. 45–81, North-Holland, 1984.Google Scholar
  8. [Fribourg 84]
    L. Fribourg: Handling Function Definitions Through Innermost Superposition and Rewriting. LITP, Rapport no. 84–69, Paris, 1984.Google Scholar
  9. [Futatsugi et al. 84]
    K. Futatsugi, J. A. Goguen, J.-P. Jouannaud, J. Meseguer: Principles of OBJ2. CRIN, Rapport no. 84-R-066, Nancy, 1984.Google Scholar
  10. [Goguen et al. 78]
    J. A. Goguen, J. W. Thatcher, E. W Wagner: An Initial Algebra Approach to the Specification, Correctness and Implementation of Abstract Data types. Current Trends in Programming Methodology, vol. 4: Data Structuring, chap. 5, Prentice Hall, 1978.Google Scholar
  11. [Goguen and Burstall 84]
    J. A. Goguen, R. M. Burstall: Introducing Institutions. Proceedings Logics and Programming Workshop, pp. 221–256, 1984.Google Scholar
  12. [Goguen and Meseguer 82]
    J. A. Goguen, J. Meseguer: Universal Realisation, Persistent Interconnection and Implementation of Abstract Modules. 9th Colloquium on Automata, Languages and Programming, LNCS, no 140, pp. 265–281, 1982.Google Scholar
  13. [Goguen and Meseguer 84]
    J. A. Goguen, J. Meseguer: Equality, Types, Modules and Generics for Logic Programming. Proceedings of International Conference on Logic Programming, Uppsala, 1984.Google Scholar
  14. [Guttag 78]
    J. V. Guttag: The Algebraic Specification of Abstract data types. Acta Informatica, no. 10, 1978.Google Scholar
  15. [Hullot 80]
    J.-M. Hullot: Canonical Forms and Unification. Proceedings 5th Conference on Automated Deduction. LNCS, no. 87, pp. 318–334, 1980.Google Scholar
  16. [Jouannaud et al. 83]
    J-P. Jouannaud, C. Kirchner, H. Kirchner: Incremental Constructions of Unification Algorithms in Equational Theories. Automata, Languages and Programming, pp. 361–375, Barcelona, 1983.Google Scholar
  17. [Rety et al. 85]
    P. Rety, C. Kirchner, H. Kirchner, P. Lescanne: Narrower: a new algorithm for unification and its application to logic programming. First International Conference on Rewriting Techniques and Applications. Dijon, 1985.Google Scholar
  18. [Robinson 65]
    J. A. Robinson: A Machine-Oriented Logic Based on the Resolution Principle. JACM, vol. 12, no. 1, pp. 23–41, 1965.CrossRefGoogle Scholar
  19. [Thatcher et al. 82]
    J. W. Thatcher, E. W. Wagner, J. B. Wright: Data Type Specification: Parameterization and the Power of Specification Techniques. ACM TOPLAS, vol. 4, no. 4, pp. 711–732, 1982.Google Scholar
  20. [Van Emden and Kowalski 76]
    M. H. Van Emden, R. A. Kowalski: The semantics of Predicate Logic as a Programming Language. JACM, vol. 23, no. 4, pp. 733–742, 1976.CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1986

Authors and Affiliations

  • Didier Bert
    • 1
  • Rachid Echahed
    • 1
  1. 1.LIFIA/IMAGSaint Martin d'Hères CedexFrance

Personalised recommendations