As a support for my thesis proposals, an extension of
programming language Eiffel - named MP-Eiffel (MultiProcessor-Eiffel) - was
devised and a prototype compiler was developed. This language is
characterized by the following features:
- support for shared object and message passing
inter-process communication paradigms;
- 100% race-condition free (and other safety issues);
- automatic synchronization of shared and remote objects;
- support for the three required aspects of object synchronization:
internal, conditional and external;
- automatic realization of many synchronization schemes:
(exclusion) Monitors, Read-Write Exclusion, Read-Write Concurrent (one
writer limit), Copy-on-Write, Object Transactions, exclusion and
concurrent mixed schemes;
- although currently external synchronization of shared objects is
restricted to exclusion locks (automatic realizations of transactional
schemes will hopefully appear in the future, though probably in the
context of another base language [Java]), such limitation does not
restrict internal synchronization schemes due to one of my PhD proposals
of using a group exclusion scheme to integrate both schemes (both
compatible with automatic support for conditional
synchronization). So it is perfectly possible to have a working
shared object with a transactional internal synchronization, combined
with an external exclusion lock (mutex) scheme (meaning that an unbound
number of processors can concurrently access the shared object, if no
external access is active);
- another of my thesis proposals was the automatic expression of
conditional and external synchronization of shared objects. The
former through the presence of concurrent assertions (though a more
restrict application of this idea can also be traced to the previous
SCOOP proposal of separate preconditions), and the latter through the
meaning of structured code selection mechanisms (conditionals, routines,
...);
- since the synchronization is automatically implemented by the
compiler, a sequential program can be easily converted to a concurrent
one:
The following example sequential code (of several working
processors [threads] that sequentially draw different signals):
Is easily transformed to a concurrent program (in which all
signal drawing takes place concurrently):
Please note that in red are the only
changes the programmer was required to do!
A sequential class (RESULT_DATA
), is immediately reusable as
a shared object (all is required is a proper shared
type annotation).
Thesis
|
Miguel Oliveira e Silva, «Metodologias e
Mecanismos para Linguagens de Programação Concorrente Orientadas
por Objectos» (Methodologies and Mechanisms for Concurrent
Object-Oriented Languages), Ph.D thesis, University of Aveiro,
Portugal, 2007. [PDF]
|
Software
|
MP-Eiffel prototype compiler (version alpha0):
To install is enough (in Linux) to copy to following five files to a
new directory and execute the command install-all.sh
(it is necessary that csh , X11 and Curses
libraries are installed in Linux). Note that this compiler was
made only as a proof of concept for my PhD's proposals, so
it is still in a very preliminary (and crude) state (hence its alpha0
status).
|
|
lockfree-testing.tgz:
This package contains the tests (always in Linux) done towards
automatic realization of lock-free synchronization schemes of shared
objects. |
|
Thread-safe
SmallEiffel |