Presentation is loading. Please wait.

Presentation is loading. Please wait.

Gary Kumfert with Bill Bosl, Tammy Dahlgren, Tom Epperly, Scott Kohn, & Steve Smith Achieving Language Interoperability with.

Similar presentations


Presentation on theme: "Gary Kumfert with Bill Bosl, Tammy Dahlgren, Tom Epperly, Scott Kohn, & Steve Smith Achieving Language Interoperability with."— Presentation transcript:

1 Gary Kumfert with Bill Bosl, Tammy Dahlgren, Tom Epperly, Scott Kohn, & Steve Smith Achieving Language Interoperability with

2 GKK 2 CASC Babel’s Scope & CCA l Babel provides language interoperability, not components. l We collaborate with CCA to add parallel distributed support l We also provide tools (Quorum & Alexandria) to facilitate component development and deployment Compilers & Linkers Operating System CCA Compliant Frameworks Component Semantics

3 GKK 3 CASC Release Announcement l C, C++, F77, Python(client)

4 GKK 4 CASC babel-0.5.0.tar.gz l Babel code generator u written in Java l Babel runtime library u written in ANSI C l Docs (minimal) u papers, talks, javadoc html u babel101 tutorial

5 GKK 5 CASC Hand Coded Language Interoperability JNI Native SWIG Platform Dependent C C++ f77 f90 Python Java

6 GKK 6 CASC Babel Enabled Language Interoperability l Truly Object Oriented l Reference Counting l Exception Handling l RMI (future) C C++ f77 f90 Python Java

7 GKK 7 CASC What’s In This Release: Babel Enabled Language Interoperability C C++ f77 f90 Python Java

8 GKK 8 CASC Babel Has Two Types of Customers l Have a code l Want to increase their user base l Will learn SIDL l Want Babel general and powerful l Have a problem l Want to solve their problem l May never see SIDL l Want software that’s easy & trustworthy DevelopersUsers

9 GKK 9 CASC Babel’s Design Priorities l Performance l Developer/User dichotomy l What’s natural for each language? u Could expose C array structs in C++ u C++ style would be SIDL::array template <> array : public array_mixin { } template <> array : public array_mixin { }

