Synchronous programming language
   HOME

TheInfoList



OR:

A synchronous programming language is a
computer programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming l ...
optimized for programming reactive systems.
Computer system A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations ( computation) automatically. Modern digital electronic computers can perform generic sets of operations known as programs. These prog ...
s 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 Real-time computing (RTC) is the computer science term for Computer hardware, hardware and computer software, software systems subject to a "real-time constraint", for example from Event (synchronization primitive), event to Event (computing), ...
, 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 ...
s. Synchronous programming (also synchronous reactive programming or SRP) is a computer
programming paradigm Programming paradigms are a way to classify programming languages based on their features. Languages can be classified into multiple paradigms. Some paradigms are concerned mainly with implications for the execution model of the language, suc ...
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 Esterel is a synchronous programming language for the development of complex reactive systems. The imperative programming style of Esterel allows the simple expression of parallelism and preemption. As a consequence, it is well suited for cont ...
, Lustre 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 Verify or verification may refer to: General * Verification and validation, in engineering or quality management systems, is the act of reviewing, inspecting or testing, in order to establish and document that a product, service or system meets ...
and certified code generation, and usable as
formal specification In computer science, formal specifications are mathematically based techniques whose purpose are to help with the implementation of systems and software. They are used to describe a system, to analyze its behavior, and to aid in its design by verif ...
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 *
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, a ...
(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 ...
in
Haskell Haskell () is a general-purpose, statically-typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research and industrial applications, Haskell has pioneered a number of programming lan ...
for hard realtime embedded programming) * Averest * Blech *
ChucK Chuck is a masculine given name or a nickname for Charles or Charlie. It may refer to: People Arts and entertainment * Chuck Alaimo, American saxophonist, leader of the Chuck Alaimo Quartet * Chuck Barris (1929–2017), American TV producer * C ...
(a synchronous reactive programming language for audio) *
Esterel Esterel is a synchronous programming language for the development of complex reactive systems. The imperative programming style of Esterel allows the simple expression of parallelism and preemption. As a consequence, it is well suited for cont ...
G. Berry and G. Gonthier. The synchronous programming language ESTEREL: Design, semantics, implementation. ''Science of Computer Programming'', 19(2), 1992. *
LabVIEW Laboratory Virtual Instrument Engineering Workbench (LabVIEW) is a system-design platform and development environment for a visual programming language from National Instruments. The graphical language is named "G"; not to be confused with G-c ...
* LEA * Lustre * PLEXIL *
SIGNAL In signal processing, a signal is a function that conveys information about a phenomenon. Any quantity that can vary over space or time can be used as a signal to share messages between observers. The '' IEEE Transactions on Signal Processing' ...
(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 *
Concurrency (computer science) In computer science, concurrency is the ability of different parts or units of a program, algorithm, or problem to be executed out-of-order or in partial order, without affecting the outcome. This allows for parallel execution of the concur ...


References

* Nicolas Halbwachs. "Synchronous programming of reactive systems". Kluwer Academic Publishers, 1993. http://www-verimag.imag.fr/~halbwach/newbook.pdf


External links


The Synchronous group
at Verimag lab.
The SIGNAL programming language


—Proposes parallel languages based on C, lets programmers specify and manage parallelism on a broad range of computer architectures. {{Types of programming languages Programming language classification