| Gerald D. P. Dueck & Gordon V. Cormack, "Modular Attribute Grammars," Univ. of Waterloo, Tech. Rep. CS-88-19, Waterloo, Canada, May 1988. 81 |
....grammars may contain spurious attributes that are never evaluated, and indeed that need not be de ned. 1 Motivation The modular de nition of programming languages is a long standing problem, and a lot of work has been devoted to its solution in the context of attribute grammars e.g. [1, 3, 8, 10, 11, 13, 14, 19, 17, 21, 25, 29, 32]. Some of these proposals take inspiration from the object oriented paradigm, advocating the use of inheritance to achieve modularisation. Others take inspiration from functional programming, by employing higher order functions to achieve a separation of concerns. The present paper is a modest ....
G. D. P. Dueck and G. V. Cormack. Modular attribute grammars. Computing Journal, 33:164-172, 1990.
....(AG) formalism is not very suitable for practical applications. There has been a lot of research on augmenting the basic paradigm with extensions 1 to overcome certain problems such as the lack of modularity, extensibility and reusability; refer e.g. to [Wat75, Kas76, Lor77, Gie88, Hed89, DC90, Paa91, Kos91, SV91, Hed91, Kas91, FMY92, KLMM93, LJPR93, KW94, Boy96, DPRJ96, ZKM97, DPRJ97, Boy98, MZ98] Several concepts such as remote access, object orientation, templates, rule models, symbol computations, etc. have been implemented in one or another 1 [KW94] suggests the term paradigm ....
.... AG paradigm are concerned with the schematic definition of computations, e.g. attribute classes [Le 89, Le 93] in Olga (FNC 2 ) JP91] remote access and symbol computations [KW94] in Lido (Eli ) rule models [KLMM93] in Mj6olner Orm and templates in Lisa s sense [MZ98] or in the sense of MAGs [DC90] It should be obvious that standard examples like the value distribution pattern, the propagate pattern, the bucket brigade (left) can be easily represented in our framework based on the reachability relation (From To In ) and the operators Add and From The Left. That should also explain why the ....
G.D. Dueck and G.V. Cormack. Modular Attribute Grammars. The Computer Journal, 33(2):164--172, 1990.
....definitions by attribute by textually regrouping definitions by production before analysis of the attribute specifications. Grouping definitions by attribute allows one to concentrate on a specific sub problem solved by an attribute s definitions. In a method proposed by Dueck and Cormack [6] attribute definition templates are used to automatically generate several attribute definitions. Definition templates are associated with a production pattern that is matched against the productions in a context free grammar. Those which match are given attribute definitions generated from the ....
D. D. P. Dueck and G. V. Cormack. Modular attribute grammars. The Computer Journal, 33(2):164-- 172, 1990.
....: Rules(l) 0 (21) 5. Related Work There has been a lot of research on augmenting ordinary attribute grammars with extensions to overcome deciencies of attribute grammars such as lack of modularity, extensibility and reusability [9, 10, 11, 12, 13, 14, 15] Modular attribute grammars MAG [16] are proposed as a solution to attribute pragmatic problems. The whole language specication consists of several MAGs. A single MAG is a set of patterns and associated templates. For each match between a production and pattern a set of attribute computations is generated. Both, the matching and the ....
Dueck G.D.P., Cormack G.V. Modular Attribute Grammars. Computer Journal, Vol. 33, No. 2, pp. 164 172, 1990.
....multiply cal 1 multiply return from subroutine main ret 5 Related Work At present, many researchers are working on modular, extensible and reusable semantic specifications [DON 94, VAI 96] from which compilers or interpreters can be automatically produced. Modular attribute grammars MAG [DUE 90] are proposed as a solution to attribute pragmatic problems discussed above. The whole language specification consists of several MAGs. A single MAG is a set of patterns and associated templates. For each match between a production and pattern a set of attribute computations is generated. Both, ....
Dueck G.D.P., Cormack G.V., "Modular Attribute Grammars", Computer Journal, Vol. 33, No. 2, pp. 164 - 172, 1990.
....notation for expressing the processor. This is possible because algebraic specifications blur the distinction between program and data everything is one term which is reduced according to a set of rewrite rules. The importance of this work is that it introduces complete syntactic modularity. Dueck and Cormack [1990] have developed a modular attribute grammar system in response to the difficulties of writing large attribute grammar specifications. Their system has many similarities to mine and I compare them in detail in section 5.15. Koskimies has contributed to the modular structure of language processors. ....
....written as attribute grammars tend to become large and complex. This is inevitable because the AG formalism does not provide for any modularity or abstraction. Dueck and Cormack review these problems and propose modular attribute grammars (MAGs) as a solution to these engineering problems [Dueck Cormack 1990]. Their system, called MAGGIE, is a processor that combines MAGs to create the equivalent monolithic attribute grammar. A MAG defines one or more output attributes from zero or more input attributes. The complete AG is the collective effect of several MAGs. One MAG might handle declarations and ....
[Article contains additional citation context not shown here]
G. D. P. Dueck & G. V. Cormack. "Modular Attribute Grammars", The Computer Journal, 33 (2): 164--172.
....attribute names are first class objects. This would make it possible, for example, to write one copy rule, and simply invoke it for different attributes. The work reported here is a natural extension of pioneering efforts in the attribute grammar community to introduce various forms of modularity [6, 8, 12]. These efforts culminated in a seminal paper by Kastens and Waite [23] which summarised various forms of modularity for attribute grammars, and demonstrated how they can be combined in a single framework. In a sense, this paper goes back once more to the basics, attempting to create an ....
G. D. P. Dueck and G. V. Cormack. Modular attribute grammars. Computing Journal, 33:164--172, 1990.
....specifications must be supported. Attribute grammars as such do not provide any means for modularization. As pointed out in [24] an effective strategy is to allow a module for an AG to contain the attribution of one semantic aspect only. Several approaches have been advocated to modularize AGs [3, 10, 8, 21]. While many approaches address the problems of partitioning a grammar specification, it can be argued how well they provide the concept of a module. We intend to build on previous work in this area, and hope that this can be done in a way that builds on the SML module system and interacts well ....
DUECK, G.D.P. AND CORMACK, G.V. 1988. Modular Attribute Grammars. Tech. Report CS-88-19, Faculty of Mathematics, University of Waterloo, Canada.
....Improving reusability and extensibility of AGs and recursive function definitions (in particular denotational semantics) has been (and is still) a hot topic over many years. We will only mention some particular approaches. The expressive power of . inheritance [Kos91] KW94] pattern matching [DC90], computation models [KLMM93] and symbol computations [KW94] is addressed by certain operations in our concept. Approaches supporting structural decomposition as ACGs [Gie88] and CAGs [FMY92] we can simulate even without any operation by doing (term) construction and deconstruction (Output ....
Dueck, G.D.P.; Cormack, G.V.: Modular Attribute Grammars, The Computer Journal, vol. 33, no. 2, 1990, 164-172
....to improve modularity have been suggested. Watt s Partitioned AGs [Wat75] for example, support decomposition and a corresponding kind of composition of AG modules which is similar to our kind of composition based on pairing and squeezing. 9 Dueck and Cormack suggest a kind of AG templates [DC90] An instance of a template w.r.t. a CFG is obtained by a matching algorithm. One serious problem of the approach is that it is impossible to ab 9 Actually, the term superposition is used in several frameworks (not only in AGs) for a similar purpose. stract sufficiently from the underlying ....
G.D. Dueck and G.V. Cormack. Modular Attribute Grammars. The Computer Journal, 33(2):164--172, 1990.
....a simple calculator language. The language is gradually extended from the simplest form to a language with more features. In the first attempt of specifying calculator language only adding and subtraction of digits are possible. Let us call it AddSubCalc. Language AddSubCalc lexicon digit [0 9] operator whiteSpace [ n t] attributes int val; rule EXP E : E T compute left assoc op E[0] val; E[1] val; T.val; plus E T compute left assoc op E[0] val; E[1] val; T.val; minus T compute E.val=T.val; rule TERM T : digit compute ....
....F.val; multply F compute T.val=F.val; rule FACTOR F : E ) compute F.val=E.val; F : digit compute F.val=Value(digit.lex val) Let us suppose that the following language Dec for declarations already exists. Language Dec lexicon ident [a z] a z0 9] int [0 9] operator = attributes Table consts; rule DECL Decl : ident = int Decl compute Decl[0] consts = Insert(Decl[1] consts, ident.lex val, Value(int.lex val) epsilon compute Decl.consts = NewTable( The calculator language with declarations DecCalc now inherits ....
[Article contains additional citation context not shown here]
Dueck G.D.P., Cormack G.V. Modular Attribute Grammars. Computer Journal Vol. 33, No. 2, pp. 164 - 172, 1990.
....(AG) formalism is not very suitable for practical applications. There has been a lot of research on augmenting the basic paradigm with extensions 1 to overcome certain problems such as the lack of modularity, extensibility and reusability; refer e.g. to [Wat75, Kas76, Lor77, Gie88, Hed89, DC90, Paa91, Kos91, SV91, Hed91, Kas91, FMY92, KLMM93, LJPR93, KW94, Boy96, DPRJ96, ZKM97, DPRJ97, Boy98, MZ98] Several concepts such as remote access, object orientation, templates, rule models, symbol computations, etc. have been implemented in one or another AG specification language such as Lido ....
.... the AG paradigm are concerned with the schematic definition of computations, e.g. attribute classes [Le 89, Le 93] in Olga (FNC 2 ) JP91] remote access and symbol computations [KW94] in Lido (Eli) rule models [KLMM93] in Mj6olner Orm and templates in Lisa s sense [MZ98] or in the sense of MAGs [DC90] It should be obvious that standard examples like the value distribution pattern, the propagate pattern, the bucket brigade (left) can be easily represented in our framework based on the reachability relation (From To In ) and the operators Add and From The Left. That should also explain why ....
G.D. Dueck and G.V. Cormack. Modular Attribute Grammars. The Computer Journal, 33(2):164-- 172, 1990.
....can be automated with rewriting. Modular attribute evaluation. Heavy program transformations are usually composed of separate phases, where each phase conducts smaller program analyses and performs lighter transformations. Several approaches have been proposed for modular attribute specification [4, 7, 8, 10, 13] and modular attribute evaluation [10, 13] Modular specification improves the readability of attribute grammars and allows more convenient modular evaluation. Modular evaluation provides the flexibility of turning on and off attribution modules as necessary, which results in evaluators that are ....
G. D. P. Dueck and G. V. Cormack. Modular attribute grammars. The Computer Journal, 33(2):164--172, Apr. 1990.
....must be supported. Attribute grammars as such do not provide any means for modularization. As pointed out in [Kas91] an effective strategy is to allow a module for an AG to contain the attribution of one semantic aspect only. Several approaches have been advocated to modularize AGs [DC88, FMY92, Far92] While these approaches address the problems of partitioning a grammar specification, they do not provide the concept of a module. We hope that this can be done in a way that builds on the SML module system and interacts well with the SML NJ separate compilation mechanism. ffl ....
Dueck, G. D. and G. V. Cormack. Modular attribute grammars. Technical Report CS-88-19, Faculty of Mathematics, University of Waterloo, Canada., May 1988.
....nodes, attribute computations specify how those values are related, and plain computations extract information for other processes. SYMBOL Expr: type: DefTableKey; RULE Dyadic: Expr : Expr Op Expr COMPUTE Expr[1] type = SignatureElt(Op.operation,0) Op.operation = Identify2(Op.indication,Expr[2].type,Expr[3] type) END; SYMBOL Op: indication: Delimiter, operation: DefTableKey; RULE PlusOp: Op : COMPUTE Op.indication = plus; IF(NotValid(Op.operation) message( Invalid operand types for this operator ) END; Figure 2: Attribute Grammar Fragment Describing Figure 1 Figure 2 shows a ....
Dueck, G. D. P. & Cormack, G. V., "Modular Attribute Grammars," The Computer Journal 33 (1990), 164--172.
No context found.
Gerald D. P. Dueck & Gordon V. Cormack, "Modular Attribute Grammars," Univ. of Waterloo, Tech. Rep. CS-88-19, Waterloo, Canada, May 1988. 81
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