Skip to main content
Log in

Semantic equivalence of covering attribute grammars

  • Published:
International Journal of Computer & Information Sciences Aims and scope Submit manuscript

Abstract

This paper investigates some methods for proving the equivalence of different language specifications that are given in terms of attribute grammars. Different specifications of the same language may be used for different purposes, such as language definition, program verification, or language implementation. The concept of syntactic coverings is extended to the semantic part of attribute grammars. Given two attribute grammars, the paper discusses several propositions that give sufficient conditions for one attribute grammar to be semantically covered by the other one. These tools are used for a comparison of two attribute grammars that specify syntax and semantics of mixed-type expressions. This example shows a trade-off between the complexity of syntactic and semantic specifications. Another example discussed is the equivalence of different attribute grammars for the translation of the while-statement, as used in compilers for top-down and bottom-up syntax analysis.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. M. Marcotty, H. F. Ledgard, and G. V. Bochmann, “A sampler of formal definitions,”ACM Comput. Surv. 8(2):191–276 (June 1976).

    Google Scholar 

  2. D. E. Knuth, “Semantics of context-free languages,”Math. Syst. Theory 2:127–145 (1968);5:95 (1971).

    Google Scholar 

  3. C. H. A. Koster, “Affix Grammars,” in J. E. L. Peck, ed.,Algol 68 Implementation (North Holland, Amsterdam, 1971), pp. 95–109.

    Google Scholar 

  4. G. V. Bochmann, “Semantic evaluation from left to right,”Commun. ACM 19(2): 55–62 (February 1976).

    Google Scholar 

  5. J. C. Reynolds and R. Haskeil, “Grammatical Coverings,” unpublished manuscript, 1970. See also A. V. Aho and J. P. Ullman,The Theory of Parsing, Translation and Compiling, Vol. I, Sec. 3.4.5 (Prentice Hall, Englewood Cliffs, New Jersey, 1972).

  6. G. Godbout, “Définition d'un langage intermédiaire pour un systeme d'écriture de compilateurs,” Master's thesis, Département d'Informatique et de Recherche Opérationnelle, Univrsité de Montréal (1976).

  7. C. Pair, M. Amirchahy, and D. Neel,Correstness Proofs of Text-Processing Descriptions by Attributes (IRIA-Laboria, France, 1976).

    Google Scholar 

  8. P. M. Lewis, D. J. Rosenkrantz, and R. E. Stearns, “Attributed Translations,”Proceedings of the ACM Symposium on Theory of Computing, Austin (May 1973), pp. 160–171.

  9. G. V. Bochmann, “Semantic Equivalence of Covering Attribute Grammars,” Publication #218, Département d'I.R.O., Université de Montréal (1975).

  10. C. L. McGowan, “An Inductive Proof Technique for Interpreter Equivalence,” in R. Austin, ed.,Formal Semantics of Programming Languages (Prentice Hall, Englewood Cliffs, New Jersey, 1972), pp. 139–147.

    Google Scholar 

  11. C. A. R. Hoare, “Hints on Programming Language Design,” invited address at SIGACT/SIGPLAN Symposium on Principles of Programming Languages, Boston (October 973), and Stanford CS Report.

Download references

Author information

Authors and Affiliations

Authors

Additional information

This work was in part supported by the National Research Council of Canada.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Bochmann, G.V. Semantic equivalence of covering attribute grammars. International Journal of Computer and Information Sciences 8, 523–539 (1979). https://doi.org/10.1007/BF00995501

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF00995501

Key words

Navigation