In this paper we describe the architecture of the Utrecht Haskell compiler (UHC). UHC is a new Haskell compiler, that supports most (but not all) Haskell 98 features, plus some experimental extensions. It targets mult...
详细信息
ISBN:
(纸本)9781605585086
In this paper we describe the architecture of the Utrecht Haskell compiler (UHC). UHC is a new Haskell compiler, that supports most (but not all) Haskell 98 features, plus some experimental extensions. It targets multiple backends, including a bytecode interpreter backend and a whole-program analysis backend, both via C. The implementation is rigorously organized as stepwise transformations through some explicit intermediate languages. The tree walks of all transformations are expressed as an algebra, with the aid of an Attribute Grammar based preprocessor. The compiler is just one materialization of a framework that supports experimentation with language variants, thanks to an aspect-oriented internal organization.
C# is the new flagship language in the Microsoft NET platform. C# is an attractive vehicle for language design research not only because it shares many characteristics with Java, the current language of choice for suc...
详细信息
C# is the new flagship language in the Microsoft NET platform. C# is an attractive vehicle for language design research not only because it shares many characteristics with Java, the current language of choice for such research, but also because it is likely to see wide use. Language research needs a large investment in infrastructure, even for relatively small studies. This paper describes a new C# compiler designed specifically to provide that infrastructure. The overall design is deceptively simple. The parser is generated automatically from a possibly ambiguous grammar, accepts C# source, perhaps with new features, and produces an abstract syntax tree, or AST. Subsequent phases-dubbed visitors-traverse the AST, perhaps modifying it, annotating it or emitting output, and pass it along to the next visitor. Visitors are specified entirely at compilation time and are loaded dynamically as needed. There is no fixed set of visitors, and visitors are completely unconstrained. Some visitors perform traditional compilation phases, but the more interesting ones do code analysis, emit non-traditional data such as XML, and display data structures for debugging. Indeed, most usage to date has been for tools, not for language design experiments. Such experiments use source-to-source transformations or extend existing visitors to handle new language features. These approaches are illustrated by adding a statement that switches on a type instead of a value, which can be implemented in a few hundred lines. The compiler also exemplifies the value of dynamic loading and of type reflection. Copyright (C) 2004 John Wiley Sons, Ltd.
Coding in a programming language can indeed be a meticulous and a less interesting task, especially when compared to the fluidity of spoken or written communication. Each programming language has its own set of syntax...
详细信息
The design and implementation of the data structures used within a software system such as a compiler, an operating system or a data base management system are fundamental to the development of that system. Unfortunat...
详细信息
The design and implementation of the data structures used within a software system such as a compiler, an operating system or a data base management system are fundamental to the development of that system. Unfortunately, there are very few standard techniques for designing such data structures and for structuring the software used to support them. This paper proposes that it is possible to use data base techniques to design and implement such data structures. For this reason, it describes a methodology which is used to design large relational data bases, and then demonstrates how the methodology was modified and used to design the internal data structures of a relational data base management system. This paper concludes that this approach produces data structures which are better understood and easier to modify than those resulting from an ad-hoc approach.
One of the chief difficulties which needs to be overcome during the early design stages of a system is that of establishing a satisfactory design for that system. From the time it was first conceived it was apparent t...
详细信息
暂无评论