Title
Application-specific foreign-interface generation
Abstract
A foreign interface (FI) mechanism to support interoperability with libraries written in other languages (especially C) is an impor- tant 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 unmar- shaling mechanisms to support conversion between the high-level and C data representations. Often, systems provide tools to auto- mate 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.
Year
DOI
Venue
2006
10.1145/1173706.1173714
Generative Programming and Component Engineering
Keywords
Field
DocType
c function,fi mechanism,approach application-specific foreign-interface generation,foreign interface,raw c header file,c data representation,scripting language,application-specific foreign-interface generation,foreign-interface generation,high-level language implementation,fi generation tool,term rewriting,high-level language,data representation,high level language
Foreign function interface,Programming language,Interoperability,Computer science,Marshalling,Interface description language,Execution model,Rewriting,Header,Scripting language
Conference
ISBN
Citations 
PageRank 
1-59593-237-2
5
0.53
References 
Authors
8
2
Name
Order
Citations
PageRank
John H. Reppy189984.36
Chunyan Song250.86