A synchronous programming language is a
computer programming language optimized for programming reactive systems.
Computer systems can be sorted in three main classes: (1) transformational systems that take some inputs, process them, deliver their outputs, and terminate their execution; a typical example is a compiler; (2) interactive systems that interact continuously with their environment, at their own speed; a typical example is the web; and (3) reactive systems that interact continuously with their environment, at a speed imposed by the environment; a typical example is the automatic flight control system of modern airplanes. Reactive systems must therefore react to stimuli from the environment within strict time bounds. For this reason they are often also called
real-time systems, and are found often in
embedded system
An embedded system is a computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is ''embedded'' as ...
s.
Synchronous programming (also synchronous reactive programming or SRP) is a computer
programming paradigm supported by synchronous programming languages. The principle of SRP is to make the same abstraction for programming languages as the synchronous abstraction in digital circuits. Synchronous circuits are indeed designed at a high-level of abstraction where the timing characteristics of the electronic transistors are neglected. Each gate of the circuit (or, and, ...) is therefore assumed to compute its result instantaneously, each wire is assumed to transmit its signal instantaneously. A synchronous circuit is clocked and at each tick of its clock, it computes instantaneously its output values and the new values of its memory cells (latches) from its input values and the current values of its memory cells. In other words, the circuit behaves as if the electrons were flowing infinitely fast. The first synchronous programming languages were invented in France in the 1980s:
Esterel,
Lustre
Lustre or Luster may refer to:
Places
* Luster, Norway, a municipality in Vestlandet, Norway
** Luster (village), a village in the municipality of Luster
* Lustre, Montana, an unincorporated community in the United States
Entertainment
* '' ...
and Signal. Since then, many other synchronous languages have emerged.
The synchronous abstraction makes reasoning about time in a synchronous program a lot easier, thanks to the notion of logical ticks: a synchronous program reacts to its environment in a sequence of ticks, and computations within a tick are assumed to be instantaneous, i.e., as if the processor executing them were infinitely fast. The statement "a, , b" is therefore abstracted as the package "ab" where "a" and "b" are simultaneous. To take a concrete example, the Esterel statement "every 60 second emit minute" specifies that the signal "minute" is exactly synchronous with the 60-th occurrence of the signal "second". At a more fundamental level, the synchronous abstraction eliminates the non-determinism resulting from the interleaving of concurrent behaviors. This allows deterministic semantics, therefore making synchronous programs amenable to formal analysis,
verification and certified code generation, and usable as
formal specification formalisms.
In contrast, in the asynchronous model of computation, on a sequential processor, the statement "a, , b" can be either implemented as "a;b" or as "b;a". This is known as the interleaving-based non determinism. The drawback with an asynchronous model is that it intrinsically forbids deterministic semantics (e.g., race conditions), which makes formal reasoning such as analysis and verification more complex. Nonetheless, asynchronous formalisms are very useful to model, design and verify distributed systems, because they are intrinsically asynchronous.
Also in contrast are systems with processes that basically ''interact synchronously''. An example would be systems built based on the
Communicating sequential processes (CSP) model, which also allows nondeterministic choice.
Synchronous languages
*
Argos
Argos most often refers to:
* Argos, Peloponnese, a city in Argolis, Greece
** Ancient Argos, the ancient city
* Argos (retailer), a catalogue retailer operating in the United Kingdom and Ireland
Argos or ARGOS may also refer to:
Businesses
* ...
*
Atom
Every atom is composed of a nucleus and one or more electrons bound to the nucleus. The nucleus is made of one or more protons and a number of neutrons. Only the most common variety of hydrogen has no neutrons.
Every solid, liquid, gas, and ...
(a
domain-specific language
A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains. There are a wide variety of DSLs, ranging f ...
in
Haskell for hard realtime embedded programming)
*
Averest
Averest is a synchronous programming language and set of tools to specify, verify, and implement reactive systems. It includes a compiler for synchronous programs, a symbolic model checker, and a tool for hardware/software synthesis.
It can be us ...
*
Blech
*
ChucK (a synchronous reactive programming language for audio)
*
Esterel[G. Berry and G. Gonthier. The synchronous programming language ESTEREL: Design, semantics, implementation. ''Science of Computer Programming'', 19(2), 1992.]
*
LabVIEW
*
LEA
*
Lustre
Lustre or Luster may refer to:
Places
* Luster, Norway, a municipality in Vestlandet, Norway
** Luster (village), a village in the municipality of Luster
* Lustre, Montana, an unincorporated community in the United States
Entertainment
* '' ...
*
PLEXIL
PLEXIL (Plan Execution Interchange Language) is an open source technology for automation, created and currently in development by NASA.
Overview
PLEXIL is a programming language for representing plans for automation.
PLEXIL is used in automatio ...
*
SIGNAL (a dataflow-oriented synchronous language enabling multi-clock specifications)
*
SOL
Sol or SOL may refer to:
Astronomy
* The Sun
Currency
* SOL Project, a currency project in France
* French sol, or sou
* Argentine sol
* Bolivian sol, the currency of Bolivia from 1827 to 1864
* Peruvian sol, introduced in 1991
* Peruvian sol ( ...
*SyncCharts
See also
*
Asynchronous programming
Asynchrony, in computer programming, refers to the occurrence of events independent of the main program flow and ways to deal with such events. These may be "outside" events such as the arrival of signals, or actions instigated by a program that t ...
*
Concurrency (computer science)
References
* Nicolas Halbwachs. "Synchronous programming of reactive systems". Kluwer Academic Publishers, 1993. http://www-verimag.imag.fr/~halbwach/newbook.pdf
External links
The Synchronous groupat Verimag lab.
The SIGNAL programming language—Proposes
parallel languages
Parallel is a geometric term of location which may refer to:
Computing
* Parallel algorithm
* Parallel computing
* Parallel metaheuristic
* Parallel (software), a UNIX utility for running programs in parallel
* Parallel Sysplex, a cluster of IBM ...
based on
C, lets programmers specify and manage parallelism on a broad range of computer architectures.
{{Types of programming languages
Programming language classification