Rapide Tutorial: Example Trail
Dining philosophers is a classic concurrent programming problem
where processes compete for resources. The problem is included here
to illustrate how processes can be modeled in Rapide and how their
behavior can be specified by reactive rules.
There are many ways of representing dining philosopers, and several
of them are presented in the Rapide teaching examples repository. All
of the examples share the same architectural style; their archiectures
contain two types of components, philosopher and table interface
The first dining philosophers example's
code was originally written by Claudio
Garcia and has an associated readme file
that explains in detail all the constructs used in the example.
A very common architecture in information processing is that of
clients and servers where the clients issues requests to be performed
by (at least one of) the servers. A step by step procedure to build an
exempliary client/server architecture
is available in the Rapide on-line documentation. This example has
a single client, called the application program, that make requests
of several servers, called resources.
The previous example also includes
instructions on how to refine architectures by adding a
definition to one of the components as a means of providing more
detail in the design.
This example extends the client/server
examples to show how to parametrize an architecture by adding
a variable number of resources that is specified at run-time.
This example shows how to construct a system specification by
expressing constraints that the system implementation's behavior must
follow. The constraints can be interpreted as validation criteria (or
reference architecture) for system implementations; the system
specification can be used to test conformance of an implementation.
The conformance test uses a map to express how events in the
implementation's architecture correspond to events in the reference
is available in the Rapide on-line literature, and the theoretical
background for this work is given in
Executable Formal Models of Distributed Transaction Systems based on
Event Processing, John J. Kenney's Doctoral Dissertation.