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.
Similar content being viewed by others
References
Bochmann, G.V.: Semantic evaluation from left to right. CACM 19, 55–62 (1976)
Ganzinger, H., Ripken, K., Wilhelm, R.: MUGI — an incremental compiler-compiler. In: Proc. of ACM 1976 Ann. Conf., pp. 535–540, 1976
Giegerich, R., Wilhelm, R.: Implementierbarkeit attributierter Grammatiken. In: Informatik Fachberichte 10, pp. 17–36, 1977
Jazayeri, M., Ogden, W.F., Rounds, W.C.: The intrinsically exponential complexity of the circularity problem for attributed grammars. CACM 18, 679–706 (1975)
Jazayeri, M., Walter, K.G.: Alternating semantic evaluator. In: Proc. of ACM 1975 Ann. Conf., pp. 230–234, 1975
Kastens, U.: Ein Übersetzer-erzeugendes System auf der Basis attributierter Grammatiken. Fak. f. Informatik, Universität Karlsruhe, Interner Bericht 10, 1976
Kastens, U.: ALADIN — Eine Definitionssprache für attributierte Grammatiken. Fak. f. Informatik, Universität Karlsruhe, Interner Bericht 7, 1979
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, 1976
Knuth, D.E.: Semantics of context-free languages. Math. Syst. Theory 2, 127–145 (1968)
Knuth, D.E.: Semantics of context-free languages: correction. Math. Syst. Theory 5, 95–96 (1971)
Lecarme, O., Bochmann, G.: A (truly) usable and portable compiler writing system. In: Information Processing 74, 1974
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. 1977
Lewis, P.M., Rosenkrantz, D.J., Stearns, R.E.: Attributed translations. Journal of Computer and System Science 9, 279–307 (1974)
Lorho, B.: Semantic attributes processing in the system DELTA. In: Methods of Algorithmic language Implementation, pp. 21–40, Springer Verlag 1977
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. 1977
Schulz, W.A.: Semantic analysis and target language synthesis in a translator, University of Colorado, Dep. of Comp. Sc., PhD thesis 1976
Wilhelm, R.: Baumtransformatoren. Ein Vergleich mit Baumtransduktoren und Aspekte der Implementierung. TU München, Bericht, pp. 77–13, 1977
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Kastens, U. Ordered attributed grammars. Acta Informatica 13, 229–256 (1980). https://doi.org/10.1007/BF00288644
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00288644