Results 1 - 10
of
23
Term Rewriting With Traversal Functions
- ACM Trans. Softw. Eng. Methodol
, 2001
"... Term rewriting is an appealing technique for performing program analysis and program transformation. Tree (term) traversal is frequently used but is not supported by standard term rewriting. ..."
Abstract
-
Cited by 51 (8 self)
- Add to MetaCart
Term rewriting is an appealing technique for performing program analysis and program transformation. Tree (term) traversal is frequently used but is not supported by standard term rewriting.
A visual environment for developing context-sensitive term rewriting systems
- In Proceedings of the International Conference on Rewriting Techniques and Applications (RTA
, 2004
"... Abstract. Over the past decade, researchers have found context-sensitive term-rewriting semantics to be powerful and expressive tools for modeling programming languages, particularly in establishing type soundness proofs. Unfortunately, developing such semantics is an error-prone activity. To addres ..."
Abstract
-
Cited by 34 (10 self)
- Add to MetaCart
Abstract. Over the past decade, researchers have found context-sensitive term-rewriting semantics to be powerful and expressive tools for modeling programming languages, particularly in establishing type soundness proofs. Unfortunately, developing such semantics is an error-prone activity. To address that problem, we have designed PLT Redex, an embedded domain-specific language that helps users interactively create and debug context-sensitive term-rewriting systems. We introduce the tool with a series of examples and discuss our experience using it in courses and developing an operational semantics for R 5 RS Scheme. 1
Domain Specific Language Implementation via Compile-Time Meta-Programming
- TOPLAS
, 2008
"... Domain specific languages (DSLs) are mini-languages which are increasingly seen as being a valuable tool for software developers and non-developers alike. DSLs must currently be created in an ad-hoc fashion, often leading to high development costs and implementations of variable quality. In this pap ..."
Abstract
-
Cited by 15 (6 self)
- Add to MetaCart
Domain specific languages (DSLs) are mini-languages which are increasingly seen as being a valuable tool for software developers and non-developers alike. DSLs must currently be created in an ad-hoc fashion, often leading to high development costs and implementations of variable quality. In this paper I show how expressive DSLs can be hygienically embedded in the Converge programming language using its compile-time meta-programming facility, the concept of DSL blocks, and specialised error reporting techniques. By making use of pre-existing facilities, and following a simple methodology, DSL implementation costs can be significantly reduced whilst leading to higher quality DSL implementations.
Canonical Abstract Syntax Trees
- WRLA 2006
, 2006
"... This paper presents GOM, a language for describing abstract syntax trees and generating a Java implementation for those trees. GOM includes features allowing the user to specify and modify the interface of the data structure. These features provide in particular the capability to maintain the intern ..."
Abstract
-
Cited by 9 (2 self)
- Add to MetaCart
This paper presents GOM, a language for describing abstract syntax trees and generating a Java implementation for those trees. GOM includes features allowing the user to specify and modify the interface of the data structure. These features provide in particular the capability to maintain the internal representation of data in canonical form with respect to a rewrite system. This explicitly guarantees that the client program only manipulates normal forms for this rewrite system, a feature which is only implicitly used in many implementations.
SOS formats and meta-theory: 20 years after
, 2007
"... In 1981 Structural Operational Semantics (SOS) was introduced as a systematic way to define operational semantics of programming languages by a set of rules of a certain shape [G.D. Plotkin, A structural approach to operational semantics, Technical ..."
Abstract
-
Cited by 5 (2 self)
- Add to MetaCart
In 1981 Structural Operational Semantics (SOS) was introduced as a systematic way to define operational semantics of programming languages by a set of rules of a certain shape [G.D. Plotkin, A structural approach to operational semantics, Technical
Compiler Implementation in a Formal Logical Framework
- In Proceedings of the 2003 workshop on Mechanized
, 2003
"... The task of designing and implementing a compiler can be a dicult and error-prone process. In this paper, we present a new approach based on the use of higher-order abstract syntax and term rewriting in a logical framework. All program transformations, from parsing to code generation, are cleanly is ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
The task of designing and implementing a compiler can be a dicult and error-prone process. In this paper, we present a new approach based on the use of higher-order abstract syntax and term rewriting in a logical framework. All program transformations, from parsing to code generation, are cleanly isolated and specified as term rewrites. This has several advantages. The correctness of the compiler depends solely on a small set of rewrite rules that are written in the language of formal mathematics. In addition, the logical framework guarantees the preservation of scoping, and it automates many frequently-occurring tasks including substitution and rewriting strategies. As we show, compiler development in a logical framework can be easier than in a general-purpose language like ML, in part because of automation, and also because the framework provides extensive support for examination, validation, and debugging of the compiler transformations. The paper is organized around a case study, using the MetaPRL logical framework to compile an ML-like language to Intel x86 assembly. We also present a scoped formalization of x86 assembly in which all registers are immutable.
Compilation as Rewriting in Higher Order Logic
"... Abstract. We present an approach based on the use of deductive rewriting to construct a trusted compiler for a subset of the native functions of higher order logic. Program transformations are specified by equality theorems that characterize the transformations; the mechanical application of these r ..."
Abstract
-
Cited by 4 (4 self)
- Add to MetaCart
Abstract. We present an approach based on the use of deductive rewriting to construct a trusted compiler for a subset of the native functions of higher order logic. Program transformations are specified by equality theorems that characterize the transformations; the mechanical application of these rules is directed by programs written in the meta-language of the logical framework. Each application of a rule ensures that the transformed code is equivalent to the original one, thus warranting the correctness of the entire compiler. 1
A comparison of designs for extensible and extension-oriented compilers
- Master’s thesis, Massachusetts Institute of Technology, Feb 2008. http://pdos.csail.mit.edu/xoc/clements-thesis.pdf. 24 JOURNAL OF OBJECT TECHNOLOGY VOL 8, NO. 4 APPENDIX: SYNTAX AND SEMANTICS OF LINQ
"... Today’s system programmers go to great lengths to extend the languages in which they program. For instance, system-specific compilers find errors in Linux and other systems, and add support for specialized control flow to Qt and event-based programs. These compilers are difficult to build and cannot ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
Today’s system programmers go to great lengths to extend the languages in which they program. For instance, system-specific compilers find errors in Linux and other systems, and add support for specialized control flow to Qt and event-based programs. These compilers are difficult to build and cannot always understand each other’s language changes. However, they can greatly improve code understandability and correctness, advantages that should be accessible to all programmers. This thesis considers four extensible and extension-oriented compilers: CIL, Polyglot, xtc, and Xoc. These four compilers represent four distinctly different approaches to the problem of bridging the gap between language design and system implementation. Taking an extension author’s point of view, this thesis compares the design of each compiler’s extension interface in terms of extension structure, syntactic analysis, semantic analysis, and rewriting.
Developing and debugging algebraic specifications for Java classes
, 2004
"... Modern programs make extensive use of reusable software libraries. For example, a study of a number of large Java applications shows that between 17 % and 30 % of the classes in those applications use container classes defined in the java.util package. Given this extensive code reuse in Java program ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
Modern programs make extensive use of reusable software libraries. For example, a study of a number of large Java applications shows that between 17 % and 30 % of the classes in those applications use container classes defined in the java.util package. Given this extensive code reuse in Java programs, it is important for the interfaces of reusable classes to be well documented. An interface is well documented if it satisfies the following requirements: (1) the documentation completely describes how to use the interface; (2) the documentation is clear; (3) the documentation is unambiguous; and (4) any deviation between the documentation and the code is machine detectable. Unfortunately, documentation in natural language, which is the norm, does not satisfy the above requirements. Formal specifications can satisfy them but they are difficult to develop, requiring significant effort on the part of programmers. To address the practical difficulties with formal specifications, we describe and evaluate a tool to help programmers write and debug algebraic specifications. Given an algebraic specification of a class, our interpreter generates a prototype which can be used within an application just like any regular Java class. When running an application that uses the prototype, the interpreter prints error messages that tell the developer in which way the specification is incomplete or inconsistent with a hand-coded implementation of the class. We use case studies to demonstrate the usefulness of our system.

