This site contains older material on Eiffel. For the main Eiffel page, see http://www.eiffel.com.
Eiffel Power (TM) from ISE

Cecil: exporting Eiffel mechanisms to the rest of the world

ISE's Cecil (C-Eiffel Call-In Library) is a C library through which programs written in C, C++ and other languages can access all the mechanisms of Eiffel.

Calling Eiffel from anywhere

If you have written and Eiffel system, any outside program can, through Cecil, access all its mechanisms:

    It can create Eiffel objects (instances of the classes of the Eiffel system).

    It can call any feature (Eiffel operation) on any of these objects.

Cecil, then, enables you to do from the outside everything you can do from within Eiffel.

Through Cecil you benefit from all the Eiffel facilities, in particular ISE Eiffel's powerful garbage collection mechanism. Cecil is thread-safe and will enable you to use multithreaded as well as non-multithreaded Eiffel systems.

Applications of Cecil

Eiffel's external mechanism allows Eiffel systems to rely on outside facilities. Cecil provides communication the other way round, reinforcing Eiffel's role as the component combinator: the ideal mechanism for combining reusable components from many different sources.

Cecil is particularly adequate when you want to introduce modern object technology in an environment dominated by existing legacy code in C, C++, Fortran, Java and other such languages. In this situation it is often necessary to have the external language(s) remain "master" of execution and call Eiffel, rather than the other way around. Cecil fills this role.

A Hewlett-Packard printer project took advantage of Cecil to introduce Eiffel into an existing architecture in order to add new, difficult functionalities -- and, among unexpected benefits, found some bugs in the legacy code through Cecil calls to contract-equipped Eiffel routines. You can read more about HP's project experience.

For more information

See the online Cecil documentation.

The description of Cecil is in chapter 24 the reference book on Eiffel: Eiffel: The Language.

Of related interest: the Legacy++ class wrapper for encapsulating C++ classes automatically into Eiffel classes.