ArticleslgStudy

computer science

Reo Coordination Language

Reo Coordination Language is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Reo Coordination Language rather than just read about it. In short: Reo is a domain-specific language for programming and analyzing coordination protocols that compose individual processes into full systems, broadly construed. Examples of classes of systems that can be composed with Reo include component-based systems, service-oriented systems, multithreading systems, biological systems, and cryptographic protocols.

Reo Coordination Language — main illustration
Reo Coordination Language — illustration

Key takeaways

  • Reo Coordination Language belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Reo Coordination Language to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Reo Coordination Language from memory before moving on to harder problems.

Reference excerpt

Reo is a domain-specific language for programming and analyzing coordination protocols that compose individual processes into full systems, broadly construed. Examples of classes of systems that can be composed with Reo include component-based systems, service-oriented systems, multithreading systems, biological systems, and cryptographic protocols. Reo has a graphical syntax in which every Reo program, called a connector or circuit, is a labeled directed hypergraph. Such a graph represents the data-flow among the processes in the system. Reo has formal semantics, which stand at the basis of its various formal verification techniques and compilation tools.

Definitions In Reo, a concurrent system consists of a set of components which are glued together by a circuit that enables flow of data between components. Components can perform I/O operations on the boundary nodes of the circuit to which they are connected. There are two kinds of I/O operations: put-requests dispatch data items to a node, and get-requests fetch data items from a node. All I/O operations are blocking, which means that a component can proceed only after its pending I/O operation has been successfully processed. The figure on the top-right shows an example of a producers-consumer system with three components: two producers on the left and one consumer on the right. The circuit in the middle defines the protocol, which states that the producers should send data synchronously, while the consumer receives those data in alternating order. Formally, the structure of a circuit is defined as follows: Definition 1. A circuit is a triple R = ( N , B , C , t ) {\displaystyle R=(N,B,C,t)} where:

N is a set of nodes;

B ⊆ N {\displaystyle B\subseteq N} is a set of boundary nodes;

C ⊆ 2 N × 2 N {\displaystyle C\subseteq 2^{N}\times 2^{N}} is a set of channels;

t : C → T {\displaystyle t:C\rightarrow T} assigns a types to every channel. such that | I ∪ O | = 2 {\displaystyle |I\cup O|=2} , for all ( I , O ) ∈ C {\displaystyle (I,O)\in C} . If c = ( I , O ) ∈ C {\displaystyle c=(I,O)\in C} is a channel, then I is called the set of input nodes of c and O is called the set of output nodes of c. The dynamics of a circuit resemble the flow of signals through an electronic circuit. Nodes have fixed merger-replicator behavior: the data of one of the incoming channels is propagated to all outgoing channels, without storing or altering the data (i.e., replicator behavior). If multiple incoming channels can provide data, the node makes a nondeterministic choice among them (i.e., merger behavior). Nodes with only incoming or outgoing channels are called sink nodes or source nodes, respectively; nodes with both incoming and outgoing channels are called mixed nodes. In contrast to nodes, channels have user-defined behavior represented by their type. This means that channels may store or alter data items that flow through them. Although every channel connects exactly two nodes, these nodes need not to be input and output. For instance, the vertical channel in the figure on the top-right has two inputs and no outputs. The channel type defines the behavior of the channel with respect to data. Below is a list of common types:

Sync: Atomically gets data from its input node and propagates it to its output node. LossySync: Same as Sync, but can lose data if its output node is not ready to take data. Fifo⟨n⟩: Gets data from its input node, temporarily stores it in an internal buffer of size n, and propagates it to its output node (whenever this output node is ready to take data). SyncDrain: Atomically gets data from both its input nodes and loses it. Filter⟨c⟩: Atomically gets data from its input node and propagates it to its output node if the filter condition c is satisfied; loses the data otherwise.

Software engineering properties

Exogeneity One way to classify coordination languages is in terms of their locus: locus of coordination refers to where coordination activity takes place, classifying coordination models and languages as endogenous or exogenous. Endogenous models and languages, such as Linda, provide primitives that must be incorporated within a computation for its coordination. In applications that use such models, primitives that affect the coordination of each module are inside the module itself. In contrast, Reo is an exogenous language that provides primitives that support coordination of entities from without. In applications that use exogenous models, primitives that affect the coordination of each module are outside the module itself. Endogenous models are sometimes more natural for a given application. However, they generally lead to an intermixing of coordination primitives with computation code, which entangles the semantics of computation with coordination protocols. This intermixing tends to scatter communication/coordination primitives throughout the source code, making the cooperation model and the coordination protocol of an application nebulous and implicit: generally, there is no piece of source code identifiable as the cooperation model or the coordination protocol of an application, that can be designed, developed, debugged, maintained, and reused, in isolation from the rest of the application code. On the other hand, exogenous models encourage development of coordination modules separately and independently of the computation modules they are supposed to coordinate. Consequently, the result of the substantial effort invested in the design and development of the coordination component of an application can manifest itself as tangible "pure coordinator modules" which are easier to understand, and can also be reused in other applications.

… excerpt ends here. Continue reading the full article.

Illustrations

Reo Coordination Language: Reo circuit: Alternator
Reo circuit: Alternator

Worked examples

Example 1 — a first encounter with Reo Coordination Language

Start with the simplest possible case. Write down what Reo Coordination Language claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Reo Coordination Language before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Reo Coordination Language ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Reo Coordination Language

In research
Reo Coordination Language appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Reo Coordination Language in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Reo Coordination Language is common in secondary-school and first-year university syllabi. It links to neighbouring topics Concurrency (computer science), Distributed computing, Model checking, so understanding it makes those chapters shorter.
In everyday life
Look for Reo Coordination Language outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Reo Coordination Language in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Reo Coordination Language means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Reo Coordination Language out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Reo Coordination Language in simple terms?

Reo is a domain-specific language for programming and analyzing coordination protocols that compose individual processes into full systems, broadly construed. Examples of classes of systems that can be composed with Reo include component-based systems, service-oriented systems, multithreading syste…

Why does Reo Coordination Language matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Reo Coordination Language?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Reo Coordination Language.

Tags

  • Concurrency (computer science)
  • Distributed computing
  • Model checking
  • Models of computation
  • Programming languages created in 2001
  • Scala (programming language)

Keep exploring