The '''join-calculus''' is a process calculus developed at INRIA. The join-calculus was developed to provide a formal basis for the design of distributed programming languages, and therefore intentionally avoids communication constructs found in other process calculi, such as rendezvous communications, which are difficult to implement in a distributed setting.<ref name="cham">{{cite journal | author=Cedric Fournet, Georges Gonthier | title=The reflexive CHAM and the join-calculus |journal = Proceedings of POPL| year = 1995 | url=http://citeseer.ist.psu.edu/fournet95reflexive.html}}, pg. 1</ref> Despite this limitation, the join-calculus is as expressive as the full π-calculus. Encodings of the π-calculus in the join-calculus, and vice versa, have been demonstrated.<ref name="cham"/>

The join-calculus is a member of the π-calculus family of process calculi, and can be considered, at its core, an asynchronous π-calculus with several strong restrictions:<ref name="cham"/> *Scope restriction, reception, and replicated reception are syntactically merged into a single construct, the ''definition''; *Communication occurs only on defined names; *For every defined name there is exactly one replicated reception. However, as a language for programming, the join-calculus offers at least one convenience over the π-calculus — namely the use of ''multi-way join patterns'', the ability to match against messages from multiple channels simultaneously.<ref>{{Cite web |last=Petricek |first=Tomas |title=TryJoinads (IV.) - Concurrency using join calculus |url=http://tomasp.net/blog/joinads-join-calculus.aspx/ |access-date=2023-01-24 |website=tomasp.net}}</ref>

==Implementations== ===Languages based on the join-calculus===

The join-calculus programming language is a new language based on the join-calculus process calculus. It is implemented as an interpreter written in OCaml, and supports statically typed distributed programming, transparent remote communication, agent-based mobility, and some failure-detection.<ref>{{cite journal | author=Cedric Fournet, Georges Gonthier | title=The Join Calculus: A Language for Distributed Mobile Programming |journal = Applied Semantics. International Summer School, APPSEM 2000| year = 2000 | pages=268–332 | url=https://www.microsoft.com/en-us/research/publication/join-calculus-language-distributed-mobile-programming/}}</ref>

* Though not explicitly based on join-calculus, the rule system of CLIPS implements it if every rule deletes its inputs when triggered (retracts the relevant facts when fired).

Many implementations of the join-calculus were made as extensions of existing programming languages:

* JoCaml is a version of OCaml extended with join-calculus primitives * Polyphonic C# and its successor extend C# * MC# and Parallel C# extend Polyphonic C# * Join Java extends Java * A Concurrent Basic proposal that uses Join-calculus * JErlang (the J is for Join, Erjang is Erlang for the JVM)<ref>{{Cite web |url=http://www.doc.ic.ac.uk/~susan/jerlang/ |title=JErlang: Erlang with Joins |access-date=2015-04-18 |archive-url=https://web.archive.org/web/20171208175247/http://www.doc.ic.ac.uk/~susan/jerlang/ |archive-date=2017-12-08 |url-status=dead }}</ref>

===Embeddings in other programming languages===

These implementations do not change the underlying programming language but introduce join calculus operations through a custom library or DSL:

* The ScalaJoins and the [https://github.com/Chymyst/Chymyst Chymyst] libraries are in Scala * [https://joinhs.sourceforge.net/ JoinHs] by Einar Karttunen and [https://github.com/syallop/Join-Language syallop/Join-Language] by Samuel Yallop are DSLs for Join calculus in Haskell * Joinads - various implementations of join calculus in F# * CocoaJoin is an experimental implementation in Objective-C for iOS and Mac OS X * The Join Python library in Python 3<ref>[https://github.com/maandree/join-python/blob/master/join-python.pdf Join Python, Join-calculus for Python by Mattias Andree]</ref> * C++ via Boost<ref>[https://channel.sourceforge.net/boost_join/libs/join/doc/boost_join_design.html Yigong Liu - Join-Asynchronous Message Coordination and Concurrency Library]</ref> (for boost from 2009, ca. v. 40, current (Dec '19) is 72).

==References==

<references/>

==External links== * INRIA, [http://moscova.inria.fr/join/index.shtml Join Calculus homepage] * Microsoft Research, [https://www.microsoft.com/en-us/research/wp-content/uploads/2017/01/join-tutorial.pdf The Join Calculus: a Language for Distributed Mobile Programming] <!-- this is mostly related to parallel programming -->

{{Concurrent computing}} {{DEFAULTSORT:Join-calculus}}

Category:Process calculi