HOME

TheInfoList



OR:

Janus 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 ...
partially described by K. Kahn and Vijay A. Saraswat in the paper "Actors as a special case of concurrent constraint (logic) programming" in 1990. It 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 The actor model in computer science is a mathematical model of concurrent computation that treats ''actor'' as the universal primitive of concurrent computation. In response to a message it receives, an actor can: make local decisions, create mor ...
, 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 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. It is one of ...
, which is influenced by Janus. Janus, the programming language, is named after
Janus In ancient Roman religion and myth, Janus ( ; la, Ianvs ) is the god of beginnings, gates, transitions, time, duality, doorways, passages, frames, and endings. He is usually depicted as having two faces. The month of January is named for Jan ...
, 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.


References

{{Reflist * VA Saraswat, KM Kahn, J Levy (1990). "Janus: A step towards distributed constraint programming." NACLP. * VA Saraswat, M Rinard, P Panangaden (1991). "The semantic foundations of concurrent constraint programming." POPL. * David Gudeman, Koenraad De Bosschere, Saumya K. Debray (1992). "jc: An Efficient and Portable Sequential Implementation of Janus". Proc. Joint International Conference and Symposium on Logic Programming. Concurrent programming languages Logic programming languages Constraint programming languages