Results 1 - 10
of
34
Encoding types in ML-like languages
, 1998
"... A Hindley-Milner type system such as ML's seems to prohibit type-indexed values, i.e., functions that map a family of types to a family of values. Such functions generally perform case analysis on the input types and return values of possibly different types. The goal of our work is to demonstrate h ..."
Abstract
-
Cited by 38 (0 self)
- Add to MetaCart
A Hindley-Milner type system such as ML's seems to prohibit type-indexed values, i.e., functions that map a family of types to a family of values. Such functions generally perform case analysis on the input types and return values of possibly different types. The goal of our work is to demonstrate how to program with type-indexed values within a Hindley-Milner type system. Our first approach is to interpret an input type as its corresponding value, recursively. This solution is type-safe, in the sense that the ML type system statically prevents any mismatch between the input type and function arguments that depend on this type. Such specific type interpretations, however, prevent us from combining different type-indexed values that share the same type. To meet this objection, we focus on finding a value-independent type encoding that can be shared by different functions. We propose and compare two solutions. One requires first-class and higher-order polymorphism, and, thus, is not implementable in the core language of ML, but it can be programmed using higher-order functors in Standard ML of New Jersey. Its usage, however, is clumsy. The other approach uses embedding/projection functions. It appears to be more practical. We demonstrate the usefulness of type-indexed values through examples including type-directed partial evaluation, C printf-like formatting, and subtype coercions. Finally, we discuss the tradeoffs between our approach and some other solutions based on more expressive typing disciplines.
A General Framework for Hindley/Milner Type Systems with Constraints
, 2000
"... with constraints. The basic idea is to factor out the common core of previous extensions of the Hindley/Milner system. I present a Hindley/Milner system where the constraint part is a parameter. Speci c applications can be obtained by providing speci c constraint systems which capture the applicat ..."
Abstract
-
Cited by 29 (8 self)
- Add to MetaCart
with constraints. The basic idea is to factor out the common core of previous extensions of the Hindley/Milner system. I present a Hindley/Milner system where the constraint part is a parameter. Speci c applications can be obtained by providing speci c constraint systems which capture the application in mind. For instance, the Hindley/Milner system can be recovered by instantiating the constraint part to the standard Herbrand constraint system. Type system instances of the general framework are sound if the underlying constraint system is sound. Furthermore, I give a generic type inference algorithm for the general framework, under sucient conditions on the speci c constraint system type inference yields principal types.
Microprocessor Specification in Hawk
- In Proceedings of the 1998 International Conference on Computer Languages
, 1998
"... Modern microprocessors require an immense investment of time and effort to create and verify, from the high-level architectural design downwards. We are exploring ways to increase the productivity of design engineers by creating a domain-specific language for specifying and simulating processor arch ..."
Abstract
-
Cited by 29 (2 self)
- Add to MetaCart
Modern microprocessors require an immense investment of time and effort to create and verify, from the high-level architectural design downwards. We are exploring ways to increase the productivity of design engineers by creating a domain-specific language for specifying and simulating processor architectures. We believe that the structuring principles used in modern functional programming languages, such as static typing, parametric polymorphism, first-class functions, and lazy evaluation provide a good formalism for such a domain-specific language, and have made initial progress by creating a library on top of the functional language Haskell. We have specified the integer subset of an out-of-order, superscalar DLX microprocessor, with register-renaming, a reorder buffer, a global reservation station, multiple execution units, and speculative branch execution. Two key abstractions of this library are the signal abstract data type (ADT), which models the simulation history of a wire, and the transaction ADT, which models the state of an entire instruction as it travels through the microprocessor. 1
Modular Monadic Semantics and Compilation
, 1998
"... Modular monadic semantics is a high-level and modular form of denotational semantics. It is capable of capturing individual programming language features and their interactions. This thesis explores the theory and applications of modular monadic semantics, including: building blocks for individual p ..."
Abstract
-
Cited by 28 (0 self)
- Add to MetaCart
Modular monadic semantics is a high-level and modular form of denotational semantics. It is capable of capturing individual programming language features and their interactions. This thesis explores the theory and applications of modular monadic semantics, including: building blocks for individual programming features, equational reasoning with laws and axioms, modular proofs, program transformation, modular interpreters, and compiler construction. We will demonstrate that the modular monadic semantics framework makes programming languages easy to specify, reason about, and implement.
Specifying superscalar microprocessors in Hawk
- In Formal Techniques for Hardware and Hardware-like Systems. Marstrand
, 1998
"... Hawk is a language for the specification of microprocessors at the microarchitectural level. In this paper we use Hawk to specify a modern microarchitecture based on the Intel P6 with features such as speculation, register renaming, and superscalar out-of-order execution. ..."
Abstract
-
Cited by 24 (4 self)
- Add to MetaCart
Hawk is a language for the specification of microprocessors at the microarchitectural level. In this paper we use Hawk to specify a modern microarchitecture based on the Intel P6 with features such as speculation, register renaming, and superscalar out-of-order execution.
From (sequential) Haskell to (parallel) Eden: An Implementation Point of View
- In PLILP'98. Springer LNCS 1490
, 1998
"... . The explicitly parallel programming language Eden adds a coordination level to the lazy functional language Haskell. This paper describes how a compiler and runtime system for Eden can incrementally be built on the basis of a compiler and runtime system for the computation language. The modificati ..."
Abstract
-
Cited by 19 (11 self)
- Add to MetaCart
. The explicitly parallel programming language Eden adds a coordination level to the lazy functional language Haskell. This paper describes how a compiler and runtime system for Eden can incrementally be built on the basis of a compiler and runtime system for the computation language. The modifications needed in the compiler are restricted to specific orthogonal extensions. We show that Eden's design for distributed memory systems proves beneficial for the construction of a lean parallel runtime system. 1 Introduction Due to the side effect freedom of the reduction semantics of functional languages it is possible to evaluate independent subexpressions in arbitrary order or in parallel. This implicit parallelism is semantically transparent and allows the automatic parallelization of functional programs. In available parallel functional systems like the Glasgow parallel Haskell (GpH) system [17] or the Nijmegen CLEAN system [19] the programmer is asked to place annotations in programs. ...
Eden - Language Definition and Operational Semantics
, 1996
"... Eden is a declarative language for parallel and concurrent programming which is defined as an extension of the lazy functional programming language Haskell. It offers constructs for the explicit specification of processes and supports dynamically evolving process systems. Communication is stream-bas ..."
Abstract
-
Cited by 16 (12 self)
- Add to MetaCart
Eden is a declarative language for parallel and concurrent programming which is defined as an extension of the lazy functional programming language Haskell. It offers constructs for the explicit specification of processes and supports dynamically evolving process systems. Communication is stream-based. Eden can be used to program both transformational and reactive systems. It is tailored for distributed memory systems and consequently does not rely on any shared structures. Nevertheless it can be implemented on shared memory systems equally well. Supported by the DAAD (Deutscher Akademischer Austauschdienst) and the Spanish Ministry of Education and Science in the context of the German-Spanish Acci'on Integrada n.142B. Contents 1 Introduction 1 I Language Definition 2 2 Process Systems 2 2.1 Process definition by process abstraction . . . . . . . . . . . . . . . . . . . . . . . 2 2.2 Process creation by process instantiation . . . . . . . . . . . . . . . . . . . . . . . 4 2.3 Co...
DSL Implementation Using Staging and Monads
- In Second Conference on Domain-Specific Languages (DSL'99
, 1999
"... The impact of Domain Specific Languages (DSLs) on software design is considerable. They allow programs to be more concise than equivalent programs written in a high-level programming languages. They relieve programmers from making decisions about data-structure and algorithm design, and thus allows ..."
Abstract
-
Cited by 15 (5 self)
- Add to MetaCart
The impact of Domain Specific Languages (DSLs) on software design is considerable. They allow programs to be more concise than equivalent programs written in a high-level programming languages. They relieve programmers from making decisions about data-structure and algorithm design, and thus allows solutions to be constructed quickly. Because DSL's are at a higher level of abstraction they are easier to maintain and reason about than equivalent programs written in a highlevel language, and perhaps most importantly they can be written by domain experts rather than programmers. The problem is that DSL implementation is costly and prone to errors, and that high level approaches to DSL implementation often produce inefficient systems. By using two new programming language mechanisms, program staging and monadic abstraction, we can lower the cost of DSL implementations by allowing reuse at many levels. These mechanisms provide the expressive power that allows the construction of many compil...
The Functions of Java Bytecode
- In Workshop on the Formal Underpinnings of the Java Paradigm
, 1998
"... Java bytecode provides a portable representation for programs that allows executable content to be embedded in web pages, transferred across a network, and executed on a remote user's machine. Features like these provide many new opportunities for developers, but special precautions must be taken to ..."
Abstract
-
Cited by 10 (0 self)
- Add to MetaCart
Java bytecode provides a portable representation for programs that allows executable content to be embedded in web pages, transferred across a network, and executed on a remote user's machine. Features like these provide many new opportunities for developers, but special precautions must be taken to protect users from badly-behaved programs, which might otherwise destroy valuable data or compromise their privacy. To avoid such problems, bytecode programs from untrusted sources must be verified before they are used. If a program passes, then it should be well-behaved, and should not be able to subvert the other security mechanisms of the Java platform. However, if a program fails, then it will be rejected. Clearly, to be sure that it is effective, we need a precise way to understand bytecode verification. This paper describes the main features of a formal specification for Java bytecode that allows us to reason about the correctness of Java implementations, and to guarantee safety prope...
Disposable Memo Functions
- In Proceedings of the 1997 Haskell Workshop
, 1997
"... We formalize the meaning of lazy memo-functions in Haskell with an extension to the lazy -calculus, Haskell's computational model. The semantics enable reasoning about memoization 's effect on space and time complexity. Based on the semantics, we present a prototype implementation that requires no c ..."
Abstract
-
Cited by 9 (0 self)
- Add to MetaCart
We formalize the meaning of lazy memo-functions in Haskell with an extension to the lazy -calculus, Haskell's computational model. The semantics enable reasoning about memoization 's effect on space and time complexity. Based on the semantics, we present a prototype implementation that requires no changes to the garbage-collector; memo-tables are simply reclaimed when no references to them remain. 1 Introduction A memo-function remembers the arguments to which it has been applied, together with the result. If applied to a repeated argument, memo-functions return the cached answer rather than recomputing it from scratch. Memoization improves the time complexity of algorithms with repeated computations --- but can consume vast amounts of memory. Some implementations of memoization use heuristic cache replacement policies (such as LRU or FIFO) to manage memory. Although implementations try to minimize space consumption, in their essence, memo-functions trade better runtime performance f...

