Examples are available in the source distribution.

Breadth First Traversal of a Tree

Breadth first traveral of a binary tree using parallel composition (||) and synchronization of logical time (pause). A level of the tree is traversed at each logical instant.

  (* Definition of binary trees. *)
  type 'a tree =
    | Empty
    | Node of 'a * 'a tree * 'a tree

  (* Breadth first traveral. *)
  let rec process iter_breadth f t =
    match t with
    | Empty -> ()
    | Node (x, l, r) ->
        f x;
        run (iter_breadth f l) || run (iter_breadth f r)

Frère Jacques


Here, we present a musical library written in ReactiveML through a simple example: the classic French musical round "Frère Jacques".

View Details »

Dynamic Planets


In the ReactiveML distribution, you can find the classical N-body problem where the number of objects can change during the execution.
A new planet is created when the mouse button is pressed. The key 'k' removes the planets in the order of creation and 's' removes the sun. The execution can be suspended and resumed with the key 'p'.
This example has also been used in a tutorial for the ReactiveML toplevel.

View Details »

Cellular Automata

In the ReactiveML distribution, you can also find an implementation of cellular automata that has been made from the one of Frédéric Boussinot in Loft that can be found here. It takes advantage of the ReactiveML runtime to avoid useless computations. Moreover, the implementation uses higher order processes to parameterize the cells by their behavior.

game of life
John Conway's Game of Life
Fredkin's automaton
"Forest fire" automaton


Network simulator

Simulation of a complex network routing protocol for mobile ad hoc networks.


Glonemo (for Global network model) is a simulation tool for sensor networks.

Reactive Asco

An embedding of Antescofo, a domain-specific language for interactive mixed music.