| M. Ganapathi and C. N. Fisher, "Affix grammar driven code generation," ACM Tr. Prog. Lang. and Syst., vol. 7, no. 4, pp. 347--364, Apr. 1984. |
....when generating code for a subtree, the code for the left operand of the root node is selected without considering the right operand. This may produce inferior results, compared to the dynamic programming based methods. Other recent parsing approaches to code selection have been described in [59], 60] 3) Graph Matching: As explained above, dynamic programming based approaches to code selection suffer from the restriction that the pattern base and the intermediate representation must consist of tree structures. Some authors therefore proposed pattern matching algorithms that directly ....
M. Ganapathi and C. N. Fisher, "Affix grammar driven code generation," ACM Tr. Prog. Lang. and Syst., vol. 7, no. 4, pp. 347--364, Apr. 1984.
....for the transport layer. The next sections focus on this topic. The used grammar and the attribute translation is depicted in the next section. The following one describes the code selection algorithm, a sub algorithm which is similar to the affix grammar method by Ganapathi and Fischer [37]. Finally, the chapter ends with a case study and a discussion on transaction optimisations. 5.3 Behaviour Modelling From the perspective of the CPU, the communication network forms a tree to the peripheral devices. Each node in the tree has an individual behaviour and between the nodes packages ....
....the rewriting rules of the grammar to determine the required software sequence, which results in the desired register file transaction. 5.4. 3 Grammar Evaluation The algorithm for translation of an access to a device follows the affix grammar method for code generation by Ganapathi and Fischer [37]. As an extension, the code generation tracks the translation to check at a later date for side effects and may apply a special compensation. The required access is coded in the start string. Generation Code Selection Target Code IE Access Properties Lookup Device Specification ....
Mahadevan Ganapathi and Charles N. Fischer. Affix grammar driven code generation. TOPLAS, 7(4):560--599, 1985.
.... techniques lexical analysis is specified and implemented using regular grammars [24] creation of the parse tree is driven by a context free grammar [18] semantic analysis is achieved using attribute grammars [21] and code generation is often specified using a transformational grammar [14]. A third compiler construction technique is tree transformation. Highly efficient tree manipulation is provided by ordered attribute grammars [20] by the TXL system [9] and the Gentle system [30] Tree manipulations provide a convenient and efficient way to implement a wide range of ....
M. Ganapathi, C. Fischer, "Affix Grammar Driven Code Generation," ACM Trans. Programming Languages and Systems, 7(4), 1985, 560-599.
....of the shift or production with the highest priority. If the priorities are identical then the associativity is used by resolving in favour of the shift for right associative operators and the reduce for left associative operators. Grammars such as D are dealt with using a maximal munch approach [2 4]. Shift reduce conflicts are resolved in favour of shifts and reduce reduce conflicts in favour of the longest production to encourage the consumption of as many terminals as possible at each reduction. The restrictions are tested before the reductions are made and used to choose between a number ....
....fail the parsing should continue as if the restriction productions were not there. If this results in a parsing error then our implementation treats this using standard error reporting and recovery techniques. 5] A more restrictive approach is typically taken by the code generation parsers [2 4] were such a condition is referred to as semantic blocking. This situation is avoided by checking when the parser is constructed that a default production has been supplied that contains no restrictions and hence can never fail. This approach is appropriate in a code generator where such errors ....
[Article contains additional citation context not shown here]
GANAPATHI, M., FISCHER, C.N., Affix Grammar Driven Code Generation, ACM Transactions on Programming Languages and Systems, #, 560-599, 1985
....time. In particular, we want to be able to look ahead as well as back, and beyond basic block boundaries. The Graham Glanville method [42, 43, 44, 50] uses context free grammars and LR parsing for code generation (the obvious extension direction is to use attribute grammars, as suggested in [39]) Being fully transparent, like the corresponding syntax analysis performed by the compiler front end, the method is not inconsistent with the support ideal but it differs from the earlier interpretative approaches by being highly declarative. On the other hand, the intermediate representation ....
M. Ganapathi and C. N. Fisher. Affix grammar driven code generation. ACM Transactions on Programming Languages and Systems, vol. 7, no. 4, pp. 560--599. October 1985.
....traversals over the parse tree and invoke the appropriate semantic routine. Although the principal aim of ATLANTIS is not to produce a production quality compiler generating native code, future development will proceed in this area. Attempts will be made to employ a code generator generator [Ganapathi82, Ganapathi85, Graham80, Graham82] to produce a more efficient compiler, rather than the somewhat slower interpreter. Definition of the instructions which will need to be generated in order to handle language features for a specific machine architecture will have to be kept separate to the language definition. Those features which ....
M. Ganapathi and C.N. Fischer. Affix grammar driven code generation. A.C.M. Transactions on Programming Languages and Systems. Volume 7, number 4, pages 560--599, October 1985.
....translation of the semantic routines and HLOs to Ada routines is also performed automatically. Although the principal aim of ATLANTIS is not the generation of a production quality compiler generating native code, future development could proceed in this area by employing a code generator generator [4, 5, 9, 10] to produce a more efficient compiler. Definition of the necessary instructions for a specific machine architecture can be kept separate from the language definition. The present ATLANTIS system only handles sequential languages extensions which are required to handle parallel programming ....
M. Ganapathi and C.N. Fischer. Affix grammar driven code generation. ACM Transaction an Programming Languages and Systems, Volume 7, Number 4, pages 560--599, October 1985.
....i.e. when generating code for a subtree, the code for the left operand of the root node is selected without considering the right operand. This may produce inferior results, compared to the dynamic programming based methods. Other recent parsing approaches to code selection have been described in [59, 60]. Graph matching As explained above, dynamic programming based approaches to code selection suffer from the restriction that the pattern base and the intermediate representation must consist of tree structures. Some authors therefore proposed pattern matching algorithms that directly support DAG ....
M. Ganapathi, C.N. Fisher, "Affix grammar driven code generation," ACM Tr. Prog. Lang. and Systems, vol. 7, no. 4, pp. 347--364, April 1984.
....effects, such as auto increment addressing. In addition, the tables that drive matching and reduction can be large; however, Fraser and Henry have successfully minimized this problem [FH91] The second family, by Ganapathi and Fischer, used an attribute grammar to produce a code generator [GF82, GF85] Attributes and predicates associated with grammar productions help describe architectural restrictions. This approach puts less emphasis on the syntax than the GrahamGlanville systems. The advantage is that the parse table size is smaller and side effects can be more easily captured. The ....
Mahadevan Ganapathi and Charles N. Fischer. Affix grammar driven code generation. ACM Transactions on Programming Languages and Systems, 7(4), October 1985.
....there have been many attempts to find the right specification formalism for code generation. The most popular have been LR grammars and tree grammars. The so called Graham Glanville method uses an LR grammar as a specification. This method had its heyday in the late 1970s and early 1980s (see [12, 9]) However, LR grammars were found to be too restrictive and cumbersome. The method made way for tree grammars, and code generators that use either a top down traversal strategy (see [1, 4] or more popularly, a bottom up strategy ( 2, 3, 7, 8, 13] The advantage of a term rewrite system over a ....
M. Ganapathi and C. N. Fischer. Affix grammar driven code generation. ACM Transactions on Programming Languages and Systems, Volume 7, Number 4, pages 560--599, October 1985.
....independently. Most of the literature addresses a particular component of this compilation process. A variety of code generation strategies for converting from intermediate code into machine code have been proposed, generally with the intent to generate locally optimal and or retargetable code [2, 1, 15, 6, 7, 10, 8, 9]. A general description of the traditional approach and a review of some of the major code generation techniques can be found in Aho, et al. 3] On the other hand, our approach treats code generation for control structures and expressions uniformly, generating object code in a single pass over ....
Ganapathi, M., and Fischer, C. N. Affix grammar driven code generation. ACM Transactions on Programming Languages and Systems 11, 4 (1985), 560--599.
....implementation The optimizer s implementation is greatly complicated by the fact that before an optimization can be applied, the associated pattern of un optimized code must be located in the internal representation of the program. In the past various code generated and peephole optimizers [1, 4, 5] have done this, but either always on small contiguous patterns, or, if an attributed grammar is used, with restrictions on the use of attributes. In the case of this optimizer it must be possible to match noncontiguous patterns, as they were discussed in the previous section, and to add ....
M. Ganapathi, C. N. Fischer, Affix Grammar Driven Code Generation, ACM Transactions on Programming Languages and Systems, 7(4):560-599 (1985)
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