Results 1 - 10
of
17
Modularity and Reusability in Attribute Grammars
- Acta Informatica
, 1992
"... An attribute grammar is a declarative specification of dependence among computations carried out at the nodes of a tree. Attribute grammars have proven remarkably difficult to decompose into logical fragments. As a result, they have not yet been accepted as a viable specification technique. By combi ..."
Abstract
-
Cited by 63 (5 self)
- Add to MetaCart
An attribute grammar is a declarative specification of dependence among computations carried out at the nodes of a tree. Attribute grammars have proven remarkably difficult to decompose into logical fragments. As a result, they have not yet been accepted as a viable specification technique. By combining the ideas of remote attribute access and inheritance, we have been able to define "attribution modules" that can be reused in a variety of applications. As an example, we show how to define reusable modules for name analysis that embody different scope rules. 1 Introduction A fairly standard decomposition of the compiler construction task has evolved over the past twenty years, and most compilers have very similar structures. Many of the subproblems defined by the standard decomposition can be described as computations over trees, in which information is attached to individual tree nodes and used to control various decisions. 22 For example, consider the subproblem of determining t...
Forwarding in attribute grammars for modular language design
- In Proc. 11th Intl. Conf. on Compiler Construction, volume 2304 of LNCS
, 2002
"... Abstract. Forwarding is a technique for providing default attribute definitions in attribute grammars that is helpful in the modular implementation of programming languages. It complements existing techniques such as default copy rules. This paper introduces forwarding, and shows how it is but a sma ..."
Abstract
-
Cited by 30 (11 self)
- Add to MetaCart
Abstract. Forwarding is a technique for providing default attribute definitions in attribute grammars that is helpful in the modular implementation of programming languages. It complements existing techniques such as default copy rules. This paper introduces forwarding, and shows how it is but a small extension of standard higher-order attribute grammars. The usual tools for manipulating higher-order attribute grammars, including the circularity check (which tests for cyclic dependencies between attribute values), carry over without modification. The closure test (which checks that each attribute has a defining equation) needs modification, however, because the resulting higher-order attribute grammars may contain spurious attributes that are never evaluated, and indeed that need not be defined. 1
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...
Multiple Attribute Grammar Inheritance
, 1999
"... The language design process should be supported by modularity and abstraction in a manner that allows incremental changes as easily as possible. To at least partially fullfil this ambitious goal a new object-oriented attribute grammar specication language which supports multiple attribute grammar in ..."
Abstract
-
Cited by 8 (5 self)
- Add to MetaCart
The language design process should be supported by modularity and abstraction in a manner that allows incremental changes as easily as possible. To at least partially fullfil this ambitious goal a new object-oriented attribute grammar specication language which supports multiple attribute grammar inheritance is introduced. Multiple attribute grammar inheritance is a structural organization of attribute grammars where the attribute grammar inherits the specifications from ancestor attribute grammars, may add new specifications or may override some specifications from ancestor specifications. With the proposed approach a language designer has the chance to design incrementally a language or reuse some fragments from other programming language specifications. The multiple attribute grammar inheritance is first introduced using an example, and thereafter by a formal model. The proposed approach is successfully implemented in the compiler/interpreter generator tool LISA ver. 2.0.
Symbolic Composition
, 1998
"... The deforestation of a functional program is a transformation which gets rid of intermediate data structures constructions that appear when two functions are composed. The descriptional composition, initially introduced by Ganzinger and Giegerich, is a deforestation method dedicated to the compositi ..."
Abstract
-
Cited by 7 (4 self)
- Add to MetaCart
The deforestation of a functional program is a transformation which gets rid of intermediate data structures constructions that appear when two functions are composed. The descriptional composition, initially introduced by Ganzinger and Giegerich, is a deforestation method dedicated to the composition of two attribute grammars. This article presents a new functional deforestation technique, called symbolic composition, based on the descriptional composition mechanism, but extending it. An automatic translation from a functional program into an equivalent attribute grammar allows symbolic composition to be applied, and then the result can be translated back into a functional program. This yields a source to source functional program transformation. The resulting deforestation method provides a better deforestation than other existing functional techniques. Symbolic composition, that uses the declarative and descriptional features of attribute grammars is intrinsically more powerful th...
Coupling Evaluators for Attribute Coupled Grammars
- 5th Int. Conf. on Compiler Construction (CC' 94), volume 786 of Lect. Notes in Comp. Sci
, 1994
"... . Some years ago, the notion of attribute coupled grammars was introduced by Ganzinger and Giegerich [4], together with descriptional composition. The latter works essentially at the specification level, i.e., it produces an attribute grammar which specifies the composition of two attribute coupled ..."
Abstract
-
Cited by 7 (6 self)
- Add to MetaCart
. Some years ago, the notion of attribute coupled grammars was introduced by Ganzinger and Giegerich [4], together with descriptional composition. The latter works essentially at the specification level, i.e., it produces an attribute grammar which specifies the composition of two attribute coupled grammars. We introduce a new approach to this composition of attribute coupled grammars. This composition no longer works at the specification level but at the evaluator level. It produces a special kind of attribute evaluator. For this purpose we have introduced the notion of coupling evaluator. The main advantage of this new approach, compared with descriptional composition, is that it is possible to build separately the coupling evaluator of each attribute coupled grammar; in other words it allows real separate compilation of AG modules. Another important advantage is that we do not need to check the attribute grammar class in order to construct the final sequence of evaluators; thus, thi...
Integrating Natural Semantics and Attribute Grammars: the Minotaur System
- Tech. Rep. 2339, INRIA Sophia Antipolis
, 1994
"... : This paper describes the principles and the functionalities of the Minotaur system. Minotaur is a generic interactive environment based on the integration of the Centaur system and the FNC-2 system, two systems widely used to specify syntax and semantics of programming languages and generate effic ..."
Abstract
-
Cited by 7 (1 self)
- Add to MetaCart
: This paper describes the principles and the functionalities of the Minotaur system. Minotaur is a generic interactive environment based on the integration of the Centaur system and the FNC-2 system, two systems widely used to specify syntax and semantics of programming languages and generate efficient semantic tools from these specifications. We show how Attribute Grammars techniques can be adequate for evaluation of a quite large subclass of Natural Semantics specifications, including specifications of an arithmetic calculator, a tree transformation, a type-checker for an Algol-like language, ... For this subclass of Natural Semantics specifications, the Minotaur system automatically generates an incremental and efficient (in time and memory) evaluator which gives to Natural Semantics an industrial strength implementation. Key-words: Specifications, Natural Semantics, Attribute Grammars, Programming Environments (R'esum'e : tsvp) Isabelle.Attali@sophia.inria.fr Didier.Parigot@in...
Generic Attribute Grammars
, 1999
"... This paper introduces generic attribute grammars which provide support for genericity, reusability and modularity in attribute grammars. A generic attribute grammar is a component that is easily reused, composed and understood. Attribute grammar based systems may be constructed out of a set of gener ..."
Abstract
-
Cited by 6 (1 self)
- Add to MetaCart
This paper introduces generic attribute grammars which provide support for genericity, reusability and modularity in attribute grammars. A generic attribute grammar is a component that is easily reused, composed and understood. Attribute grammar based systems may be constructed out of a set of generic components, that can be analysed and compiled separately. We show how to generate deforestated attribute evaluators for those components. As a result, redundant intermediate data structures used to glue different components are eliminated.
Formalizing the Structural Semantics of Domain-Specific Modeling Languages
, 2009
"... Model-based approaches to system design are now widespread and successful. These approaches make extensive use of model structure to describe systems using domain-specific abstractions, to specify and implement model transformations, and to analyze structural properties of models. In spite of its ge ..."
Abstract
-
Cited by 6 (2 self)
- Add to MetaCart
Model-based approaches to system design are now widespread and successful. These approaches make extensive use of model structure to describe systems using domain-specific abstractions, to specify and implement model transformations, and to analyze structural properties of models. In spite of its general importance the structural semantics of modeling languages are not well-understood. In this paper we develop the formal foundations for the structural semantics of domain specific modeling languages (DSML), including the mechanisms by which metamodels specify the structural semantics of DSMLs. Additionally, we show how our formalization can complement existing tools, and how it yields algorithms for the analysis of DSMLs and model transformations.
Structure-directed Genericity in Functional Programming and Attribute Grammars
, 1997
"... : 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 p ..."
Abstract
-
Cited by 5 (3 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 present the similarities between the fold formalism and attribute grammars. In particular, we show the equivalence of their respective deforestation methods. Given these results and the fundamental role of deforestation in the concept of structuredirected genericity, first devised for attribute grammars with descriptional composition, we show how the fold operator with its fusion method allow us to transport this concept in the area of functional programming. Key-words: Attribute grammars, static analysis, functional programming, structuredirected programming, program transformation, deforestation, genericity....

