Urbiscript
urbiscript is a programming language for robotics. It features syntactic support for concurrency and event-based programming. It is a prototype-based object-oriented scripting language. It is dynamic: name resolution is performed during the program execution (late binding); slots (member variables) can be added/removed at runtime, and even prototypes (superclasses) of an object can be changed at runtime. Memory management is performed by reference counting. Tightly bound to the Urbi platform it supports seamless integration of C++/Java components. Syntax and semantics. Inspiration. From the syntactical point of view, urbiscript belongs to the C-family of programming languages . Its prototype-based object-oriented design was influenced by the Self and the Io programming languages. It is designed to program, but also interact with robots; as such, it is influenced by Unix shells and other languages that provide a read-eval-print loop style interactive toplevel. However, contrary to others, there is no prompt for user input but answers from the system are prefixed by a timestamp (in milliseconds) between square brackets: Sequential statements and control flow. urbiscript statements include (among others): Actually, contrary to most C-like languages and despite what the syntax suggests, statements "have a value , and therefore are expressions, provided they are embedded in braces: Concurrent statements and control flow. In urbiscript, some control-flow constructs come in several flavors": two types of sequential composition, and two types of concurrent composition. Under the hood, concurrency is implemented using coroutines. Statement composition. Like in C, the semicolon denotes sequential composition: codice_13 stands for "run statement codice_14 then run statement codice_15. Other tasks may be run between codice_14 and codice_15. Another statement separator, pipe, denotes "tight sequential composition": no other task can be run between codice_14 and codice_15 in codice_20. Similarly urbiscript features two means to compose  statements concurrently. With codice_21, first codice_14 is run, and at some point codice_15 will be --- possibly while codice_14 is still running. This is very similar to the codice_25 operator in Unix shells. Alternatively, with codice_26, both codice_14 and codice_15 are started together; in interactive sessions, this means that codice_14 won't be run until codice_15 is fully entered and properly followed by either a codice_31 or a codice_32. Scopes are boundaries for backgrounded jobs, as demonstrated in the following example: Concurrent flavors of sequential constructs. Most looping constructs in urbiscript come in several "flavors", which are based on the four  statement separators: codice_31, codice_34, codice_32, and codice_25. For instance displays i.e., the loop bodies are not executed sequentially, while the codice_37 keyword runs the loop bodies concurrently: Event-based programming. Aiming at the development of portable robotic applications, urbiscript relies on specific syntactic constructs to specify reactive behaviors such as "go to the charging dock when the battery is low", "play a friendly sound when a known face is recognized", or "stop when an obstacle is detected". Explicit event handling. Event handling goes into three steps. First, define an event Second, specify event handlers Third, "emit" this event Events can  have payloads, and event handlers enjoy pattern matching on the payload: Implicit events. The urbiscript language also allows to monitor expressions: The following example demonstrates the feature: