1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2002-2-1 (1.70)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Babel Facilitates Language Interoperability</TITLE>
<META NAME="description" CONTENT="Babel Facilitates Language Interoperability">
<META NAME="keywords" CONTENT="users_guide">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="users_guide.css">
<LINK REL="next" HREF="node17.html">
<LINK REL="previous" HREF="node15.html">
<LINK REL="up" HREF="node15.html">
<LINK REL="next" HREF="node17.html">
</HEAD>
<BODY >
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html728"
HREF="node17.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html722"
HREF="node15.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html716"
HREF="node15.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<A NAME="tex2html724"
HREF="node14.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
<A NAME="tex2html726"
HREF="node317.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html729"
HREF="node17.html">Scientific Interface Definition Language</A>
<B> Up:</B> <A NAME="tex2html723"
HREF="node15.html">Introduction</A>
<B> Previous:</B> <A NAME="tex2html717"
HREF="node15.html">Introduction</A>
<B> <A NAME="tex2html725"
HREF="node14.html">Contents</A></B>
<B> <A NAME="tex2html727"
HREF="node317.html">Index</A></B>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION01110000000000000000">
Babel Facilitates Language Interoperability</A>
</H1>
Babel was conceived, designed, and built to solve a problem; namely,
to make scientific software libraries equally
accessible from all of the standard languages. Hence, its goal is language
interoperability. The vision goes far beyond
calling BLAS<A NAME="tex2html6"
HREF="footnode.html#foot535"><SUP><SPAN CLASS="arabic">2</SPAN>.<SPAN CLASS="arabic">1</SPAN></SUP></A>implemented in FORTRAN 77 from a C program. At its heart, Babel
lets programmers use their tool of choice in developing
complete applications using components implemented in one or more
distinct programming languages.
<P>
For instance<A NAME="536"></A>, 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<A NAME="537"></A>. Now let's say that the simulation
is showing some erratic behavior and the application scientist
wants to extend the <TT>ConvergenceCheck</TT> 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++
<TT>ConvergenceCheck</TT> 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
cannot be done in SWIG because SWIG does not support calls from C++ to
Python, only from Python to C++.
This is an example of a capability that Babel provides that is
outside the scope of SWIG.
<P>
<DIV ALIGN="CENTER"><A NAME="fig:intro:currentlanginterop"></A><A NAME="545"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1.1:</STRONG>
Language Interoperability Using Current Technology.</CAPTION>
<TR><TD><A NAME="541"></A>
<DIV ALIGN="CENTER">
<IMG
WIDTH="452" HEIGHT="296" ALIGN="BOTTOM" BORDER="0"
SRC="img4.png"
ALT="\includegraphics[width=4in]{common/figs/CurrentLangInterop}">
</DIV></TD></TR>
</TABLE>
</DIV>
<P>
Figure <A HREF="#fig:intro:currentlanginterop">1.1</A> 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, are fraught with pitfalls, and may require
calling through a completely different language.
<P>
Babel works by providing the technology to define and support the
multi-language interoperation of a common subset of functionality
through programming language-neutral interface specifications.
See Fig. <A HREF="#fig:intro:babellanginterop">1.2</A>
to see a graphical representation of the supported languages.
It is important to note that this common functionality subset
is <SPAN CLASS="textit">far</SPAN> from a lowest common denominator solution in that
Babel actually adds functionality when it is lacking in the host language.
<P>
<DIV ALIGN="CENTER"><A NAME="fig:intro:babellanginterop"></A><A NAME="555"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1.2:</STRONG>
Language Interoperability Using Babel.</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER">
<IMG
WIDTH="440" HEIGHT="288" ALIGN="BOTTOM" BORDER="0"
SRC="img5.png"
ALT="\includegraphics[width=4in]{common/figs/BabelLangInterop}">
</DIV></TD></TR>
</TABLE>
</DIV>
<P>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html728"
HREF="node17.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html722"
HREF="node15.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html716"
HREF="node15.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<A NAME="tex2html724"
HREF="node14.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
<A NAME="tex2html726"
HREF="node317.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html729"
HREF="node17.html">Scientific Interface Definition Language</A>
<B> Up:</B> <A NAME="tex2html723"
HREF="node15.html">Introduction</A>
<B> Previous:</B> <A NAME="tex2html717"
HREF="node15.html">Introduction</A>
<B> <A NAME="tex2html725"
HREF="node14.html">Contents</A></B>
<B> <A NAME="tex2html727"
HREF="node317.html">Index</A></B> </DIV>
<!--End of Navigation Panel-->
<ADDRESS>
<br><br>babel-0.10.2<br>users_guide Last Modified 2005-03-23<br><br><a href="http://www.llnl.gov/CASC/components">http://www.llnl.gov/CASC/components</a><br><a href="mailto:components@llnl.gov">components@llnl.gov</a>
</ADDRESS>
</BODY>
</HTML>
|