Results 1 - 10
of
13
A Comparison of Tree Transductions defined by Monadic Second Order Logic and by Attribute Grammars
, 1998
"... . Two well-known formalisms for the specication and computation of tree transductions are compared: the mso graph transducer and the attributed tree transducer with look-ahead, respectively. The mso graph transducer, restricted to trees, uses monadic second order logic to dene the output tree in ..."
Abstract
-
Cited by 22 (7 self)
- Add to MetaCart
. Two well-known formalisms for the specication and computation of tree transductions are compared: the mso graph transducer and the attributed tree transducer with look-ahead, respectively. The mso graph transducer, restricted to trees, uses monadic second order logic to dene the output tree in terms of the input tree. The attributed tree transducer is an attribute grammar in which all attributes are trees; it is preceded by a look-ahead phase in which all attributes have nitely many values. The main result is that these formalisms are equivalent, i.e., that the attributed tree transducer with look-ahead is an appropriate implementation model for the tree transductions that are speciable in mso logic. This result holds for mso graph transducers that produce trees with shared subtrees. If no sharing is allowed, the attributed tree transducer satises the single use restriction. 1 Introduction Formulas of monadic second order (mso) logic can be used to express properti...
Attribute grammar-based language extensions for Java
- in: European Conference on Object Oriented Programming (ECOOP), LNCS
, 2007
"... Abstract. This paper describes the Java Language Extender framework, a tool that allows one to create new domain-adapted languages by importing domain-specific language extensions into an extensible implementation of Java 1.4. Language extensions may define the syntax, semantic analysis, and optimiz ..."
Abstract
-
Cited by 21 (1 self)
- Add to MetaCart
Abstract. This paper describes the Java Language Extender framework, a tool that allows one to create new domain-adapted languages by importing domain-specific language extensions into an extensible implementation of Java 1.4. Language extensions may define the syntax, semantic analysis, and optimizations of new language constructs. Java and the language extensions are specified as higher-order attribute grammars. We describe several language extensions and their implementation in the framework. For example, one embeds the SQL database query language into Java and statically checks for syntax and type errors in SQL queries. The tool supports the modular specification of composable language extensions so that programmers can import into Java the unique set of extensions that they desire. When extensions follow certain restrictions, they can be composed without requiring any implementation-level knowledge of the language extensions. The tools automatically compose the selected extensions and the Java host language specification. 1
Silver: an Extensible Attribute Grammar System
, 2007
"... Attribute grammar specification languages, like many domain specific languages, offer significant advantages to their users, such as high-level declarative constructs and domain-specific analyses. Despite these advantages, attribute grammars are often not adopted to the degree that their proponents ..."
Abstract
-
Cited by 17 (1 self)
- Add to MetaCart
Attribute grammar specification languages, like many domain specific languages, offer significant advantages to their users, such as high-level declarative constructs and domain-specific analyses. Despite these advantages, attribute grammars are often not adopted to the degree that their proponents envision. One practical obstacle to their adoption is a perceived lack of the both domain-specific and general purpose language features needed to address all of the different aspects of a problem. Here we describe Silver, an extensible attribute grammar specification language, and show how it can be extended with general purpose features such as pattern matching and domain specific features such as collection attributes and constructs for supporting data-flow analysis of imperative programs. Silver is implemented in itself by a Silver attribute grammar and utilizes forwarding to implement the extensions in a cost-effective manner. The result is an attribute grammar specification language with a rich set of language features.
Attribute Grammars and Folds: Generic Control Operators
, 1996
"... Generic control operators, such as fold, have been introduced in functional programming to increase the power and applicability of data-structure-based transformations. This is achieved by making the structure of the data more explicit in program specifications. We argue that this very important pro ..."
Abstract
-
Cited by 9 (5 self)
- Add to MetaCart
Generic control operators, such as fold, have been introduced in functional programming to increase the power and applicability of data-structure-based transformations. This is achieved by making the structure of the data more explicit in program specifications. We argue that this very important property is one of the original concepts of attribute grammars. In this paper, we informally show the similarities between the fold formalism and attribute grammar specifications. We also compare their respective method to eliminate the intermediate data structures introduced by function composition (notion of deforestation or fusion): the normalization algorithm for programs expressed with folds and the descriptional composition of attribute grammars. Rather than identify the best way to achieve deforestation, the main goal of this paper is merely to intuitively present two programming paradigms to each other's supporting community and provide an unbiased account of their similarities and diff...
Adding Semantics to XML
, 1999
"... Starting form the analogy between a document tagged by a mark-up language (XML, SGML) and a source string generated by a BNF grammar, we argue that XML parsers should benefit from the addition of semantic attributes and functions. Currently XML only includes initialized lexical attributes. By our ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
Starting form the analogy between a document tagged by a mark-up language (XML, SGML) and a source string generated by a BNF grammar, we argue that XML parsers should benefit 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 document could be specified, sent over the network, and executed within the XML system. For the specification of the semantic attributes and functions we propose a XML Document Type Definition, that is conceptually similar to the metalanguage of a compiler-compiler. By this approach the additions to the XML standard are kept to a minimum. The differences between attribute grammars and attributed XML specifications are discussed, and the system architecture of a semantic evaluator generator is presented. 1. Introduction In the production and dissemination of documents and hypertexts o...
Using event-based translation to support dynamic protocol evolution
- In ICSE ’04: Proceedings of the 26th International Conference on Software Engineering
, 2004
"... final copy of this thesis has been examined by the signatories, and we find that both the content and the form meet acceptable presentation standards of scholarly work in the above mentioned discipline. Ryan, Nathan D. (Ph.D., Computer Science) ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
final copy of this thesis has been examined by the signatories, and we find that both the content and the form meet acceptable presentation standards of scholarly work in the above mentioned discipline. Ryan, Nathan D. (Ph.D., Computer Science)
Circular Attribute Grammars with Remote Attribute References and their Evaluators
- in Proceedings of 3rd Workshop on Attribute Grammars and their Applications (WAGA 2000)(Parigot
, 2002
"... Attribute grammars (AGs) are a suitable formalism for development of language processing systems. However, for languages including unrestricted labeled jumps, like "goto" in C, optimizers in compilers are hard to write in AGs. This is due to two problems which few previous researches could deal ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
Attribute grammars (AGs) are a suitable formalism for development of language processing systems. However, for languages including unrestricted labeled jumps, like "goto" in C, optimizers in compilers are hard to write in AGs. This is due to two problems which few previous researches could deal with simultaneously, i.e., references of attribute values on distant nodes and circularity in attribute dependency. This paper proposes circular remote attribute grammars (CRAGs), an extension of AGs which allows (1) direct relations between two distant attribute instances through pointers referring to other nodes in the derivation tree, and (2) circular dependencies under certain conditions including those which arise from remote references. This extension gives AG programmers a natural way to describe language processors and programming environments for languages including any type of jump structures. We will also show a way to construct an e#cient evaluator for CRAGs called a mostly static evaluator. Performance of the proposed evaluator has been measured and compared with dynamic and static evaluators.
Attribute grammars and categorical semantics
- In: ICALP
"... Abstract. We give a new formulation of attribute grammars (AG for short) called monoidal AGs in traced symmetric monoidal categories. Monoidal AGs subsume existing domain-theoretic, graph-theoretic and relational formulations of AGs. Using a 2-categorical aspect of monoidal AGs, we also show that ev ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
Abstract. We give a new formulation of attribute grammars (AG for short) called monoidal AGs in traced symmetric monoidal categories. Monoidal AGs subsume existing domain-theoretic, graph-theoretic and relational formulations of AGs. Using a 2-categorical aspect of monoidal AGs, we also show that every monoidal AG is equivalent to a synthesised one when the underlying category is closed, and that there is a sound and complete translation from local dependency graphs to relational AGs. 1
Decorated Attribute Grammars. Attribute Evaluation Meets Strategic Programming
, 2008
"... Attribute grammars are a powerful specification formalism for tree-based computation, particularly for software language processing. Various extensions have been proposed to abstract over common patterns in attribute grammar specifications. These include various forms of copy rules to support non-l ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
Attribute grammars are a powerful specification formalism for tree-based computation, particularly for software language processing. Various extensions have been proposed to abstract over common patterns in attribute grammar specifications. These include various forms of copy rules to support non-local dependencies, collection attributes, and expressing dependencies that are evaluated to a fixed point. Rather than implementing extensions natively in an attribute evaluator, we propose attribute decorators that describe an abstract evaluation mechanism for attributes, making it possible to provide such extensions as part of a library of decorators. Inspired by strategic programming, they are specified using generic traversal operators. To demonstrate their effectiveness, we describe how to employ decorators in name, type, and flow analysis.
Extending Attribute Grammars with Collection Attributes - Evaluation and Applications
, 2007
"... Collection attributes, as defined by Boyland, can be used as a mechanism for concisely specifying cross-referencelike properties such as callee sets, subclass sets, and sets of variable uses. We have implemented collection attributes in our declarative meta programming system JastAdd, and used them ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
Collection attributes, as defined by Boyland, can be used as a mechanism for concisely specifying cross-referencelike properties such as callee sets, subclass sets, and sets of variable uses. We have implemented collection attributes in our declarative meta programming system JastAdd, and used them for a variety of applications including devirtualization analysis, metrics, and flow analysis. We propose a series of evaluation algorithms for collection attributes, and compare their performance and applicability. The key design criteria for our algorithms are 1) that they work well with demand evaluation, i.e., defined properties are computed only if they are actually needed for a particular source code analysis problem and a particular source program, and 2) that they work in the presence of circular (fixed-point) definitions that are common for many source code analysis problems, e.g., flow analysis. We show that the best algorithms work well on large practical problems, including the analysis of large Java programs.