10 GKK 10 CASC SIDL (Scientific Interface Definition Language) l Builds on Industry IDL technology u CORBA u COM l Designed for Scientific Apps u complex types u dynamic multidimensional arrays version Hello 1.0; package Hello { class World { string getMsg(); }

11 GKK 11 CASC version MySolverLib 0.1.0; import ESI; package MySolverLib { interface MatrixGenerator {... } class OptionDatabase { void getOption( in string name, out string val); } class Vector implements-all ESI.Vector { void setOptions( in OptionDatabase db ); } class Bizarre implements MatrixGenerator {... void setData( in array a ); }

12 GKK 12 CASC Many forms of language interoperable interfaces SIDL Scientific Interface Definition Language IOR Internal Object Representation XML eXtensible Markup Language Human Compatible Web Compatible Compiler Compatible

13 GKK 13 CASC XML enables......automated creation via higher-level tools...Type Descriptions on Shared Repositories...Browsing for Types...automated search & discovery by advanced builders

14 GKK 14 CASC Language Interoperability: How Babel Makes it Work Application Impls l Application: user’s LOP (Language Of Preference) l Implementation: developers LOP (Can be wrappers to legacy code) SIDL If developer used Babel, they also have a SIDL file. Stubs Skels IORs

15 GKK 15 CASC Language Interoperability: How Babel Makes it Work Application Stubs Skels IORs Impls l Application: user’s LOP (Language Of Preference) l Implementation: developers LOP (Can be wrappers to legacy code) l Client Side Stubs: user’s LOP to C l Internal Object Representation (IOR): Always in C l Server Side Skeletons: translates IOR (in C) to developer’s LOP

16 GKK 16 CASC l Basic Types u bool u char u int u long u float u double u fcomplex u dcomplex u string u opaque l Basic Types u bool u char u int u long u float u double u fcomplex u dcomplex u string u opaque l Extended Types u Objects u enumerations u arrays of basic types u arrays of objects u (arrays are multidimensional, no arrays of arrays) l Extended Types u Objects u enumerations u arrays of basic types u arrays of objects u (arrays are multidimensional, no arrays of arrays) l Modes u in u out u inout u return value l Modes u in u out u inout u return value l OO Method Dispatch u regular u final u static u interfaces u classes l OO Method Dispatch u regular u final u static u interfaces u classes l Exception Handling l For All Combinations of Languages u CC u C++C++ u F77F77 u Python l For All Combinations of Languages u CC u C++C++ u F77F77 u Python How Much Language Interoperability Have We Achieved? l 1431 test cases (and counting)

17 GKK 17 CASC Test History sparc-sun-solaris2.7-gcc # Test Cases Date babel 0.5.x babel 0.4.x C++ start Parser start ANSI C start Python start F77 start IOR Rewrite

18 GKK 18 CASC What we foresee, based on experience with our tests... Language Interoperability Developer Concerns: Configuration, Packaging, & Deployment User Concerns: Installation Trust

19 GKK 19 CASC These aren’t new problems... But they are on a larger scale Developer Concerns: Configuration, Packaging, & Deployment User Concerns: Installation Trust

20 GKK 20 CASC For Example... l Consider the following statements... u Java is more portable than C u C is more portable than C++ u C++ is more portable than F77 l “portable” in a different sense u Java doesn’t need to be recompiled (like C) u C is mature, isn’t as hard to parse (as C++) u C++ can bind to C or Java easier than F77 l BUT F77 is also more portable than C because of header/library issues Babel’s regression tests have the worst of all worlds!!!

21 GKK 21 CASC For Example... l To support Python and Java u All libraries must be shared (*.so) not statically linked (*.a) l C++ shared libraries are problematic u Exception support is platform/compiler dependent u Linking issues when interoperating with other languages l Can create valid shared library with uncatchable exceptions

22 GKK 22 CASC Babel’s Configuration/Build l GNU Make l Autoconf configuration l Automake build Makefiles l Libtool shared libraries l CUTE custom testing l python’s own build system l java’s built-in (broken) make l helper scripts l fixes to autoconf, automake & libtool l lots of hacks

23 GKK 23 CASC Test History sparc-sun-solaris2.7-gcc # Test Cases Date babel 0.5.x babel 0.4.x IOR Rewrite Configure/Build/Repository faults, not software failures!!!

24 GKK 24 CASC Problems affect the User too... l How does a user get and install “language interoperable” software? u Binary: if supplied by developer u Source:  Assume “configure; make install”? l How to link into application? u If any C++ code, must use C++ linker u Which C++ to use? C++ has no std binary interface

25 GKK 25 CASC Crux of the problem l We’re building 21st century technology... l... using 30 year old tools. Make Bourne shell Autoconf (M4) Automake (perl) libtool (perl/sh) JavaPythonF77C++ C Autoheader aclocal

26 GKK 26 CASC Solution l Integrated config, build, package, test and management system. u no make inside!  can have action create many files  understands directories u uses real database u program all aspects in one language u MUST BE OPEN SOURCE

27 GKK 27 CASC In the mean time... l Babel works on other platforms, just not automated config/testing u Java code generator (precompiled) u ANSI C runtime library (no problem) l Babel’s tests are (necessarily) pathological worst-case examples l We didn’t create these problems, we just exercise them aggressively

28 GKK 28 CASC Future Babel: Will Provide More Build Help l “babel.make” u currently lists code generated u may add additional flags, macros, etc. l configure u currently used for regression tests u may generate artifacts useful for developers  helper scripts  warnings

29 GKK 29 CASC Internet Farther Future Babel: Will Do Distributed Computing Application Marshaler Line Protocol Unmarshaler Stubs IORs Skels IORs Impls

30 GKK 30 CASC Closing Remarks l Babel Beta 0.5 is released l Babel enables language interoperability u connect C, C++, F77, and Python u provide a uniform object-model, even in non-OO languages. l Deploying & Installing Language Interoperable Code in General u is still very hard u has broken every tool we use

31 GKK 31 CASC The End babel-announce@llnl.gov babel-users@llnl.gov http://www.llnl.gov/CASC/components components@llnl.gov Bill Bosl, Tammy Dahlgren, Tom Epperly, Scott Kohn, Gary Kumfert, & Steve Smith

32 GKK 32 CASC A.3.Can HPC and Component Technology REALISTICALLY be integrated? l Yes. l But HPC Components have huge (and unique) hurdles: u Diverse Architectures u Diverse OS’s u Integration of SPMD and Dist. Comp. u Archaic Pkg/Devel/Config/Build tools u Non-CS trained (or interested) users

33 GKK 33 CASC B.3.Can the HPC community really afford yet another compiler such as Babel? l Is language interoperability important? l How important?

34 GKK 34 CASC B.3.How is the Java subset of C++ inadequate as an HPC IDL? l What is a “Java subset of C++” ? l How does one u use it to bind to other languages? u get a common inheritance model? u get a common exception model?

35 GKK 35 CASC B.5.What is the role of traditional (parallel) tools in component technology? l Hopefully, they’re replaced by modern parallel tools.

36 GKK 36 CASC B.9.What will be the configuration issues for components...to be portable and high-performance? l Lots. l Lack of Configuration, Packaging, & Deployment tools u is the #1 Achilles heel for components u is the #1 day-to-day pain in Babel development u #1 cause for failure in regression tests

37 GKK 37 CASC C.1.Will anyone actually make the effort to componentize their applications software? l Yes. u But it will be messy. l Efforts to Babelize at LLNL: u hypre - want OOP in ANSI C & automatic F77 bindings u ALPS - want scripting interface for laser plasma physics u SAMRAI - framework used in ALPS

38 GKK 38 CASC D.4.Should components be viewed as mostly a library/runtime developer technology? l No. l I used components in this PowerPoint Presentation l Users can use components without knowing they’re using them. u This is harder to achieve in UNIX than other platforms

39 GKK 39 CASC Work performed under the auspices of the U. S. Department of Energy by the University of California, Lawrence Livermore National Laboratory under Contract W-7405-Eng-48 UCRL-PRES-144649 23 Jul 2001


Download ppt "Gary Kumfert with Bill Bosl, Tammy Dahlgren, Tom Epperly, Scott Kohn, & Steve Smith Achieving Language Interoperability with."

Similar presentations


Ads by Google