scispace - formally typeset
Search or ask a question
Topic

MLton

About: MLton is a research topic. Over the lifetime, 32 publications have been published within this topic receiving 433 citations.

Papers
More filters
Proceedings ArticleDOI
TL;DR: Two different ways of typing variadic functions in NLFFI are described and an implementation technique based on the idea of using state machines to describe calling conventions is described, which can be easily retargeted to new architectures and ABIs and added to any HOT language implementation that supports calling C functions.
Abstract: The importance of providing a mechanism to call C functions from high-level languages has been understood for many years and, these days, almost all statically-typed high-level-language implementations provide such a mechanism. One glaring omission, however, has been support for calling variadic C functions, such as printf. Variadic functions have been ignored because it is not obvious how to give static types to them and because it is not clear how to generate calling sequence when the arguments to the function may not be known until runtime. In this paper, we address this longstanding omission with an extension to the NLFFI foreign-interface framework used by Standard ML of New Jersey (SML/NJ) and the MLton SML compiler. We describe two different ways of typing variadic functions in NLFFI and an implementation technique based on the idea of using state machines to describe calling conventions. Our implementation is easily retargeted to new architectures and ABIs, and can also be easily added to any HOT language implementation that supports calling C functions.

2 citations

Book ChapterDOI
18 Jan 2021
TL;DR: In this article, a tiered-priority mechanism for a synchronous message-passing language with support for selective communication and first-class communication protocols is proposed, which allows higher priority threads to communicate with lower priority threads, providing the ability to express programs that would be rejected by classic priority mechanisms.
Abstract: In this paper we introduce a tiered-priority mechanism for a synchronous message-passing language with support for selective communication and first-class communication protocols. Crucially our mechanism allows higher priority threads to communicate with lower priority threads, providing the ability to express programs that would be rejected by classic priority mechanisms that disallow any (potentially) blocking interactions between threads of differing priorities. We provide a prototype implementation of our tiered-priority mechanism capable of expressing Concurrent ML and built in the MLton SML compiler and runtime. We evaluate the viability of our implementation by implementing a safe and predictable shutdown mechanisms in the Swerve webserver and eXene windowing toolkit. Our experiments show that priority can be easily added to existing CML programs without degrading performance. Our system exhibits negligible overheads on more modest workloads.

2 citations

01 Jan 2013
TL;DR: An LLVM Backend for MLton as mentioned in this paper is an LLVM back-end for the MLton MLton compiler and MLton runtime environment, which is used in this paper.
Abstract: An LLVM Back-end for MLton

1 citations

Journal ArticleDOI
TL;DR: In this article, the authors present their experience in modifying MLton, a whole-program optimizing compiler for Standard ML, for use in embedded and real-time domains. But they focus primarily on the language runtime, reworking the threading subsystem, object model, and garbage collector.
Abstract: There is a growing interest in leveraging functional programming languages in real-time and embedded contexts. Functional languages are appealing as many are strictly typed, amenable to formal methods, have limited mutation, and have simple but powerful concurrency control mechanisms. Although there have been many recent proposals for specialized domain-specific languages for embedded and real-time systems, there has been relatively little progress on adapting more general purpose functional languages for programming embedded and real-time systems. In this paper, we present our current work on leveraging Standard ML (SML) in the embedded and real-time domains. Specifically, we detail our experiences in modifying MLton, a whole-program optimizing compiler for SML, for use in such contexts. We focus primarily on the language runtime, reworking the threading subsystem, object model, and garbage collector. We provide preliminary results over a radar-based aircraft collision detector ported to SML.

1 citations

Proceedings ArticleDOI
22 Jun 2010
TL;DR: This paper presents a formalization of TSSA by defining its abstract syntax, the operational semantics, and the static semantics, which leads to a general semantics foundation for SSA-based optimizing compilers.
Abstract: Static single-assignment form (SSA) is an important optimizing compiler intermediate representation, and is widely used in many real-world production compilers, such as GCC, LLVM, Jikes, and MLton, etc.. This paper presents the initial results of our project to apply the techniques of proof-carrying code and certifying compilation to practical highly-optimizing compilers. To be specific, this paper presents the design of an explicitly typed static single-assignment form called TSSA. This paper presents a formalization of TSSA by defining its abstract syntax, the operational semantics, and the static semantics. This paper leads to a general semantics foundation for SSA-based optimizing compilers.

1 citations


Network Information
Related Topics (5)
Concurrency
13K papers, 347.1K citations
85% related
Compiler
26.3K papers, 578.5K citations
84% related
Data structure
28.1K papers, 608.6K citations
83% related
Executable
24K papers, 391.1K citations
82% related
Logic programming
11.1K papers, 274.2K citations
82% related
Performance
Metrics
No. of papers in the topic in previous years
YearPapers
20213
20202
20191
20183
20164
20141