encyclopegia.org

Concurrent ML

Concurrent ML (CML) is a multi-paradigm, general-purpose, high-level, functional programming language. It is a dialect of the programming language ML which is a concurrent extension of the Standard ML language, characterized by its ability to allow creating composable communication abstractions that are first-class rather than built into the language. The design of CML and its primitive operations have been adopted in several other programming languages, such as GNU Guile, Racket, and Manticore.

Concurrent ML (CML) is a multi-paradigm, general-purpose, high-level, functional programming language. It is a dialect of the programming language ML which is a concurrent extension of the Standard ML language, characterized by its ability to allow creating composable communication abstractions that are first-class rather than built into the language. The design of CML and its primitive operations have been adopted in several other programming languages, such as GNU Guile, Racket, and Manticore. ==Concepts== Many programming languages that support concurrency offer communication channels that allow the exchange of values between processes or threads running concurrently in a system. Communications established between processes may follow a specific protocol, requiring the programmer to write functions to establish the required pattern of communication. Meanwhile, a communicating system often requires establishing multiple channels, such as to multiple servers, and then choosing between the available channels when new data is available. This can be accomplished using polling, such as with the select operation on Unix systems. Combining both application-specific protocols and multi-party communication may be complicated due to the need to introduce polling and checking for blocking within a pre-existing protocol. Concurrent ML solves this problem by reducing this coupling of programming concepts by introducing synchronizable events. Events are a first-class abstraction that can be used with a synchronization operation (called in CML and Racket) in order to potentially block and then produce some value resulting from communication (for example, data transmitted on a channel). In CML, events can be combined or manipulated using a number of primitive operations. Each primitive operation constructs a new event rather than modifying the event in-place, allowing for the construction of compound events that represent the desired communication pattern. For example, CML allows the programmer to combine several sub-events in order to create a compound event that can then make a non-deterministic choice of one of the sub-events. Another primitive creates a new event that will modify the value resulting from synchronization to the original event. These events embody patterns of communication that, in a non-CML language, would typically be handled using a polling loop or function with handlers for each kind of event. ==Hello world== Here is a "Hello, World!" program that prints to the system console. It spawns one thread with a channel for strings, and another thread which prints a string received on the channel. It uses Standard ML of New Jersey (SML/NJ) and CML. (On non linux-x86 platforms, the heap name will differ; the line with "cml_test.x86-linux" may need changing to something different.) ==External links== ==References==

References

No reference rows published for this article.

Cite this article

MLA

"Concurrent ML." encyclopegia.org, 2024, https://encyclopegia.org/wiki/concurrent-ml. Accessed 24 November 2026.

Chicago

"Concurrent ML." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/concurrent-ml.

APA

encyclopegia.org. (2024). Concurrent ML. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/concurrent-ml

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Bavarian ML 2/2

stub · references available

Standard ML

stub · references available

Krauss-Maffei ML 440 C

stub · references available

CPI(ML)

stub · references available

doctrine of concurrent delay

stub · references available

Category:User ml

stub · references available

Template:Convert/ml U.S.oz

stub · references available

Template:Convert/ml impoz

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1223959006 · 0.5 · snapshot enwiki-001223959006

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.