Acta Informatica

, Volume 13, Issue 3, pp 229–256 | Cite as

Ordered attributed grammars

  • Uwe Kastens
Article

Summary

Ordered attributed grammars are defined as a large subclass of semantically well-defined attributed grammars proposed by Knuth. An attributed grammar is ordered if for each symbol a partial order over the associated attributes can be given, such that in any context of the symbol the attributes are evaluable in an order which includes that partial order. The definition does not refer to a predefined strategy for attribute evaluation, e.g. several passes from left to right. For each attributed grammar evaluable by any predefined evaluation strategy such an order exists. The ordering property can be checked by an algorithm, which depends polynomially in time on the size of the input grammar. “Visit-sequences” are computed from the attribute dependencies given by an ordered attributed grammar. They describe the control flow of an algorithm for attribute evaluation which can be part of an automatically generated compiler.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Bochmann, G.V.: Semantic evaluation from left to right. CACM 19, 55–62 (1976)Google Scholar
  2. 2.
    Ganzinger, H., Ripken, K., Wilhelm, R.: MUGI — an incremental compiler-compiler. In: Proc. of ACM 1976 Ann. Conf., pp. 535–540, 1976Google Scholar
  3. 3.
    Giegerich, R., Wilhelm, R.: Implementierbarkeit attributierter Grammatiken. In: Informatik Fachberichte 10, pp. 17–36, 1977Google Scholar
  4. 4.
    Jazayeri, M., Ogden, W.F., Rounds, W.C.: The intrinsically exponential complexity of the circularity problem for attributed grammars. CACM 18, 679–706 (1975)Google Scholar
  5. 5.
    Jazayeri, M., Walter, K.G.: Alternating semantic evaluator. In: Proc. of ACM 1975 Ann. Conf., pp. 230–234, 1975Google Scholar
  6. 6.
    Kastens, U.: Ein Übersetzer-erzeugendes System auf der Basis attributierter Grammatiken. Fak. f. Informatik, Universität Karlsruhe, Interner Bericht 10, 1976Google Scholar
  7. 7.
    Kastens, U.: ALADIN — Eine Definitionssprache für attributierte Grammatiken. Fak. f. Informatik, Universität Karlsruhe, Interner Bericht 7, 1979Google Scholar
  8. 8.
    Kennedy, K., Warren, S.K.: Automatic generation of efficient evaluators for attribute grammars. Conference record of the 3rd ACM Symp. on Principles of programming languages, pp. 32–49, 1976Google Scholar
  9. 9.
    Knuth, D.E.: Semantics of context-free languages. Math. Syst. Theory 2, 127–145 (1968)Google Scholar
  10. 10.
    Knuth, D.E.: Semantics of context-free languages: correction. Math. Syst. Theory 5, 95–96 (1971)Google Scholar
  11. 11.
    Lecarme, O., Bochmann, G.: A (truly) usable and portable compiler writing system. In: Information Processing 74, 1974Google Scholar
  12. 12.
    Lewi, J., de Vlaminck, K., Huens, J., Huybrechts, M.: Project LILA: The ELL(1) generator of LILA, an introduction. In: International Comp. Symp. 1977, pp. 237–251, North-Holland Publ. 1977Google Scholar
  13. 13.
    Lewis, P.M., Rosenkrantz, D.J., Stearns, R.E.: Attributed translations. Journal of Computer and System Science 9, 279–307 (1974)Google Scholar
  14. 14.
    Lorho, B.: Semantic attributes processing in the system DELTA. In: Methods of Algorithmic language Implementation, pp. 21–40, Springer Verlag 1977Google Scholar
  15. 15.
    Räihä, K.-J.: On attribute grammars and their use in a compiler writing system. Rep. A-1977-4, University of Helsinki, Dep. of Comp. Sc. 1977Google Scholar
  16. 16.
    Schulz, W.A.: Semantic analysis and target language synthesis in a translator, University of Colorado, Dep. of Comp. Sc., PhD thesis 1976Google Scholar
  17. 17.
    Wilhelm, R.: Baumtransformatoren. Ein Vergleich mit Baumtransduktoren und Aspekte der Implementierung. TU München, Bericht, pp. 77–13, 1977Google Scholar

Copyright information

© Springer-Verlag 1980

Authors and Affiliations

  • Uwe Kastens
    • 1
  1. 1.Institut für Informatik IIUniversität KarlsruheKarlsruhe 1Germany (Fed. Rep.)

Personalised recommendations