Embedding the C language into SML#

Isao Sasano, Atsushi Ohori

Research output: Contribution to journalArticle

Abstract

SML# is highly interoperable with C so that we can use C functions without data conversion simply by importing them as SML# functions using special importing expressions. In this paper we extend the SML# language so that we can write C programs directly in SML# programs. We added a special construct for embedding C programs, which is a declaration in the extended SML# language. This extension enables us to write C programs not only in toplevel but also in the declaration part of let expressions, local declarations, structures, and functors. Furthermore we added a functionality of referring to values of SML# variables from embedded C programs.

Original languageEnglish
Pages (from-to)193-203
Number of pages11
JournalComputer Software
Volume29
Issue number2
Publication statusPublished - 2012 Jul 3

ASJC Scopus subject areas

  • Software

Cite this

Sasano, I., & Ohori, A. (2012). Embedding the C language into SML#. Computer Software, 29(2), 193-203.