Results 1 -
4 of
4
O.: Newspeak, doubleplussimple minilang for goodthinkful static analysis of C
"... Abstract. Static analysis is a difficult task, partly because programming languages are extremely rich, and have intricate semantics with architecture-dependent aspects. We have therefore chosen to design Newspeak, a kernel language dedicated to the purpose of static analysis. And, we have implement ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
Abstract. Static analysis is a difficult task, partly because programming languages are extremely rich, and have intricate semantics with architecture-dependent aspects. We have therefore chosen to design Newspeak, a kernel language dedicated to the purpose of static analysis. And, we have implemented a front-end, C2Newspeak, that translates C programs into Newspeak. Thus, any static analysis algorithm that uses this front-end, is preserved from the aforementioned sources of complexity. This paper fully presents the syntax and precise semantics of Newspeak. The design rationale of the language is explained and the advantages for static analysis highlighted. The various details of the translation from C to Newspeak are shown on examples. C2Newspeak was made to compile embedded C programs of a few million lines of code. It is, as well as a few other utilities, provided as free software under the LGPL. 1
Attribute Grammars for Modular Disambiguation
"... To face the challenges to tomorrow’s software engineering tools, powerful language-generic programtransformation components are needed. We propose the use of Attribute Grammars (AGs) to generate language specific disambiguation filters. In this paper, a complete implementation of a language-independ ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
To face the challenges to tomorrow’s software engineering tools, powerful language-generic programtransformation components are needed. We propose the use of Attribute Grammars (AGs) to generate language specific disambiguation filters. In this paper, a complete implementation of a language-independent AG system is presented. As a full scale experiment, we present an implementation of a flexible C front-end. Its specifications are concise, modular, and the result is efficient. On top of it, transformations such as software renovation, code metrics, domain specific language embedding can be implemented.
Semantics Driven Disambiguation: A comparison of different approaches
"... Context-sensitive languages such as C or C++ can be parsed using a context-free but ambiguous grammar, which requires another stage, disambiguation, in order to select the single parse tree that complies with the language’s semantical rules. Naturally, large and complex languages induce large and co ..."
Abstract
- Add to MetaCart
Context-sensitive languages such as C or C++ can be parsed using a context-free but ambiguous grammar, which requires another stage, disambiguation, in order to select the single parse tree that complies with the language’s semantical rules. Naturally, large and complex languages induce large and complex disambiguation stages. If, in addition, the parser should be extensible, for instance to enable the embedding of domain specific languages, the disambiguation techniques should feature traditional software-engineering qualities: modularity, extensibility, scalability and expressiveness. We evaluate three approaches to write disambiguation filters for SDF grammars: algebraic equations with ASF, rewrite-rules with programmable traversals for Stratego, and attribute grammars with TAG (Transformers Attribute Grammar), our system. To this end we introduce Phenix, a highly ambiguous language. Its “standard” grammar exhibits ambiguities inspired by those found in the C and C++ standard grammars. To evaluate modularity, the grammar is layered: it starts with a small core language, and several layers add new features, new production rules, and new ambiguities.
N U I V
, 2008
"... Modern development practices encourage extensive testing of code while it is still under development, using unit tests to check individual code units in isolation. Such tests are typically case-based, checking a likely error scenario or an error that has previously been identified and fixed. Coming ..."
Abstract
- Add to MetaCart
Modern development practices encourage extensive testing of code while it is still under development, using unit tests to check individual code units in isolation. Such tests are typically case-based, checking a likely error scenario or an error that has previously been identified and fixed. Coming up with good test cases is challenging, and focusing on individual tests can distract from creating tests that cover the full functionality. Axioms, known from program specification, allow for an alternative way of generating test cases, where the intended functionality is described as rules or equations that can be checked automatically. Axioms are proposed as part of the concept feature of the upcoming C++0x standard. In this paper, we describe how tests may be generated automatically from axioms in C++ concepts, and supplied with appropriate test data to form effective automated unit tests. 1

