The Computer Science behind ToonTalk
ToonTalk is an interpreter for a concurrent constraint programming language. Concurrent constraint programming is a synthesis of concurrent logic programming and constraint logic programming. (See, for example, Saraswat). The class of languages for which programs are roughly interchangeable with ToonTalk programs include Janus, Flat Guarded Horn Clauses, KL1, Flat Concurrent Prolog, Parlog, and Strand. The syntax of all these languages is textual while ToonTalk has an action-oriented video game animation syntax. The programming environment is completely different as well. In ToonTalk, the process of constructing, testing, and debugging programs closely resembles playing a video game.
Pictorial Janus is a visual version of Janus in which pictures are used for source code and the execution of a program can be seen as an animation. ToonTalk differs from Pictorial Janus (and all visual programming languages) in that the source code is animated and concrete as opposed to the static and abstract syntax of visual programming languages. (See Pictorial Janus ftp site and Paderborn University web page.)
The computational model underlying ToonTalk supports the dynamic creation and termination of asynchronous processes. First-class send and receive capabilities provide a means for these processes to communicate and synchronize. All state is local to processes. There is a close relationship between concurrent object-oriented programming languages (including actor languages) and ToonTalk. (See ToonTalk papers.) Here is an essay about how ToonTalk is concurrent and why it is difficult to extend conventional languages to be concurrent.
One way to understand ToonTalk is that it provides "concretizations" of computional abstractions. For each computational abstraction ToonTalk provides a tangible equivalent analog.
|Computational Abstraction||ToonTalk Concretization|
|actor or process or object||
|method preconditions||contents of thought bubble|
|method actions||actions taught to robot|
|tuples or messages or vectors||boxes|
|actor spawning||loaded trucks|
|constants||numbers, text, and pictures|
|channel transmit capabilities||birds|
|channel receive capabilities||nests|
Another way to understand the computational model of ToonTalk is to consider what you can train robots to do:
· send a message (i.e. tell a constraint)
by giving a box or pad to a bird,
· spawn a new agent
by dropping a box and a team of robots into a truck,
· perform simple primitive operations (e.g. +, -, *)
by dropping a pad on a pad,
· copy an item
by using a magician's wand,
· terminate an agent
by setting off a bomb,
· change the contents of a tuple
by taking out items and placing new ones.
home | search | buy | manual | news | faq | support | press | contact us