For instance, let us say that an application scientist is running a sophisticated C++ code from a Python scripting environment. This can already be easily accomplished with technologies like SWIG. Now let's say that the simulation is showing some erratic behavior and the application scientist wants to extend the ConvergenceCheck class to also report some information to a log file. Let's also assume that this application scientist doesn't want to write a new C++ class much less rewrite the current application. What this individual wants to do is derive and utilize a new class in Python from the C++ ConvergenceCheck class. Thus, the C++ simulation code will now have to invoke a method on a class implemented in Python, which then dispatches back to the C++ base class after doing its additional logging. This is an example of a capability that Babel provides that is outside the scope of SWIG.
Figure 1.1 lists many of the primary languages that are of interest to scientific simulation software developers and users. The good news is that there is a path from each language to every other; meaning that calling from one to another is possible. However, the technologies to get from one language to another vary widely and are fraught with pitfalls.
Babel works by providing the technology to define and support the multi-language interoperation of a common subset of functionality. See Fig. 1.2 to see a graphical representation of the supported languages. It is important to note that this common subset is far from a lowest common denominator solution. In fact, to support this common set Babel actually adds functionality when it is lacking in the host language.
The common subset of functionality is expressed in the Scientific Interface Definition Language (SIDL) (pronounced ``SIGH-dull''). SIDL is similar to COM and CORBA IDLs, but was designed with an emphasis on scientific computing. Specifically, SIDL supports dynamic multi-dimensional arrays, has a built-in complex numbers, and will acquire a set of directives to aid in the description of massively parallel distributed objects.