Janus (programming language)
Encyclopedia
The name Janus refers to at least two computer programming languages or partial descriptions of possible computer programing languages:

Concurrent Constraint Programming

Janus is a computer programming language partially described by K. Kahn and Vijay A. Saraswat in "Actors as a special case of concurrent constraint (logic) programming", in SIGPLAN Notices, October 1990. Janus is a concurrent constraint language without backtracking.

Janus models concurrency through the use of bag channels. Code that needs to send a message to a process does so by constraining a bag to be the union of another bag and the singleton bag of the message. The other bag is then available to be constrained for sending subsequent messages.

The process receives the message by matching the bag to a pattern that says it is the union of some singleton and some other bag. The logic of the bag channels produces a property shared by the actor model
Actor model
In computer science, the Actor model is a mathematical model of concurrent computation that treats "actors" as the universal primitives of concurrent digital computation: in response to a message that it receives, an actor can make local decisions, create more actors, send more messages, and...

, namely that the order of arrival of the messages is not guaranteed. However, unlike actors in the actor model, processes in Janus can pass around their "mailboxes" so to speak, in the form of
bags, and can hold more than one. This ability to pass mailboxes around and hold more than one is inherited in computer programming language ToonTalk
ToonTalk computer programming language
ToonTalk is a computer programming system intended to be programmed by children. The "Toon" part stands for cartoon. The system's presentation is in the form of animated characters, including robots that can be trained by example....

, which is influenced by Janus.

Janus, the programming language, is named after Janus
Janus (mythology)
In ancient Roman religion and mythology, Janus is the god of beginnings and transitions, thence also of gates, doors, doorways, endings and time. He is usually a two-faced god since he looks to the future and the past...

, the two-faced Roman god, because every logical variable in Janus has as its two "faces", two aspects that can be passed as arguments. These are called the asker and the teller. These represent, respectively, the right to ask the value of the variable (or some characteristic of the value) and the right to tell the value (or to tell some constraint on what the value can be). The asker and teller aspects can be passed around as arguments independently of each other. Neither right implies the other right. The syntax of the language prevents copying a teller or exercising it more than once. Logical contradiction is statically prevented, according to Kahn and Saraswat.

Time-reversible Computing

Janus is also the name of a time-reversible
Reversible computing
Reversible computing is a model of computing where the computational process to some extent is reversible, i.e., time-invertible. A necessary condition for reversibility of a computational model is that the transition function mapping states to their successors at a given later time should be...

 programming language written at Caltech in 1982.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK