Babel is a tool that enables software written in different languages to communicate. It accomplishes this task by using an Interface Definition Language (IDL) similar to COM and CORBA. Babel relies on the Scientific Interface Definition Language (SIDL) that is specifically tuned for scientific applications. By expressing software interfaces, or APIs1, in SIDL the appropriate glue code stubs and skeletons can be generated to facilitate language interoperability. Features unique to SIDL are:
Babel enables true object-oriented techniques even in non object-oriented languages. The object model that SIDL supports is similar to Java and Objective C where a class can extend at most one class, but implement many interfaces. In C++ speak, an interface is simply a class of all pure-virtual methods. Furthermore, if library developers want object-oriented features but are required to be 100% ANSI C compliant, Babel can meet those constraints. Although the Babel code generator is implemented in Java, the runtime libraries and generated files for C bindings are 100% ANSI C compliant.
Babel can be used as the basis for a component framework, but it is not a complete framework by itself. We’ve added a tiny CCA-compliant framework, called Decaf, in our examples/ directory. Decaf demonstrates how Babel can be used to implement a component framework.
SIDL is also a useful communications tool for code development teams since it only expresses the public API. That is, implementation details, which often prove distracting during collaborative design, can be safely avoided by restricting discussions to the interfaces described in SIDL. Furthermore, since SIDL is simple and clean it can be used by Computer Scientists, Math Programmers, and Application Scientists to debate APIs even using only email.
This document is intended as an introduction and tutorial on the use of Babel tools for the generation and use of component software. The Babel tools were designed specifically for scientific applications, therefore most of the examples and exercises here also deal with scientific applications.
This manual assumes the reader is a programmer who is proficient in two or more of the following languages: C, C++, fortran 77, Fortran 90/95, Fortran 2003/2003, Java, or Python. Furthermore, this manual assumes the reader is familiar with the SPMD2 programming model that pervades the scientific computing community. Knowledge of and experience with MPI programming is helpful, but not strictly required.
Babel source is available free of charge on the web. Developed by the Components Project at the Lawrence Livermore National Laboratory Center for Applied Scientific Computing (CASC), it is licensed under the Lesser GNU Public License (LGPL). See the source distribution for details.
The homepage for the Components Project is
The following typographic conventions are used throughout this manual.
|Italic||is used for file and command names. It is also used to highlight comments in examples and to define terms the first time they appear in a document.|
|Constant Width||is used in examples to show the text that is generated, and in regular text to show operators, variables, and the output from commands or programs.|
|Constant Slanted||is used for displaying for SIDL source code. We use a separate font to distinguish SIDL code from generated code.|
|Constant Bold||is used to show user’s modifications to generated code and in examples to show user’s actual input at a terminal.|
|Sans Serif Slanted||is used in examples to show variables for which a context-specific substitution should be made. The variable filename, for example, would be replaced by the actual filename.|
Additionally, we may use specific blocks of text as sidebars to call the readers attention to particular information. Here’s one kind.
Rationale: Often when listing restrictions or requirements, we find it helpful to also explain and document the rationale behind a design decision. In time, the context in which the rationale was based may become irrelevant, making the rationale blocks very useful for understanding when to change a decision.
We have tested and verified the information in this manual. Nonetheless, features may have changed or oversights may exist. Please contact us with any issues, corrections, or suggestions for future versions of this manual through snail mail at:
Center for Applied Scientific Computing
Lawrence Livermore National Laboratory
P. O. Box 808, L–561
Livermore, CA 94551
or through email to:
To find out more about Babel, feel free to subscribe to one or more of the associated distribution lists given below.
To subscribe, simply send email to email@example.com with the appropriate line(s):
subscribe babel-announce [email-address]
subscribe babel-dev [email-address]
subscribe babel-users [email-address]
where you can explicitly state your email address in email-address or, if you leave email-address blank, majordomo will use your email ReplyTo: field.
Tom Epperly (Project Lead), Tamara Dahlgren, and Adrian Prantl.
Bill Bosl, Kevin Durrenberger, Nathan Dykman, Dietmar Ebner, Scott Kohn, Gary Kumfert, James Leek, Steve Smith, and Brent Smolinsky.
Irina Abramova, USC (Summer 2009), Jewel Watts, NCAT (Summer 2009), Monica Porsche, Central State University (Summer 2008), Nija Shi, UC Davis (Summer/Fall 2004), Kirk Kelsey, (Summer 2004), Sarah Knoop, UW Madison (Summer 2003), and Melvina Blackgoat, NAU (Summer 2001).
Andy Cleary, Jeff Painter, and Cal Ribbens
Rob Armstrong, Ben Allan, Wael Elwasif, Matt Knepley, Boyana Norris, Barry Smith, Jody Winston, and many more.
Babel development originally started as a Strategic Initiative (SI) in the LDRD (Lab Directed R&D) portfolio of Lawrence Livermore National Laboratory. Follow-on funding comes through collaborations with the Common Component Architecture (CCA) Forum (http://www.cca-forum.org/wiki). Specifically, the U.S. Department of Energy (http://www.doe.gov/) supports the project through the Office of Science (http://sc.doe.gov/) SciDAC program (http://www.scidac.gov/). Initial follow-on SciDAC funding came as part of the Center for Common Component Technology for Terascale Scientific Simulation (CCTTSS). Current SciDAC II funding is part of the Center for Technology for Advanced Scientific Component Software (TASCS) (http://tascs-scidac.org/).
Babel depends on a great deal of third-party software.
or the author’s websitehttp://www.gnu.org/software/java/packages.html
The following is the copyright notice for gnu.getopt:http://www.urbanophile.com/arenn/hacking/download.html.
The text for the GNU Library GPL is available at http://www.gnu.org/copyleft/library.html./************************************************************************** /* Getopt.java -- Java port of GNU getopt from glibc 2.0.6 /* /* Copyright (c) 1987-1997 Free Software Foundation, Inc. /* Java Port Copyright (c) 1998 by Aaron M. Renn (firstname.lastname@example.org) /* /* This program is free software; you can redistribute it and/or modify /* it under the terms of the GNU Library General Public License as published /* by the Free Software Foundation; either version 2 of the License or /* (at your option) any later version. /* /* This program is distributed in the hope that it will be useful, but /* WITHOUT ANY WARRANTY; without even the implied warranty of /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /* GNU Library General Public License for more details. /* /* You should have received a copy of the GNU Library General Public License /* along with this program; see the file COPYING.LIB. If not, write to /* the Free Software Foundation Inc., 59 Temple Place - Suite 330, /* Boston, MA 02111-1307 USA /**************************************************************************/