Results 11 - 20
of
26
An experimental ambiguity detection tool
- In: Proc. 7th Workshop on Language Descriptions, Tools and Applications, LDTA’07
, 2007
"... Although programs convey an unambiguous meaning, the grammars used in practice to describe their syntax are often ambiguous, and completed with disambiguation rules. Whether these rules achieve to the removal of all the ambiguities while preserving the original intended language can be difficult to ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
Although programs convey an unambiguous meaning, the grammars used in practice to describe their syntax are often ambiguous, and completed with disambiguation rules. Whether these rules achieve to the removal of all the ambiguities while preserving the original intended language can be difficult to ensure. We present an experimental ambiguity detection tool for GNU Bison, and illustrate how it can assist a grammatical development for a subset of Standard ML. Key words: grammar verification, disambiguation, GLR 1
Development of an industrial strength grammar for VDM
, 2005
"... This report describes the development of an industrial strength grammar for the VDM specification language. We present both the development process and its result. The employed methodology can be described as iterative grammar engineering and includes the application of techniques such as grammar me ..."
Abstract
-
Cited by 3 (3 self)
- Add to MetaCart
This report describes the development of an industrial strength grammar for the VDM specification language. We present both the development process and its result. The employed methodology can be described as iterative grammar engineering and includes the application of techniques such as grammar metrication, unit testing, and test coverage analysis. The result is a VDM grammar of industrial strength, in the sense that it is well-tested, it can be used for fast parsing of high volumes of VDM specifications, and it allows automatic generation of support for syntax tree representation, traversal, and interchange. 2 Development of an Industrial Strength Grammar for VDM 1
The Grammar Deployment Kit–System Demonstration
- Proc. of LDTA’02, volume 65 of ENTCS. Elsevier Science
, 2002
"... Grammar deployment is the process of turning a given grammar specification into a working parser. The Grammar Deployment Kit (for short, GDK) provides tool support in this process based on grammar engineering methods. We are mainly interested in the deployment of grammars for software renovation too ..."
Abstract
-
Cited by 3 (2 self)
- Add to MetaCart
Grammar deployment is the process of turning a given grammar specification into a working parser. The Grammar Deployment Kit (for short, GDK) provides tool support in this process based on grammar engineering methods. We are mainly interested in the deployment of grammars for software renovation tools, that is, tools for software re- and reverse engineering. The current version of GDK is optimized for Cobol. We assume that grammar deployment starts from an initial grammar specification which is maybe still ambiguous or even incomplete. In practice, grammar deployment binds unaffordable human resources because of the unavailability of suitable grammar specifications, the diversity of parsing technology as well as the limitations of the technology, integration problems regarding the development of software renovation functionality, and the lack of tools and adherence to firm methods for grammar engineering. GDK helps to largely automate grammar deployment because tool support for grammar adaptation and parser generation is provided. We support different parsing technologies, among them btyacc, that is, yacc with backtracking. GDK is free software. Further information:
Towards the automatic evolution of reengineering tools
- In Proceedings of the European Conference on Software Maintenance and Reengineering (CSMR 2005), Manchaster, UK
, 2005
"... Building reverse engineering or reengineering tools often requires parsers for many different programming languages. The diffusion of dialects and variants makes many available parsers almost useless. While manual grammar maintenance is feasible, it can be a long, tedious and expensive task. This pa ..."
Abstract
-
Cited by 3 (2 self)
- Add to MetaCart
Building reverse engineering or reengineering tools often requires parsers for many different programming languages. The diffusion of dialects and variants makes many available parsers almost useless. While manual grammar maintenance is feasible, it can be a long, tedious and expensive task. This paper proposes to adopt genetic algorithms to evolve existing grammars inferring changes from examples written using the dialect. Applying grammar inference from scratch may lead to a useless grammar, while the proposed approach simply applies changes to the original grammar when needed, thus producing a meaningful grammar. The paper reports some preliminary results related to the evolution of a C grammar.
The Amsterdam toolkit for language archaeology
- In Post-proceedings of the 2nd International Workshop on Meta-Models, Schemas and Grammars for Reverse Engineering (ATEM 2004). ENTCS. Elsevier Science
"... GRK — the Grammar Recovery Kit — illustrates options for automation and corresponding tool support in the context of developing quality language references that readily cater for the derivation of parsers. GRK provides the proof-of-concept for two notions: (i) semi-automatic grammar recovery; (ii) l ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
GRK — the Grammar Recovery Kit — illustrates options for automation and corresponding tool support in the context of developing quality language references that readily cater for the derivation of parsers. GRK provides the proof-of-concept for two notions: (i) semi-automatic grammar recovery; (ii) language-reference re-engineering. GRK’s support for semi-automatic grammar recovery means that GRK can be used to obtain a relatively correct and complete as well as implementable grammar from a language reference. GRK’s support for language-reference re-engineering means that GRK can be used to update the original language reference such that it reflects the completed and corrected grammar knowledge. As of today, GRK is particularly fit for Cobol archaeology, more specifically for IBM’s VS Cobol II. That is, GRK offers a fully mechanised process, where IBM’s reference is used as an input, and the output is a transformed language reference whose grammar portions are correct and complete. (The recovery required several hundreds of simple transformation steps in order to deliver a grammar that is fit for parser derivation.) As a byproduct, GRK also generates a slow, Prolog-based parser. Via export to GRK’s sibling, GDK (the Grammar Deployment Kit), a reasonably fast, btyacc-based parser can be generated as well. Both parsers accept all of the VS Cobol II code that is at our avail (several millions of lines of code).
Generalized bottom up parsers with reduced stack activity
- The Computer Journal
"... We describe a generalized bottom up parser in which non-embedded recursive rules are handled directly by the underlying automaton, thus limiting stack activity to the activation of rules displaying embedded recursion. Our strategy is motivated by Aycock and Horspool’s approach, but uses a different ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
We describe a generalized bottom up parser in which non-embedded recursive rules are handled directly by the underlying automaton, thus limiting stack activity to the activation of rules displaying embedded recursion. Our strategy is motivated by Aycock and Horspool’s approach, but uses a different automaton construction and leads to parsers that are correct for all context-free grammars, including those with hidden left recursion. The automaton features edges which directly connnect states containing reduction actions with their associated goto state: hence we call the approach reduction incorporated generalized LR parsing. Our parser constructs shared packed parse forests in a style similar to that of Tomita parsers. We give formal proofs of the correctness of our algorithm, and compare it with Tomita’s algorithm in terms of the space and time requirements of the running parsers and the size of the parsers ’ tables. Experimental results are given for standard grammars for ANSI-C, ISO-Pascal; for a non-deterministic grammar for IBM VS-COBOL, and for a small grammar that triggers asymptotic worst case behaviour in our parser. 1.
An Architecture for Context-sensitive Formatting
- In International Conference on Software Maintenance
, 2005
"... We developed an architecture for context-sensitive formatting of source code. The architecture was implemented and applied in an industrial formatting case. 1 ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
We developed an architecture for context-sensitive formatting of source code. The architecture was implemented and applied in an industrial formatting case. 1
Exampledriven reconstruction of software models
- In Proceedings of Conference on Software Maintenance and Reengineering (CSMR 2007
, 2007
"... As software systems evolve, they become more complex and harder to understand and maintain. Certain reverse engineering techniques attempt to reconstruct software models from source code with the help of a parser for the source language. Unfortunately a great deal of effort may be required to build ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
As software systems evolve, they become more complex and harder to understand and maintain. Certain reverse engineering techniques attempt to reconstruct software models from source code with the help of a parser for the source language. Unfortunately a great deal of effort may be required to build a specialized parser for a legacy programming language or dialect. On the other hand, (i) we typically do not need a complete parser that recognizes all language constructs, and (ii) we have a rich supply of (legacy) examples. We present an approach to use these facts to rapidly and incrementally develop parsers as follows: we specify mappings from source code examples to model elements; we use the mappings to generate a parser; we parse as much code as we can; we use the exceptional cases to develop new example mappings; and we iterate. Experiments with Java and Ruby, two very different languages, suggest that our approach can be a very efficient and effective way to rapidly construct software models from legacy code.
The Language of the Visitor Design Pattern
- Journal of Universal Computer Science
"... Abstract. Design patterns have been developed to cope with the vast space of possible different designs within object-oriented systems. One of those classic patterns is the Visitor Pattern that is used for representing an operation to be performed on the elements of an object structure. We present a ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Abstract. Design patterns have been developed to cope with the vast space of possible different designs within object-oriented systems. One of those classic patterns is the Visitor Pattern that is used for representing an operation to be performed on the elements of an object structure. We present a mapping from the Visitor Pattern to a grammar that defines the set of visit sequences that can be performed by a given Visitor. The language defined by the grammar is the language of the Visitor Design Pattern. The declared purpose is the documentation of a Visitor. To allow the application of the presented approach to data structures in general, the formalism handles complications that occur when traversing arbitrary object structures, such as lack of a common base class, multiple inheritance, and inheritance from concrete classes. The mapping encodes knowledge about the class hierarchy and the implementation of the accept methods of a Visitor Design Pattern. 1.
Grammar re-engineering for language centered software engineering
"... This paper describes a systematic approach to grammar re-engineering by transforming conventional restricted YACC grammars from legacy code into the purely declarative syntax definition formalism SDF. The declarative nature of SDF and its ability to handle the full class of context-free grammars all ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
This paper describes a systematic approach to grammar re-engineering by transforming conventional restricted YACC grammars from legacy code into the purely declarative syntax definition formalism SDF. The declarative nature of SDF and its ability to handle the full class of context-free grammars allows grammar definitions that are more readable and maintainable compared to the original YACC grammars. We describe how the resulting SDF grammar and a language centered software engineering approach aid the process of language tool construction. Our method is carried out in an industrial project on a dialect of the specification and description language SDL.

