Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.

[Caml-list] [ANN] Opis, reliable distributed systems in OCaml

Skip to first unread message

Pierre-Evariste Dagand

Aug 18, 2008, 6:59:35 PM8/18/08
Hi list,

After having delayed this announce for months, I think that Opis is
now mature enough to be publicly released. The literate code and a
technical report are available here:

What Opis is about ?

Opis is a toolkit for large-scale distributed system programming. It
aims at easing the development of complex and reliable distributed
systems by:
- embedding a domain-specific language (EDSL) in OCaml: hence
offering a reactive, dataflow-oriented programming style while not
reinventing the wheel (type-checker, efficient code generation, ...))
- assisting the developer with powerful, integrated tools: network
simulator, debugger, model-checker and performance profiler
- working with purely-functional constructs: therefore lowering the
barrier to certify critical parts of the distributed system in a
theorem prover

Technical details:

The EDSL is based on the Arrow abstraction
[]. First, the developer defines some
pure functions, then abstracts them in the Arrow world and finally
wires them together using the Arrow combinators. The resulting
function is termed an "event function": it receives input events from
the network, the timer or the user interfaces and reacts with output

Then, these output events are interpreted by the "launcher" subsystem.
For instance, the event function might ask to "Send( ip_x , TCP , data
)". Thus, the Network Launcher opens a TCP connection to "ip_x",
marshals "data" to a string and finally sends it.

Internally, the Arrow combinators build a Mealy automaton out of the
user-defined pure functions. Interestingly, Mealy automata has been
introduced and used by Lamport for decades to describe distributed
systems [].

Hence, there already exists some encouraging, successful formalization
of Mealy-based systems [].
We are currently experimenting with Coq to completely develop the
event functions in Coq (and to prove non trivial properties about the
behavior of the resulting distributed system).

Beyond an EDSL, Opis also provides some useful tools to speed-up the
development and deployment of event functions. Hence, given an event
function and without any modification, we can:

- deploy it on a real network
- simulate a network executing the event function, to test the
behavior of the system "in the large"
- debug a network of nodes running the event function, to inspect
the system "in the small", with forward and backward execution steps,
state inspection, ...
- model-check the distributed system against safety properties,
featuring a dynamic partial-order reduction mode that avoids the usual
combinatorial explosion in most systems
- performance-debug the pure functions, by measuring their
processing time and inferring their (algorithmic) complexity

Finally, by using OCaml and staying in the purely-functional world, we
benefit from:

- OCaml excellent performances (both on the computational side and
on the networking side) as well as its thoroughly tested type-checker
- the "code export" capability of theorem provers (Isabelle, Coq,
..): we have been able to certify critical code in Isabelle, export
the corresponding code and integrates it smoothly in an existing
- the usual benefit of functional programming: easier (informal)
reasoning and testing


I would like to thanks Zheng Li, Oleg Kiselyov and Jacques Garrigue
for their help on this list to design an efficient Arrow instance.

At this point of this long mail, I think I must also thank the reader
that have bravely read up to here ;-)


Pierre-Evariste DAGAND

Caml-list mailing list. Subscription management:
Beginner's list:
Bug reports:

Feb 12, 2020, 3:51:52 AM2/12/20
Interested in this project,
The source code had previously been available on your site, could it still available in the year 2020?
0 new messages