Results 1 -
9 of
9
From ML to Ada: Strongly-typed Language Interoperability via Source Translation
, 1993
"... We describe a system that supports source-level integration of ML-like functional language code with ANSI C or Ada83 code. The system works by translating the functional code into type-correct, "vanilla" C or Ada; it offers simple, efficient, type-safe inter-operation between new functional code com ..."
Abstract
-
Cited by 59 (3 self)
- Add to MetaCart
We describe a system that supports source-level integration of ML-like functional language code with ANSI C or Ada83 code. The system works by translating the functional code into type-correct, "vanilla" C or Ada; it offers simple, efficient, type-safe inter-operation between new functional code components and "legacy" third-generationlanguage components. Our translator represents a novel synthesis of techniques including user-parameterized specification of primitive types and operators; removal of polymorphism by code specialization; removal of higher-order functions using closure datatypes and interpretation; and aggressive optimization of the resulting first-order code, which can be viewed as encoding the result of a closure analysis. Programs remain fully typed at every stage of the translation process, using only simple, standard type systems. Target code runs at speeds comparable to the output of current optimizing ML compilers, even though handicapped by a conservative garbage collector.
Safe and Principled Language Interoperation
- In European Symposium on Programming (ESOP
, 1999
"... . Safety of interoperation of program fragments written in different safe languages may fail when the languages have different systems of computational effects: an exception raised by an ML function may have no valid semantic interpretation in the context of a Safe-C caller. Sandboxing costs perform ..."
Abstract
-
Cited by 11 (1 self)
- Add to MetaCart
. Safety of interoperation of program fragments written in different safe languages may fail when the languages have different systems of computational effects: an exception raised by an ML function may have no valid semantic interpretation in the context of a Safe-C caller. Sandboxing costs performance and still may violate the semantics if effects are not taken into account. We show that effect annotations alone are insufficient to guarantee safety, and we present a type system with bounded effect polymorphism designed to verify the compatibility of abstract resources required by the computational models of the interoperating languages. The type system ensures single address space interoperability of statically typed languages with effect mechanisms built of modules for control and state. It is shown sound for safety with respect to the semantics of a language with constructs for selection, simulation, and blocking of resources, targeted as an intermediate language for optimization o...
Confessions of a used programming language salesman (getting the masses hooked on haskell
, 2006
"... When considering the past or the future, dear apprentice, be mindful of the present. If, while considering the past, you become caught in the past, lost in the past, or enslaved by the past, then you have forgotten yourself in the present. If, while considering the future, you become caught in the f ..."
Abstract
-
Cited by 9 (0 self)
- Add to MetaCart
When considering the past or the future, dear apprentice, be mindful of the present. If, while considering the past, you become caught in the past, lost in the past, or enslaved by the past, then you have forgotten yourself in the present. If, while considering the future, you become caught in the future, lost in the future, or enslaved by the future, then you have forgotten yourself in the present. Conversely, when considering the past, if you do not become caught, lost, or enslaved by the past, then you have remained mindful of the present. And if, when considering the future, you do not become caught, lost, or enslaved in the future, then you have remained mindful of the present. [14] Programmers in the real world wrestle everyday to overcome the impedance mismatch between relational data, objects, and XML. We have been working on solving this problem for the past ten years by applying principles from functional programming, in particular monads and comprehensions. By viewing data as monads and formulating queries as comprehensions, it becomes possible to unify the three data models and their corresponding programming languages instead of considering each as a separate special case. To actually bring this within the reach of mainstream programmers we have worked tirelessly on transferring functional programming technology from pure Haskell, via Cω to the upcoming versions of C ♯ 3.0 and Visual Basic 9 and the LINQ framework. Functional programming has finally reached the masses, except that it is called Visual Basic instead of Lisp,
C -> HASKELL, or Yet Another Interfacing Tool
- In Koopman and Clack [23
, 1999
"... This paper discusses a new method for typed functional languages to access libraries written in a lower-level language. More specifically, it introduces an interfacing tool that eases Haskell access to C libraries. The tool obtains information about the C data type denitions and function signatu ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
This paper discusses a new method for typed functional languages to access libraries written in a lower-level language. More specifically, it introduces an interfacing tool that eases Haskell access to C libraries. The tool obtains information about the C data type denitions and function signatures by analysing the C header les of the library. It uses this information to compute the missing details in the template of a Haskell module that implements a Haskell binding to the C library. Hooks embedded in the binding le signal where, which, and how C objects are accessed from Haskell. The Haskell code in the binding le determines Haskell type signatures and marshaling details. The approach is lightweight and does not require an extra interface description language. 1 Introduction The complexity of modern software environments frequently requires interoperability between software components that are coded in dierent programming languages. Thus, the lack of access to librar...
Benchmarking Purely Functional Data Structures
- Journal of Functional Programming
, 1999
"... When someone designs a new data structure, they want to know how well it performs. Previously, the only way to do this involves finding, coding and testing some applications to act as benchmarks. This can be tedious and time-consuming. Worse, how a benchmark uses a data structure may considerably af ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
When someone designs a new data structure, they want to know how well it performs. Previously, the only way to do this involves finding, coding and testing some applications to act as benchmarks. This can be tedious and time-consuming. Worse, how a benchmark uses a data structure may considerably affect the efficiency of the data structure. Thus, the choice of benchmarks may bias the results. For these reasons, new data structures developed for functional languages often pay little attention to empirical performance. We solve these problems by developing a benchmarking tool, Auburn, that can generate benchmarks across a fair distribution of uses. We precisely define "the use of a data structure", upon which we build the core algorithms of Auburn: how to generate a benchmark from a description of use, and how to extract a description of use from an application. We consider how best to use these algorithms to benchmark competing data structures. Finally, we test Auburn by benchmarking ...
Scripting COM components in Haskell
- In Fifth International Conference on Software Reuse
, 1997
"... Designers of advanced languages, such as ML, Prolog, or Haskell, face an uphill struggle to persuade potential users of the merits of their approach. In fact, it has hitherto been impossible to find other than niche applications because (foreign language interfaces notwithstanding) it has been too d ..."
Abstract
- Add to MetaCart
Designers of advanced languages, such as ML, Prolog, or Haskell, face an uphill struggle to persuade potential users of the merits of their approach. In fact, it has hitherto been impossible to find other than niche applications because (foreign language interfaces notwithstanding) it has been too difficult to integrate software components written in new languages with large bodies of existing code. Microsoft's Component Object Model (COM) offers this community a new opportunity. Because the interface between objects is by design language independent and armslength, it is possible either to write glue programs that integrate existing COM objects, or to write software components whose services can be used by clients written in more conventional languages. We describe our experience of exploiting this opportunity in the purely-functional language Haskell. We describe a design for integrating COM components into Haskell programs, and we demonstrate why someone might want to script their C...
: A Binary Foreign Language Interface for Haskell
- In ICFP'98
, 1998
"... H/Direct is a foreign-language interface for the purely functional language Haskell. Rather than rely on host-language type signatures, H/Direct compiles Interface Definition Language (IDL) to Haskell stub code that marshals data across the interface. This approach allows Haskell to call both C and ..."
Abstract
- Add to MetaCart
H/Direct is a foreign-language interface for the purely functional language Haskell. Rather than rely on host-language type signatures, H/Direct compiles Interface Definition Language (IDL) to Haskell stub code that marshals data across the interface. This approach allows Haskell to call both C and COM, and allows a Haskell component to be wrapped in a C or COM interface. IDL is a complex language and language mappings for IDL are usually described informally. In contrast, we provide a relatively formal and precise definition of the mapping between Haskell and IDL. 1 Introduction A foreign-language interface provides a way for programs written in one language to call, or be called by, programs written in another. Programming languages that do not supply a foreign-language interface die a slow, lingering death --- good languages die more slowly than bad ones, but they all die in the end. In this paper we describe a new foreign-language for the functional programming language Haskell. I...
A Side-Effect-Free Hierarchical Radiosity Algorithm
, 2000
"... The implementation of irregular algorithms with dynamic access patterns often requires the use of complex data structures and makes essential use of side effects. An example is the hierarchical radiosity method, a global illumination method from computer graphics, which uses dynamically growing tree ..."
Abstract
- Add to MetaCart
The implementation of irregular algorithms with dynamic access patterns often requires the use of complex data structures and makes essential use of side effects. An example is the hierarchical radiosity method, a global illumination method from computer graphics, which uses dynamically growing trees with mutual interactions. The irregularity of the algorithm does not hinder a parallel realization on machines with a global address space, but the use of side effects requires a locking mechanism in order to avoid race conditions. This may cause sequentializations that reduce the obtainable speedup. Functional languages offer the possibility of programming without side effects, and they allow parallelization to be expressed orthoganally from the main program. In this paper we use Haskell, a standard nonstrict pure functional language, to realize the coordination level of the hierarchical radiosity algorithm without side effects. The program is executable sequentially using standard compilers, and it offers a variety of straightforward parallelization strategies without explicit locking that can be implemented with no change to the structure of the program.
Template Haskell: A Report From The Field
, 2003
"... We have now had a year since the introductory Template Haskell paper was written. In this report I look back upon what I have used it for in this time giving an idea of the ways in which I have found it useful and explaining the problems I have encountered with it. ..."
Abstract
- Add to MetaCart
We have now had a year since the introductory Template Haskell paper was written. In this report I look back upon what I have used it for in this time giving an idea of the ways in which I have found it useful and explaining the problems I have encountered with it.

