Summary
An attribute grammar is one-visit if the attributes can be evaluated by walking through the derivation tree in such a way that each subtree is visited at most once. One-visit (1V) attribute grammars are compared with one-pass left-to-right (L) attribute grammars and with attribute grammars having only one synthesized attribute (1S).
Every 1S attribute grammar can be made one-visit. One-visit attribute grammars are simply permutations of L attribute grammars; thus the classes of output sets of 1V and L attribute grammars coincide, and similarly for 1S and L-1S attribute grammars. In case all attribute values are trees, the translation realized by a 1V attribute grammar is the composition of the translation realized by a 1S attribute grammar with a deterministic top-down tree transduction, and vice versa; thus, using a result of Duske e.a., the class of output languages of 1V (or L) attribute grammars is the image of the class of IO macro tree languages under all deterministic top-down tree transductions.
Similar content being viewed by others
References
Aho, A.V., Ullman, J.D.: The theory of parsing, translation and compiling, Vols. 1 and 2; Englewood Cliffs, N.J., Prentice-Hall 1972
Arnold, A.: Systèmes d'equations dans le magmoide; ensembles rationels et algébriques d'arbres. Thèse, Université de Lille 1977
Arnold, A., Dauchet, M.: Transductions de forêts reconnaissables monadiques; forêts corégulières. RAIRO IT 10, 5–28 (1976)
Arnold, A., Dauchet, M.: Un théoréme de duplication pour les forêts algébriques. JCSS 13, 223–244 (1976)
Asveld, P.R.J., Engelfriet, J.: Extended linear macro grammars, iteration grammars, and register programs. Acta Informat. 11, 259–285 (1979)
Bochmann, G.V.: Semantic evaluation from left to right. CACM 19, 55–62 (1976)
Chirica, L.M., Martin, D.F.: An algebraic formulation of Knuthian semantics. Proc. 17th Ann. Symp. on Foundations of Computer Science, pp. 127–136, IEEE, Houston, Texas, 1976
Courcelle, B., Franchi-Zannettacci, P.: On the expressive power of attribute grammars. Proc. of the 21st FOCS, IEEE, pp. 161–172, 1980
Downey, P.J.: Formal languages and recursion schemes. Ph. D. Thesis, Report TR-16-74, Cambridge, Mass.: Harvard University 1974
Duske, J., Parchmann, R., Sedello, M., Specht, J.: IO-macrolanguages and attributed translations. Information and Control 35, 87–105 (1977)
Engelfriet, J.: Bottom-up and top-down tree transformations — a comparison. Math. Systems Theory 9, 198–231 (1975)
Engelfriet, J.: Some open questions and recent results on tree transducers and tree languages. In: Formal language theory; perspectives and open problems. (R.V. Book, ed.), New York: Academic Press 1980
Engelfriet, J., Meineche Schmidt, E.: IO and OI; JCSS 15, 328–353 (1977); JCSS 16, 67–99 (1978)
Engelfriet, J., Slutzki, G.: Bounded nesting in macro grammars. Information and Control 42, 157–193 (1979)
Fischer, M.J.: Grammars with macro-like productions. Ph. D. Thesis, Harvard University 1968 (also: Proc. 9-th Symp. on SWAT, pp. 131–142, 1968)
Jazayeri, M., Ogden, W.F., Rounds, W.C.: The intrinsically exponential complexity of the circularity problem for attribute grammars. CACM 18, 697–706 (1975)
Kennedy, K., Warren, S.K.: Automatic generation of efficient evaluators for attribute grammars. Conf. Record of the Third Symposium on Principles of Programming Languages, pp. 32–49 (1976)
Knuth, D.E.: Semantics of context-free languages. Math. Syst. Theory 2, 127–145 (1968). Correction: Math. Systems Theory 5, 95–96 (1971)
Koster, C.H.A.: Affix grammars. Proc. IFIP Working Conf. on Algol 68 implementation; Amsterdam: North-Holland 1971
Lewis, P.M., Rosenkrantz, P.J., Stearns, R.E.: Attributed translations. JCSS 9, 279–307 (1974)
Maibaum, T.S.E.: A generalized approach to formal languages. JCSS 8, 409–439 (1974)
Mayoh, B.H.: Attribute grammars and mathematical semantics. Report DAIMI PB-80, Aarhus University 1978
Parchmann, R.: Grammatiken mit Attributschema und Zweistufige Auswertung attributierter Grammatiken; Schriften zur Informatik und angewandte Mathematik, Bericht No. 46, Technische Hochschule Aachen 1978
Paterson, M.S., Hewitt, C.E.: Comparative schematology. Record of Project MAC Conf. on concurrent systems and parallel computation, pp. 119–128, ACM, New York 1970
Riis, H., Skyum, S.: K-visit attribute grammars; DAIMI PB-121, Aarhus University, 1980; Math. Systems Theory (in press, 1981)
Rounds, W.C.: Mappings and grammars on trees. Math. Systems Theory 4, 257–287 (1970)
Thatcher, J.W.: Generalized2 sequential machine maps; JCSS 4, 339–367 (1970)
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Engelfriet, J., Filè, G. The formal power of one-visit attribute grammars. Acta Informatica 16, 275–302 (1981). https://doi.org/10.1007/BF00289307
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00289307