Skip to main content

Profit: A system integrating logic programming and attribute grammars

  • Session: Grammars
  • Conference paper
  • First Online:
Programming Language Implementation and Logic Programming (PLILP 1991)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 528))

  • 266 Accesses

Abstract

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.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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. Aho A.V., Sethi R., Ullman J.D.: Compilers–Principles, Techniques, and Tools. Addison-Wesley, 1986.

    Google Scholar 

  3. Attali I.: Compiling Typol with Attribute Grammars. In: [PLI88], 252–272.

    Google Scholar 

  4. Bochmann G.V.: Semantic Evaluation from Left to Right. Communications of the ACM 19, 2, 1976, 55–62.

    Google Scholar 

  5. Brinch Hansen P.: Programming a Personal Computer. Prentice-Hall, 1982.

    Google Scholar 

  6. 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. 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. DeGroot D., Lindstrom G.: Logic Programming — Functions, Relations, and Equations. Prentice-Hall, 1986.

    Google Scholar 

  9. Deransart P., Maluszynski J.: Relating Logic Programs and Attribute Grammars. Journal of Logic Programming 2, 2, 1985, 119–155.

    Google Scholar 

  10. Deransart P., Maluszynski J.: A Grammatical View of Logic Programming. In: [PLI88], 219–251.

    Google Scholar 

  11. Deransart P., Jourdan M., Lorho B.: Attribute Grammars — Definitions, Systems and Bibliography. Lecture Notes in Computer Science 323, Springer-Verlag, 1988.

    Google Scholar 

  12. 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. van Emden M.H., Yukawa K.: Logic Programming with Equations. Journal of Logic Programming 4, 4, 1987, 265–288.

    Google Scholar 

  14. Goguen J.A., Meseguer J.: EQLOG: Equations, Types and Generic Modules for Logic Programming. In: [DeL86], 295–363.

    Google Scholar 

  15. Henriques P.R.: A Semantic Evaluator Generating System in Prolog. In: [PLI88], 201–218.

    Google Scholar 

  16. 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. Kastens U., Hutt B., Zimmermann E.: GAG: A Practical Compiler Generator. Lecture Notes in Computer Science 141, Springer-Verlag, 1982.

    Google Scholar 

  18. Klein E., Martin M.: The Parser Generating System PGS. Software — Practice and Experience 19, 11, 1989, 1015–1028.

    Google Scholar 

  19. Knuth D.E.: Semantics of Context-Free Languages. Math. Systems Theory 2, 1968, 127–145.

    Google Scholar 

  20. Koster C.H.A.: Affix Grammars. In: Algol68 Implementation (J.E.Peck, ed.), North-Holland, 1971, 95–109.

    Google Scholar 

  21. 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. Monin J.-F.: A Compiler Written in Prolog: The Véda Experience. In: [PLI88], 119–131.

    Google Scholar 

  23. 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. 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. Nilsson U.: Alternative Implementation of DCGs. New Generation Computing 4, 2, 1986, 383–399.

    Google Scholar 

  26. Nykänen M.: Implementing Functional Prolog Terms (in Finnish). Report C-1990-17, Department of Computer Science, University of Helsinki, 1990.

    Google Scholar 

  27. O'Donnell M.J.: Equational Logic as a Programming Language. The MIT Press, 1985.

    Google Scholar 

  28. 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. 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. 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. Paakki J.: Paradigms for Attribute-Grammar-Based Language Implementation. Report A-1991-1, Department of Computer Science, University of Helsinki, 1991.

    Google Scholar 

  32. Paakki J.: Prolog in Practical Compiler Writing. The Computer Journal 34, 1, 1991, 64–72.

    Google Scholar 

  33. Paakki J., Toppola K.: An Error-Recovering Form of DCGs. Acta Cybernetica 9, 3, 1990, 211–221.

    Google Scholar 

  34. Pereira F. (ed.): C-Prolog User's Manual, Version 1.5. EdCAAD, Department of Architecture, University of Edinburgh, 1984.

    Google Scholar 

  35. 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. 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öysä K.: Extending Prolog with Functional Features (in Finnish). Report C-1989-71, Department of Computer Science, University of Helsinki, 1989.

    Google Scholar 

  38. Quintus Computer Systems Inc.: Quintus Prolog Reference Manual, Version 6, 1986.

    Google Scholar 

  39. Riedewald G., Lämmel U.: Using an Attribute Grammar as a Logic Program. In: [PLI88], 161–179.

    Google Scholar 

  40. Shaw M.: Prospects for an Engineering Discipline of Software. IEEE Software, Nov. 1990, 15–24.

    Google Scholar 

  41. Sterling L., Shapiro E.: The Art of Prolog. The MIT Press, 1986.

    Google Scholar 

  42. Subrahmanyam P.A., You J.-H.: FUNLOG: A Computational Model Integrating Logic Programming and Functional Programming. In: [DeL86], 157–198.

    Google Scholar 

  43. Waite W.M., Goos G.: Compiler Construction. Springer-Verlag, 1984.

    Google Scholar 

  44. Watt D.A., Madsen O.L.: Extended Attribute Grammars. The Computer Journal 26, 2, 1983, 142–153.

    Google Scholar 

  45. Warren D.H.D.: Logic Programming and Compiler Writing. Software — Practice and Experience 10, 2, 1980, 97–125.

    Google Scholar 

  46. Welsh J., McKeag M.: Structured System Programming. Prentice-Hall, 1980.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jan Maluszyński Martin Wirsing

Rights and permissions

Reprints and permissions

Copyright information

© 1991 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Paakki, J. (1991). Profit: A system integrating logic programming and attribute grammars. In: Maluszyński, J., Wirsing, M. (eds) Programming Language Implementation and Logic Programming. PLILP 1991. Lecture Notes in Computer Science, vol 528. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-54444-5_103

Download citation

  • DOI: https://doi.org/10.1007/3-540-54444-5_103

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-54444-9

  • Online ISBN: 978-3-540-38362-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics