March 1999 { Second Workshop on Attribute Grammars and Their Applications { Waga99 a Nest Partitioning Algorithm for Attribute Grammars
نویسنده
چکیده
The attribute dependence graph of a syntax tree may be partitioned into disjoint regions. Attribute instances in diierent regions are independent of one other. The advantages of partitioning the attribute dependence graph include simplifying the attribute grammar conceptually and allowing the possibility of parallel evaluation. We present a static partitioning algorithm for attribute grammars. The algorithm builds the set of all feasible partitions for every production by analyzing the grammar. After the attributed syntax tree is constructed, one of the feasible partitions is chosen for each production instance in the syntax tree. Gluing together the selected partitions for individual production instances results in a partition of the attribute dependence graph of the syntax tree. No further merging or partitioning is needed at evaluation time. In addition to static partitioning, the algorithm always produces the nest partition of every attribute dependence graph.
منابع مشابه
March 1999 { Second Workshop on Attribute Grammars and Their Applications { Waga99 on Eliminating Type 3 Circularities of Ordered Attribute Grammars
Ordered attribute grammars (OAGs for short) are a useful class of attribute grammars (AGs). For some attribute grammars, even though they are not circular, OAG circularity test reports that they are not ordered and fails to generate attribute evaluators because some approximation introduces circularities(called type 3 circularities in this paper). First we discuss that it is sometimes diicult f...
متن کاملMarch 1999 { Second Workshop on Attribute Grammars and Their Applications { Waga99 Adding Semantics to Xml
Starting form the analogy between a document tagged by a markup language (XML, SGML) and a source string generated by a BNF grammar, we argue that XML parsers should beneet from the addition of semantic attributes and functions. Currently XML only includes initialized lexical attributes. By our approach a XML parser would be extended into a syntax-directed translator. Deep transformations of a ...
متن کاملA finest partitioning algorithm for attribute grammars
The attribute dependence graph of a syntax tree may be partitioned into disjoint regions. Attribute instances in dierent regions are independent of one other. The advantages of partitioning the attribute dependence graph include simplifying the attribute grammar conceptually and allowing the possibility of parallel evaluation. We present a static partitioning algorithm for attribute grammars. ...
متن کاملAn Extension of Earley's Algorithm for S-Attributed Grammars
Attribute grammars are an elegant formalization of the augmented context-free grammars characteristic of most current natural language systems. This paper presents an extension of Earley's algorithm to Knuth's attribute grammars, considering the case of S-attributed grammars. For this case, we study the conditions on the underlying base grammar under which the extended algorithm may be guarante...
متن کاملJuly 2000 Third Workshop on Attribute Grammars and Their Applications Waga2000 Testing Attribute Grammars
Fundamental notions for testing attribute grammars are developed. Two dimensions are explored. The structural dimension focuses on the context-free grammar part of an attribute grammar, whereas the semantic dimension is concerned with attributes, attribute types, conditions, and computations. In both dimensions, and also for the combination of them, we are interested in coverage notions, test s...
متن کامل