H/Direct: a binary foreign language interface for Haskell
ICFP '98 Proceedings of the third ACM SIGPLAN international conference on Functional programming
The design of a class mechanism for Moby
Proceedings of the ACM SIGPLAN 1999 conference on Programming language design and implementation
C - HASKELL, or Yet Another Interfacing Tool
IFL '99 Selected Papers from the 11th International Workshop on Implementation of Functional Languages
Checking type safety of foreign function calls
Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation
Operational semantics for multi-language programs
Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Jeannie: granting java native interface developers their wishes
Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems and applications
Automatic generation of library bindings using static analysis
Proceedings of the 2009 ACM SIGPLAN conference on Programming language design and implementation
OnRamp: enabling a new component-based development paradigm
Proceedings of the 2009 Workshop on Component-Based High Performance Computing
Proceedings of the 11th International Conference on Generative Programming and Component Engineering
Euro-Par'12 Proceedings of the 18th international conference on Parallel Processing
Hi-index | 0.00 |
A foreign interface (FI) mechanism to support interoperability with libraries written in other languages (especially C) is an important feature in most high-level language implementations. Such FI mechanisms provide a Foreign Function Interface (FFI) for the high-level language to call C functions and marshaling and unmarshaling mechanisms to support conversion between the high-level and C data representations. Often, systems provide tools to automate the generation of FIs, but these tools typically lock the user into a specific model of interoperability. It is our belief that the policy used to craft the mapping between the high-level language and C should be distinct from the underlying mechanism used to implement the mapping.In this paper, we describe a FI generation tool, called FIG (for Foreign Interface Generator) that embodies a new approach to the problem of generating foreign interfaces for high-level languages. FIG takes as input raw C header files plus a declarative script that specifies the generation of the foreign interface from the header file. The script sets the policy for the translation, which allows the user to tailor the resulting FI to his or her application. We call this approach application-specific foreign-interface generation. The scripting language uses rewriting strategies as its execution model. The other major feature of the scripting language is a novel notion of composable typemaps that describe the mapping between high-level and low-level types.