Results 1 - 10
of
18
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
Incremental Computation: A Semantics-Based Systematic Transformational Approach
, 1996
"... ion of a function f adds an extra cache parameter to f . Simplification simplifies the definition of f given the added cache parameter. However, as to how the cache parameter should be used in the simplification to provide incrementality, KIDS provides only the observation that distributive laws can ..."
Abstract
-
Cited by 9 (3 self)
- Add to MetaCart
ion of a function f adds an extra cache parameter to f . Simplification simplifies the definition of f given the added cache parameter. However, as to how the cache parameter should be used in the simplification to provide incrementality, KIDS provides only the observation that distributive laws can often be applied. The Munich CIP project [BMPP89,Par90] has a strategy for finite differencing that captures similar ideas. It first "defines by a suitable embedding a function f 0 ", and then "derives a recursive version of f 0 using generalized unfold/fold strategy", but it provides no special techniques for discovering incrementality. We believe that both works provide only general strategies with no precise procedure to follow and therefore are less automatable than ours. Chapter 4 Caching intermediate results The value of f 0 (x \Phi y) may often be computed faster by using not only the return value of f 0 (x), as discussed in Chapter 3, but also the values of some subcomputation...
Reconstruction of paradigm shifts
- IN SECOND WORKSHOP ON ATTRIBUTE GRAMMARS AND THEIR APPLICATIONS, WAGA 99
, 1999
"... There are many extensions of the basic attribute grammar formalism intended to improve its pragmatics, e.g. certain modularity concepts, remote access, object-orientation, templates, rule models and higher-order features. In the paper, a generic and formal approach to an effective and orthogonal rec ..."
Abstract
-
Cited by 8 (5 self)
- Add to MetaCart
There are many extensions of the basic attribute grammar formalism intended to improve its pragmatics, e.g. certain modularity concepts, remote access, object-orientation, templates, rule models and higher-order features. In the paper, a generic and formal approach to an effective and orthogonal reconstruction of the concepts underlying some extensions is described. The reconstruction is effective in the sense that the reconstructed concepts are presented as executable meta-programs. The approach to reconstruction is formal in the sense that the derived meta-programs modelling certain concepts can be analysed based on properties of the meta-programs, e.g. preservation properties. It is a generic approach because the meta-programming framework can be instantiated not only for attribute grammars but also for several other representatives of the declarative paradigm, e.g. natural semantics and algebraic specification. Thereby, concepts can be imported from and exported to other frameworks. Finally, the reconstructions are derived orthogonally in the sense that potential roles are first unbundled and then particular combinations of the roles can be investigated. The described meta-programming framework has been implemented in the specification framework of Λ∆Λ and it is used for reusable formal language definition based on attribute grammars and operational semantics.
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.
The Template and Multiple Inheritance Approach into Attribute Grammars
- International Conference on Computer Languages, ICCL-98, Chicago
, 1998
"... Formal methods for describing programming language semantics, such as attribute grammars, operational semantics and denotational semantics, are not widely used since they are not modular, extensible and reusable. In the paper a new modular, extensible and reusable approach for specifying programming ..."
Abstract
-
Cited by 4 (3 self)
- Add to MetaCart
Formal methods for describing programming language semantics, such as attribute grammars, operational semantics and denotational semantics, are not widely used since they are not modular, extensible and reusable. In the paper a new modular, extensible and reusable approach for specifying programming languages with attribute grammars is presented. The concepts from object-oriented programming, i.e. templates and multiple inheritance, have been integrated with attribute grammars. A template in attribute grammar is an abstraction of a semantic rule parameterized with attribute occurrences. On the other hand, the whole attribute grammar is a subject of multiple inheritance and specialization. With the proposed approach a language designer has the chance to design incrementally a language or reuse some fragments from other programming language specifications. Templates and multiple inheritance have been implemented in our compiler generator tool LISA ver. 2.0 es...
A Reusable Object-Oriented Approach to Formal Specifications of Programming Languages
, 2000
"... . Formal methods for describing programming language semantics are an excellent tool for programming language design and development. However, they are not widely used since they are not modular, extensible and reusable. In the paper a new modular, extensible and reusable approach for specifying pro ..."
Abstract
-
Cited by 3 (2 self)
- Add to MetaCart
. Formal methods for describing programming language semantics are an excellent tool for programming language design and development. However, they are not widely used since they are not modular, extensible and reusable. In the paper a new modular, extensible and reusable approach for specifying programming languages with attribute grammars is presented. The concepts of object-oriented programming, i.e. templates, multiple inheritance, and object-oriented implementation of semantic domains, are integrated with attribute grammars. 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 proposed approach has been implemented in our compiler generator tool LISA ver. 2.0. MOTS-CLES : KEY WORDS : language specifications, reusability, extensibility, attribute grammars, compiler generators 2 Document numérique. Vol. 1 - n°1/1997 1 Introduction Compiler construction is often ...
AML: Attribute Grammars in ML
, 1997
"... . Attribute grammars are a valuable tool for constructing compilers and building user interfaces. This paper reports on a system we are developing, called AML (for Attribution in ML), which is an attribute grammar toolkit for building such applications as language-based programming environments usi ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
. Attribute grammars are a valuable tool for constructing compilers and building user interfaces. This paper reports on a system we are developing, called AML (for Attribution in ML), which is an attribute grammar toolkit for building such applications as language-based programming environments using SML. This system builds on the proven technology of efficient attribute evaluation, while using a higher-level foundation for the implementation of interactive systems. It supports a general and uniform platform for building applications that can manipulate attributed terms and allow access to attribute values. We describe the design of the AML system, its current implementation status, and our plans for the future. CR Classification: D.1.1, D.2.6, D.3.4 Key words: attribute grammars, attribute evaluation, functional programming, program generator, programming environments 1. Introduction Attribute grammars provide a formalism for assigning meaning to parse trees of a context-free languag...
A Context-Based Incremental Evaluator for Hierarchical Attribute Grammars
"... The recent emergence of hierarchical attribute grammar dialects including Higher Order Attribute Grammars, Attribute Coupled Grammars, the Synthesizer Generator's SSL, and Modular Attribute Grammars makes it nally possible to specify large complex transformation and analysis systems naturally and mo ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
The recent emergence of hierarchical attribute grammar dialects including Higher Order Attribute Grammars, Attribute Coupled Grammars, the Synthesizer Generator's SSL, and Modular Attribute Grammars makes it nally possible to specify large complex transformation and analysis systems naturally and modularly via the attribute grammar formalism. Unfortunately, e cient incremental evaluators for these hierarchical speci cations cannot be built by simply applying optimal incremental evaluators for non-hierarchical attribute grammars in a recursive manner. This paper presents a conceptually simple tree-walking incremental evaluation algorithm which we show can evaluate entire hierarchical attribute grammar speci cations optimally under standard assumptions. The key insight is that attribute evaluation must be intermingled with the identi cation of previously computed attribute values, so that the newly computed values can be used in selecting which old attribute values to reuse. In addition, this paper compares the new tree-walking approach with previous matching-based approaches and applicative approaches based on function caching. As presented, the new incremental evaluator can be applied to hierarchical attribute grammar speci cations based on ordered attribute grammar components, however, the technique can immediately be applied to convert any batch evaluator based on visit-sequences into an e cient incremental evaluator.

