scholarly journals A Modular SOS for ML Concurrency Primitives

1999 ◽  
Vol 6 (57) ◽  
Author(s):  
Peter D. Mosses

Modularity is an important pragmatic aspect of semantic<br />descriptions. In denotational semantics, the issue of modularity has <br />received much attention, and appropriate abstractions have been <br />introduced, so that definitions of semantic functions may be independent of<br />the details of how computations are modeled. In structural operational<br />semantics (SOS), however, this issue has largely been neglected, and<br />SOS descriptions of programming languages typically exhibit rather poor<br />modularity| - for instance, extending the described language may entail<br />a complete reformulation of the description of the original constructs.<br />A proposal has recently been made for a modular approach to SOS, called<br />MSOS. The basic definitions of the Modular SOS framework are recalled<br />here, but the reader is referred to other papers for a full introduction.<br />This paper focuses on illustrating the applicability of Modular SOS, by<br />using it to give a description of a sublanguage of Concurrent ML (CML);<br />the transition rules for the purely functional constructs do not have to be<br />reformulated at all when adding references and/or processes. The paper<br />concludes by comparing the MSOS description with previous operational<br />descriptions of similar languages.<br />The reader is assumed to be familiar with conventional SOS, with the<br />concepts of functional programming languages such as Standard ML, and<br />with fundamental notions of concurrency.

1998 ◽  
Vol 8 (1) ◽  
pp. 1-22 ◽  
Author(s):  
AMR SABRY

Functional programming languages are informally classified into pure and impure languages. The precise meaning of this distinction has been a matter of controversy. We therefore investigate a formal definition of purity. We begin by showing that some proposed definitions which rely on confluence, soundness of the beta axiom, preservation of pure observational equivalences and independence of the order of evaluation, do not withstand close scrutiny. We propose instead a definition based on parameter-passing independence. Intuitively, the definition implies that functions are pure mappings from arguments to results; the operational decision of how to pass the arguments is irrelevant. In the context of Haskell, our definition is consistent with the fact that the traditional call-by-name denotational semantics coincides with the traditional call-by-need implementation. Furthermore, our definition is compatible with the stream-based, continuation-based and monad-based integration of computational effects in Haskell. Finally, we observe that call-by-name reasoning principles are unsound in compilers for monadic Haskell.


1994 ◽  
Vol 4 (3) ◽  
pp. 285-335 ◽  
Author(s):  
Mads Tofte

AbstractIn this paper we present a language for programming with higher-order modules. The language HML is based on Standard ML in that it provides structures, signatures and functors. In HML, functors can be declared inside structures and specified inside signatures; this is not possible in Standard ML. We present an operational semantics for the static semantics of HML signature expressions, with particular emphasis on the handling of sharing. As a justification for the semantics, we prove a theorem about the existence of principal signatures. This result is closely related to the existence of principal type schemes for functional programming languages with polymorphism.


1991 ◽  
Vol 6 (3) ◽  
pp. 223-235
Author(s):  
Eleanor Bradley

AbstractMany problem domains exhibit inherent parallelism, and parallel systems which capture and exploit this can be used to look for efficient solutions to AI problems. Functional programming languages are expected to be efficiently realisable on fifth generation hardware. A rational reconstruction of AI programming paradigms is used to investigate the programmability and performance of functional languages in this particular area.Three languages—Standard ML, Hope+ and Miranda—are used in the rational reconstruction, each language being used to implement three applications. Results indicate that functional programming languages have become much more useable in recent years, and have the potential to become useful tools in AI problem solving. A brief annotated bibliography of texts which covers the introduction to, theory and implementation issues of, functional programming languages, is included.


1998 ◽  
Vol 8 (2) ◽  
pp. 97-129 ◽  
Author(s):  
ROBERT F. STÄRK

In this article we explain two different operational interpretations of functional programs by two different logics. The programs are simply typed λ-terms with pairs, projections, if-then-else and least fixed point recursion. A logic for call-by-value evaluation and a logic for call-by-name evaluation are obtained as as extensions of a system which we call the basic logic of partial terms (BPT). This logic is suitable to prove properties of programs that are valid under both strict and non-strict evaluation. We use methods from denotational semantics to show that the two extensions of BPT are adequate for call-by-value and call-by-name evaluation. Neither the programs nor the logics contain the constant ‘undefined’.


2009 ◽  
Vol 19 (3-4) ◽  
pp. 403-438 ◽  
Author(s):  
BART JACOBS ◽  
CHRIS HEUNEN ◽  
ICHIRO HASUO

AbstractArrows are an extension of the well-established notion of a monad in functional-programming languages. This paper presents several examples and constructions and develops denotational semantics of arrows as monoids in categories of bifunctors Cop × C → C. Observing similarities to monads – which are monoids in categories of endofunctors C → C – it then considers Eilenberg–Moore and Kleisli constructions for arrows. The latter yields Freyd categories, mathematically formulating the folklore claim ‘Arrows are Freyd categories.’


Author(s):  
Norihiro Yamada ◽  
Samson Abramsky

Abstract The present work achieves a mathematical, in particular syntax-independent, formulation of dynamics and intensionality of computation in terms of games and strategies. Specifically, we give game semantics of a higher-order programming language that distinguishes programmes with the same value yet different algorithms (or intensionality) and the hiding operation on strategies that precisely corresponds to the (small-step) operational semantics (or dynamics) of the language. Categorically, our games and strategies give rise to a cartesian closed bicategory, and our game semantics forms an instance of a bicategorical generalisation of the standard interpretation of functional programming languages in cartesian closed categories. This work is intended to be a step towards a mathematical foundation of intensional and dynamic aspects of logic and computation; it should be applicable to a wide range of logics and computations.


2021 ◽  
Vol 31 ◽  
Author(s):  
BHARGAV SHIVKUMAR ◽  
JEFFREY MURPHY ◽  
LUKASZ ZIAREK

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.


Sign in / Sign up

Export Citation Format

Share Document