| G. Bochmann. Semantic evaluation from left to right. Comm. Assoc. Comput. Mach., 19:55--62, 1976. |
....used and, computing the value of an inherited attribute instance at x, the values of the inherited attribute instances at its direct ancestor y (if it exists) and of the synthesized attribute instances at y s children may be used. This refers to the Bochmann Normal Form of attribute grammars (cf. [3]) Here we consider only total deterministic atts: For every node x of an input tree and for every attribute a, the computation of the attribute instance of a at x is fixed by exactly one rule. The dependencies can induce circularities among the attribute instances of an input tree. We restrict ....
G. Bochmann. Semantic evaluation from left to right. Comm. Assoc. Comput. Mach., 19:55--62, 1976.
....said to be defined in terms of hff 1 ; 0i; hff k ; 0i (at the root) For attributes ff and fi in A, if there are i; j such that hff; ii is defined in terms of hfi; ji at some oe, or at the root, then we say ff is defined in terms of fi. Remark 1.28. We do not require Bochmann normal form [Boc76]. 15 1.6.2 Semantic Instructions and Tests Let t be a tree over Sigma. The set of attributes of t is A(t) A Theta V t : Definition 1.29. For every tree t 2 T Sigma , and node u 2 V t , if nlab(u) oe, and hff 0 ; i 0 i = f(hff 1 ; i 1 i; hff k ; i k i) is a rule in R(oe) ....
.... : hff; ki) 2 hfi; 0ig for 1 i k hffi; 0i = i hoe; 1i Q (hff; 1i; hff; 2i; hff; ki) 2 hfi; 0i j We have one semantic root rule: hfi; 0i = F: The attribute grammar GA is weakly non circular, because it is non circular in the classical sense [Knu68] In fact, it is a two pass ag [Boc76], with decomposition in phases A = fffg; ffi; ffig) We want to prove that GA is correct, i.e. given a tree t, a node v is recognized by (GA ; ffi) iff (t; v) 2 T . To this aim we have the following lemmata. Lemma 2.9. Let t be a tree over Sigma. For every node v of t, hff; vi = val Q (sub t ....
Gregor V. Bochmann. Semantic evaluation from left to right. Communications of the ACM, 19:55--62, 1976.
....of a node (in the parse tree) can depend only on those attributes occurring to left of the node. Synthesized attributes of a node can depend only on those attributes occurring to left or below of the node. These restrictions enable attribute evaluation in depth first order from left to right [9]. An L attributed grammar is called S attributed if and only if all attributes of nonterminals are synthesized [65] S attributed grammars have the same situation in information passing as TaLE. To illustrate this, consider the following grammar: A BC Figure 12 shows information passing between ....
Bochmann, G. V., Semantic evaluation from left to right, Communications of the ACM 19 (2) 1976, 55--62.
....dered attribute grammar remains a difficult problem. For another class of attribute grammars it is required that all attributes can be evaluated during a constant number of depth first, left to right traversals of the abstract syntax tree. These are the left ordered attribute grammars (LAG) 6] [1]. Due to their fixed traversal order, the specification of context sensitive syntax becomes very operational, i.e. dependent on the analysis. However, because there are no alternative specification and generation methodologies, most practical tools are based on attribute grammars. Attribute ....
G. V. Bochmann. Semantic Evaluation from Left to Right. Communications of the ACM, 19(2):55--62, 1976.
....In a class dictionary, each production defines a class. The grammatic structure of a class dictionary that is used to customize the adaptive program determines the order of the object traversal by the propagation pattern. Consider the following example adapted from [65] which is adapted from [8]. The context free grammar embedded in the attribute grammar defines a simple language with declaration and assignment statements. The semantic equations and checking expressions together specify the constraint that each variable used must be declared. Program begin DeclList StmtList end ....
G. V. Bochmann. Semantic evaluation from left to right. Communications of the ACM, 19(2):55--62, Feburary 1976.
....associated tree function # f is total. On the other hand, Theorem 4.1 shows that every partial recursive tree function f # REC is computable by a HO ATT M f , which is moreover noncircular. In fact, the attribute dependencies are running from left to right, i.e. it is even L attributed; cf. [Boc76]. And it is well known that the totality of such functions is undecidable. Acknowledgements We would like to thank the editor, Joost Engelfriet, and the anonymous referee for many valuable comments on a draft of this paper. ....
G.V. Bochmann. Semantic evaluation from left to right. Communications of the ACM, 19(2):55--62, February 1976.
....by means of a dependency graph which consists of the attribute occurrences of the parse tree connected by arcs according to the semantic rules. Since attribute evaluation will be performed in conjunction with parsing here, we restrict our attention to the class of L attributed grammars [3] in which an inherited attribute on the right hand side of a production must not depend on a synthesized attribute of itself or of one of its right neighbors. Example 1 We consider a simple L attributed grammar G with underlying context free grammar G : S, A, B, C , a, b, c , # 0 , # ....
G. Bochmann. Semantic evaluation from left to right. Communications of the ACM, 19(2):55--62, Feb. 1976.
....to distinguish between attributes (noted X:a) and attribute occurrences (noted p : X i :a) In G 1 , for example, there exist four attributes: X:pre down; X:pre up; X:post down; X:post up 1 We refer to both terminals and nonterminals as symbols. 2 In this paper, we assume Bochmann normal form [Boc76] for simplicity. 95 Shin Natori, Katsuhiko Gondow, Takashi Imaizumi, Takeshi Hagiwara and Takuya Katayama and twenty attribute occurrences: p1 : X:pre down; p1 : X:pre up; p1 : X:post down; p1 : X:post up; p2 : X:pre down; p2 : X:pre up; p2 : X:post down; p2 : X:post up; p3 : X 1 :pre down; p3 ....
G.V. Bochmann. Semantic evaluation from left to right. CACM, 19(2):55--62, 1976.
.... rule hc; aei i in R oe is called the (hc; aei; oe) rule and i is denoted by rhs A (hc; aei; oe) A is dropped if it is clear from the context) Note that, by the rules in R oe , each inside attribute of oe is defined in terms of the outside attributes of oe (i.e. we assume Bochmann Normal Form [Boc76]) Note also that our definition of ATTs in Definition 3.9 is different from the original definition in [Ful81] There, for every inherited attribute b, the right hand side of the (hb; 1i; root) rule is restricted to trees over Delta. In the appendix of [Gie88] this difference was pointed out and ....
G. V. Bochmann. Semantic evaluation from left to right. Commun. ACM, 19:55--62, 1976.
....efficient semantic analysis. The work concerning the transformation of the unification problem into an equivalent constraint problem has been inspired by the theory of attribute grammars. The structural requirement LNS(1) that we introduced has been defined analogously to LAG(1) grammars [LRS74, Boc76] The descriptive power of LNS(1) many sorted natural semantics specifications is at least as big as the descriptive power of LAG(1) attribute grammars because each LAG(1) grammar can straightforwardly be transformed into an LNS(1) specification. The inverse transformation is not clear because ....
G. V. Bochmann. Semantic Evaluation from Left to Right. Communications of the ACM, 19(2):55--62, 1976.
....1 n side of the semantic equations of p. An AG is in Bochmann normal form if for any production p, the input attributes of p consist of the inherited attributes of the left symbol of p (i.e. I(X ) and the synthesized attributes of the 0 right side symbols of p (i.e. S(X ) S(X ) [3]; that is, no attribute defined in p can be 1 n used to define another attribute in p. In this paper, we assume that attribute grammars are in Bochmann normal form. Any attribute grammar can be converted to Bochmann normal form, so 1 In Knuth s original formulation of AGs, terminal symbols could ....
Gregor V. Bochmann. Semantic Evaluation from Left to Right. Communications of the ACM 19(2):55-62, February, 1976. 36
....a complete syntax tree with attribution is shown. 3 In general, the problem of required but not yet computed synthesized attributes disappears if the attribute grammar has the only S property, i.e. if it does not contain inherited attributes. The same holds if we consider L attributed grammars [5] only. Roughly speaking, in such grammars the dependencies between occurrences of attributes always show from left to right, and hence the dependencies are compatible with the scanning and parsing of the input string. But L attributed grammars do not have much expressive power. Is it possible to ....
Gregor V. Bochmann. Semantic Evaluation From Left to Right. Communications of the ACM, 19(2):55--62, February 1976.
....designing an ordered attribute grammar remains a difficult problem. For another class of attribute grammars it is required that all attributes can be evaluated during a single depth first, left to right traversal of the abstract syntax tree. These are the left ordered attribute grammars, 7] [1]. Due to their fixed traversal order, the specification of context sensitive syntax becomes very operational, i.e. dependent on the analysis, and is not as easily possible as a language designer might want it to be. However, because there are no alternative specification and generation ....
G. V. Bochmann. Semantic Evaluation from Left to Right. Communications of the ACM, 19(2):55--62, 1976.
.... are surveyed by op den Akker et al. [odAMT91] Inherent in their design is the 59 assumption that dependencies are no more complicated than that the attribute values of the working frontier of the parse tree can be kept on a stack so that evaluation can be done in some left to right fashion [Boc76] Therefore, these methods are restricted to the L attributed grammars. Post parsing evaluators save the entire parse tree, or its dependency graph, and are thus capable of handling any non circular grammar by executing the evaluation rules according to the order of the graph. An interesting ....
G. V. Bochmann. Semantic Evaluation from Left to Right. Communications of the ACM, 19(2):55--62, February 1976.
....to design such grammars. Hence, designing an ordered attribute grammar remains a difficult problem. For another class of attribute grammars it is required that all attributes can be evaluated during a constant number of DFS of the AST. These are the left ordered attribute grammars (LAG) LRS74] [Boc76]. Due to their fixed traversal order, the specification of context sensitive syntax becomes very operational, i.e. dependent on the analysis, and is not as easily possible as a language designer might want it to be. However, because there are no alternative specification and generation ....
G. V. Bochmann. Semantic Evaluation from Left to Right. Communications of the ACM, 19(2):55--62, 1976.
....i 1 i 2 A a c s s s i Figure 6: Dependency graphs of the productions S A and A aACa, respectively. ffl Every nonterminal has exactly one synthesized attribute (and an arbitrary number of inherited attributes; the startsymbol S has zero inherited attributes) ffl It is an L attributed grammar [Boc76], i.e. the attribute evaluation can be performed in a depth first left to right tree traversal. ffl The semantic domain is the set of words over some output terminal alphabet on which word functions operate; a word function is a function of the form u 1 :u 2 : u r :w such that w is a ....
G.V. Bochmann. Semantic evaluation from left to right. Communications of the ACM, 19:55--62, 1976.
....used and, computing the value of an inherited attribute instance at x, the values of the inherited attribute instances at its direct ancestor y (if it exists) and of the synthesized attribute instances at y s children may be used. This refers to the Bochmann Normal Form of attribute grammars (cf. [3]) Here we consider only total deterministic atts: For every node x of an input tree and for every attribute a, the computation of the attribute instance of a at x is fixed by exactly one rule. The dependencies can induce circularities among the attribute instances of an input tree. We restrict ....
G. Bochmann. Semantic evaluation from left to right. Comm. Assoc. Comput. Mach., 19:55--62, 1976.
....Therefore, we require that, for each production rule, the semantic equations are defined in terms of the inherited attributes of the left handside symbol and the synthesized attributes of the right hand side symbols of the production rule. This is called the normal form in the literature (Bochmann, 1976; Paakki, 1995) The advantage of the normal form is that it specifies the fewest number of dependencies among attributes. Since dependencies among attributes enforce an evaluation order, an attribute grammar in the normal form allows the most freedom in the evaluator. Let G be a graph. The ....
Bochmann, G. V. (1976) Semantic evaluation from left to right. Comm. ACM, 19(2), 55-62.
....to design such grammars. Hence, designing an ordered attribute grammar remains a difficult problem. For another class of attribute grammars it is required that all attributes can be evaluated during a constant number of DFS of the DT. These are the left ordered attribute grammars (LAG) LRS74] [Boc76]. Due to their fixed traversal order, the specification of context sensitive syntax becomes very operational, i.e. dependent on the analysis, and is not as easily possible as a language designer might want it to be. However, because there are no alternative specification and generation ....
G. V. Bochmann. Semantic Evaluation from Left to Right. Communications of the ACM, 19(2):55--62, 1976.
....in a program. The relationships among the attributes are defined by attribution equations, which are attached to the production rules of the associated context free grammars. The compilation process is cast in the framework of attribute evaluation. There are many attribute evaluation methods [1, 2, 13, 17], each of which corresponds to a different class of attribute grammars. ############################# This work was supported in part by National Science Council, Taiwan, R.O.C. under grant NSC 85 2213 E 009 051. A class of attribute grammars, called ordered attribute grammars [12] is ....
G.V. Bochmann, Semantic evaluation from left to right, Comm. ACM 19(2) pp. 55-62 (February 1976).
.... is the design of automaticallygenerated efficient attribute evaluators (see [13] for an annotated bibliography) For this purpose, different subclasses (based on partial orders between attributes) have been introduced, and associated membership tests have been developed (e.g. OAG [28] l ordered [8], SNC [12, 20, 17] With these subclasses, efficient (optimized, incremental) evaluators can be automatically generated by computing at generation time an evaluation order on attributes. The specificity of the FNC 2 system [23, 24, 22] is to consider that an Attribute Grammar specifies, and an ....
Bochmann G. "Semantic evaluation from left to right" CACM 19, 2, 55-62, 1976.
....; q i ; hff; ki) stands for ffi oe (e 1 ; e k ) with e j = hff; ji for all j 2 [1; k] n fig and e i = q. The set R(root) of root rules consists of one rule: hfi; 0i = F: This ends the construction of G. Clearly, G is noncircular. In fact, it is a twopass attribute grammar (cf. [Boc, Eng2]) in the first pass over the input tree all values of ff and can be computed bottom up, and in the second pass all values of fi and ae can be computed top down. To show the correctness of G, let t be a tree over Sigma . In what follows we write dec instead of dec G;t . Since the rules for ....
G. V. Bochmann; Semantic evaluation from left to right, Comm. of the ACM 19 (1976), 55--62
No context found.
Bochmann, G.V., "Semantic evaluation from left to right," Comm. ACM, Vol. 19, No. 2, pp. 55-62, February 1976.
No context found.
G.V. Bochmann, Semantic evaluation from left to right, Comm. ACM 19(2) pp. 55-62 (February 1976).
No context found.
G.V. Bochmann, "Semantic evaluation from left to right," Communications of the ACM, 19, p. 55-62, 1976.
First 50 documents
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC