Foreign function interface of SML#

Research output: Contribution to journalArticlepeer-review

Abstract

This paper proposes a foreign function interface seemlessly connecting ML style functional programming language with C. With this interface, a programmer can import and use C functions operating not only on base types such as int and double but also function pointers without writing complicated stub or wrapper functions. This is realized by the combination of a type-directed compilation method that achieves the same runtime data representation for primitive data types including integers and floating point numbers as those of C, and foreign language interface that enables for ML functions to call C functions and for C functions to call back ML functions. This paper reports the design, underlying theory, and implementation techniques for the foreign language interface. The mechanism reported in this article has been implemented in the SML# compiler, which is made available as an open source software.

Original languageEnglish
Pages (from-to)142-168
Number of pages27
JournalComputer Software
Volume27
Issue number2
Publication statusPublished - 2010 May 1

ASJC Scopus subject areas

  • Software

Fingerprint Dive into the research topics of 'Foreign function interface of SML#'. Together they form a unique fingerprint.

Cite this