Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/567532.567552acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article
Free access

Verification of attribute grammar

Published: 26 January 1981 Publication History

Abstract

Verification of attribute grammar is discussed. As is widely recognized, attribute grammar of Knuth [8] is a very convenient device to describe semantics of programming languages, especially in automating compiler construction. Many efforts have been made to obtain efficient evaluators for attribute grammar [1,3,4,5,7,10] so that efficient compilers may be produced from the semantic specifications written in the attribute grammar.There is another important problem about the semantic specifications. This is how to verify the correctness of the specification and is essential in ascertaining the correctness of produced compilers. In contrast with the evaluation problem, this has not been studied well and only a few partial results have been reported up to now [2,9].In this paper we propose a verification procedure for proving the correctness of attribute grammar, which is applicable to the wide class of attribute grammars called absolutely noncircular ones [7]. Our method can be extended to accept any noncircular attribute grammar since it is shown that any noncircular attribute grammar is transformed into an equivalent absolutely noncircular one [5].Our verification procedure utilizes dependency relations among attributes and verification is performed by induction based on this order relation, according to which attributes are evaluated. This procedure consists of (1) assigning assertions to relevant pairs of a nonterminal symbol and a parallelly evaluable subset of its attributes, (2) generating a set of verification conditions for each production rule with the aid of dependency graph of the rule and (3) proving the verification conditions. Of course, verification is performed production-rule-wise.Our method can accept attribute grammars which contain both synthesized and inherited attributes and handle them in a well-formed way. This contrasts to the previous works where only the synthesized case is considered [2] or there seems no general and formal descriptions about how to verify general attribute grammars [9].In this paper we first give necessary definitions and notations for attribute grammar and then propose a verification procedure to prove its correctness. After giving some examples of verification, we establish consistency and completeness of our procedure.

References

[1]
Bochmann, G. V. Semantic evaluation from left to right. Comm. ACM 19,2(Feb. 1976), 55-61
[2]
Chirica, L. M., Martin, D. F. An order-algebraic definition of Knuthian semantics. MST 13, 1-27 (1979)
[3]
Jazayeri, M. On attribute grammars and the semantic specification of programming languages. Ph.D. Th., Compt. and Inform. Sci. Dept., Case Western Reserve U., Cleveland, Ohio, Oct. 1974
[4]
Kastens, U. Ordered Attribute Grammars. Acta Informatica 13(1980), 229-256
[5]
Katayama, T. Translation of attribute grammar into procedures. Tech. Rep. CS-K8001, Dept. of Compt. Sci., Tokyo Inst. of Tech., Tokyo, July 1980. Also submitted to TOPLAS.
[6]
Katayama, T. HFP: A hierarchical and functional programming methodology based on attribute grammar. Tech. Rep. CS-K8002, Tokyo Inst. of Tech., Tokyo, 1980, Also, to be presented at 5th International Conference on Software Engineering.
[7]
Kennedy, K., and Warren, S. K. Automatic generation of efficient evaluators for attribute grammars. Conf. Rec. 3rd ACM Symp. on Principles of Programming Languages, Atlanta, Ga., Jan. 1976, pp.32-49.
[8]
Knuth, D. E. Semantics of context-free languages. MST 2(1968), 127-145.
[9]
Pair, C., Amirchahy, M., Neel, D. Correctness proofs of syntax-directed processing descriptions by attributes. JCSS 19, 1-17 (1979)
[10]
Saarinen, M. On Constructing Efficient Evaluators for Attribute Grammars. Lecture Note in Computer Science No.62, Automata, Language and Programming, Springer-Verlag (1978), 382-396

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '81: Proceedings of the 8th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 1981
230 pages
ISBN:089791029X
DOI:10.1145/567532
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 26 January 1981

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Acceptance Rates

POPL '81 Paper Acceptance Rate 24 of 121 submissions, 20%;
Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)51
  • Downloads (Last 6 weeks)3
Reflects downloads up to 18 Aug 2024

Other Metrics

Citations

Cited By

View all

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media