Profit: A system integrating logic programming and attribute grammars

  • Jukka Paakki
Session: Grammars
Part of the Lecture Notes in Computer Science book series (LNCS, volume 528)


PROFIT is a system and a programming language where Prolog is extended with concepts needed in compiler writing applications. The special facilities include a deterministic error-recovering form of definite clause grammars (DCGs), functions as conditional equations, and functional terms modelling inherited and synthesized attributes of attribute grammars. PROFIT supports a multi-paradigm method of writing compilers in a compact and natural way. Most notably PROFIT can be used to express one-pass compilation within the framework of logical one-pass attribute grammars, a proper superset of L-attributed grammars.


Logic Program Logic Programming Functional Term Prolog Program Attribute Grammar 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [Abr87]
    Abramson H.: Towards an Expert System for Compiler Development. Technical Report 87-33, Department of Computer Science, University of British Columbia, 1987.Google Scholar
  2. [ASU86]
    Aho A.V., Sethi R., Ullman J.D.: Compilers–Principles, Techniques, and Tools. Addison-Wesley, 1986.Google Scholar
  3. [Att89]
    Attali I.: Compiling Typol with Attribute Grammars. In: [PLI88], 252–272.Google Scholar
  4. [Boc76]
    Bochmann G.V.: Semantic Evaluation from Left to Right. Communications of the ACM 19, 2, 1976, 55–62.Google Scholar
  5. [Bri82]
    Brinch Hansen P.: Programming a Personal Computer. Prentice-Hall, 1982.Google Scholar
  6. [BrP89]
    Bryant B.R., Pan A.: Rapid Prototyping of Programming Language Semantics Using Prolog. In: Proc. of IEEE COMPSAC '89, Orlando, Florida, 1989, 439–446.Google Scholar
  7. [CoH87]
    Cohen J. Hickey T.J.: Parsing and Compiling Using Prolog. ACM Transactions on Programming Languages and Systems 9, 2, 1987, 125–163.Google Scholar
  8. [DeL86]
    DeGroot D., Lindstrom G.: Logic Programming — Functions, Relations, and Equations. Prentice-Hall, 1986.Google Scholar
  9. [DeM85]
    Deransart P., Maluszynski J.: Relating Logic Programs and Attribute Grammars. Journal of Logic Programming 2, 2, 1985, 119–155.Google Scholar
  10. [DeM89]
    Deransart P., Maluszynski J.: A Grammatical View of Logic Programming. In: [PLI88], 219–251.Google Scholar
  11. [DJL88]
    Deransart P., Jourdan M., Lorho B.: Attribute Grammars — Definitions, Systems and Bibliography. Lecture Notes in Computer Science 323, Springer-Verlag, 1988.Google Scholar
  12. [Dra87]
    Drabent W.: Do Logic Programs Resemble Programs in Conventional Languages? In: Proc. of the 1987 IEEE Symposium on Logic Programming, San Francisco, California, 389–396.Google Scholar
  13. [EmY87]
    van Emden M.H., Yukawa K.: Logic Programming with Equations. Journal of Logic Programming 4, 4, 1987, 265–288.Google Scholar
  14. [GoM86]
    Goguen J.A., Meseguer J.: EQLOG: Equations, Types and Generic Modules for Logic Programming. In: [DeL86], 295–363.Google Scholar
  15. [Hen89]
    Henriques P.R.: A Semantic Evaluator Generating System in Prolog. In: [PLI88], 201–218.Google Scholar
  16. [JGH83]
    Joy W.N., Graham S.L., Haley C.B., McKusick M.K., Kessler P.B.: Berkeley Pascal User's Manual, Version 3.0. Computer Science Division, Department of Electrical Engineering and Computer Science, University of Berkeley, 1983.Google Scholar
  17. [KHZ82]
    Kastens U., Hutt B., Zimmermann E.: GAG: A Practical Compiler Generator. Lecture Notes in Computer Science 141, Springer-Verlag, 1982.Google Scholar
  18. [KIM89]
    Klein E., Martin M.: The Parser Generating System PGS. Software — Practice and Experience 19, 11, 1989, 1015–1028.Google Scholar
  19. [Knu68]
    Knuth D.E.: Semantics of Context-Free Languages. Math. Systems Theory 2, 1968, 127–145.Google Scholar
  20. [Kos71]
    Koster C.H.A.: Affix Grammars. In: Algol68 Implementation (J.E.Peck, ed.), North-Holland, 1971, 95–109.Google Scholar
  21. [LRS74]
    Lewis P.M., Rosenkrantz D.J., Stearns R.E.: Attributed Translations. Journal of Computer and System Sciences 9, 3, 1974, 279–307.Google Scholar
  22. [Mon89]
    Monin J.-F.: A Compiler Written in Prolog: The Véda Experience. In: [PLI88], 119–131.Google Scholar
  23. [MTH83]
    Matsumoto Y., Tanaka H., Hirakawa H., Miyoshi H., Yasukawa H.: BUP: A Bottom-Up Parser Embedded in Prolog. New Generation Computing 1, 1983, 145–158.Google Scholar
  24. [Nar85]
    Narain A.: A Technique for Doing Lazy Evaluation in Logic. In: Proc. of the 1985 IEEE Symposium on Logic Programming, Boston, Massachusetts, 261–269.Google Scholar
  25. [Nil86]
    Nilsson U.: Alternative Implementation of DCGs. New Generation Computing 4, 2, 1986, 383–399.Google Scholar
  26. [Nyk90]
    Nykänen M.: Implementing Functional Prolog Terms (in Finnish). Report C-1990-17, Department of Computer Science, University of Helsinki, 1990.Google Scholar
  27. [ODo85]
    O'Donnell M.J.: Equational Logic as a Programming Language. The MIT Press, 1985.Google Scholar
  28. [Paa89]
    Paakki J.: A Prolog-Based Compiler Writing Tool. In: Proc. of the Workshop on Compiler Compiler and High Speed Compilation, Berlin (GDR), 1988. Report 3/1989, Academy of the Sciences of the GDR, 1989, 107–117.Google Scholar
  29. [Paa90a]
    Paakki J.: A Logic-Based Modification of Attribute Grammars for Practical Compiler Writing. In: Proc. of the 7th Int. Conference on Logic Programming (D.H.D.Warren, P.Szeredi, eds.), Jerusalem, 1990. The MIT Press, 1990, 203–217.Google Scholar
  30. [Paa90b]
    Paakki J.: A Practical Implementation of DCGs. In: Proc. of the Third Int. Workshop on Compiler Compilers, Schwerin, 1990. Report 8/1990, Akademie der Wissenschaften der DDR, 1990, 249–257.Google Scholar
  31. [Paa91a]
    Paakki J.: Paradigms for Attribute-Grammar-Based Language Implementation. Report A-1991-1, Department of Computer Science, University of Helsinki, 1991.Google Scholar
  32. [Paa91b]
    Paakki J.: Prolog in Practical Compiler Writing. The Computer Journal 34, 1, 1991, 64–72.Google Scholar
  33. [PaT90]
    Paakki J., Toppola K.: An Error-Recovering Form of DCGs. Acta Cybernetica 9, 3, 1990, 211–221.Google Scholar
  34. [Per84]
    Pereira F. (ed.): C-Prolog User's Manual, Version 1.5. EdCAAD, Department of Architecture, University of Edinburgh, 1984.Google Scholar
  35. [PeW80]
    Pereira F.C.N., Warren D.H.D.: Definite Clause Grammars for Language Analysis — A Survey of the Formalism and a Comparison with Augmented Transition Networks. Artificial Intelligence 13, 1980, 231–278.Google Scholar
  36. [PLI88]
    Proc. of the Int. Workshop on Programming Languages Implementation and Logic Programming (PLILP '88), Orléans, 1988. Lecture Notes in Computer Science 348 (P.Deransart, B.Lorho, J.Maluszynski, eds.), Springer-Verlag, 1989.Google Scholar
  37. [Pöy89]
    Pöysä K.: Extending Prolog with Functional Features (in Finnish). Report C-1989-71, Department of Computer Science, University of Helsinki, 1989.Google Scholar
  38. [Qui86]
    Quintus Computer Systems Inc.: Quintus Prolog Reference Manual, Version 6, 1986.Google Scholar
  39. [RiL89]
    Riedewald G., Lämmel U.: Using an Attribute Grammar as a Logic Program. In: [PLI88], 161–179.Google Scholar
  40. [Sha90]
    Shaw M.: Prospects for an Engineering Discipline of Software. IEEE Software, Nov. 1990, 15–24.Google Scholar
  41. [StS86]
    Sterling L., Shapiro E.: The Art of Prolog. The MIT Press, 1986.Google Scholar
  42. [SuY86]
    Subrahmanyam P.A., You J.-H.: FUNLOG: A Computational Model Integrating Logic Programming and Functional Programming. In: [DeL86], 157–198.Google Scholar
  43. [WaG84]
    Waite W.M., Goos G.: Compiler Construction. Springer-Verlag, 1984.Google Scholar
  44. [WaM83]
    Watt D.A., Madsen O.L.: Extended Attribute Grammars. The Computer Journal 26, 2, 1983, 142–153.Google Scholar
  45. [War80]
    Warren D.H.D.: Logic Programming and Compiler Writing. Software — Practice and Experience 10, 2, 1980, 97–125.Google Scholar
  46. [WeM80]
    Welsh J., McKeag M.: Structured System Programming. Prentice-Hall, 1980.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • Jukka Paakki
    • 1
  1. 1.Department of Computer ScienceUniversity of HelsinkiHelsinkiFinland

Personalised recommendations