90 likes | 237 Views
Tutorial:. Presenter Institution. f77. f77. C. f90. C. f90. C++. Python. Babel. Python. C++. Java. Scientific Language Interoperability. Language-neutral interface descriptions Native basic scientific data types Complex numbers Multi-dimensional, multi-strided arrays
E N D
Tutorial: Presenter Institution
f77 f77 C f90 C f90 C++ Python Babel Python C++ Java Scientific Language Interoperability • Language-neutral interface descriptions • Native basic scientific data types • Complex numbers • Multi-dimensional, multi-strided arrays • Automatic wrapper generation vs. Java
TSTT Implementation (any supported language) Object-Oriented Middleware Implementation Clients C Stubs C++ Stubs F77 Stubs F90 Stubs Java Stubs Python Stubs IORs Skeletons Implementations IOR = Intermediate Object Representation
SIDL Descriptions Wrappers HTML XML Babel Runtime C C++ SIDL interfacedescription Babel Compiler F77 Application F90 Java Python Supported on Linux, AIX, and Solaris 2.7, works on OSX; C (ANSI C), C++ (GCC), F77 (g77, Sun f77), F90 (Intel, Lahey, GNU, Absoft), Java (1.4) SIDL = Scientific Interface Definition Language
Start with SIDL description package SimpleMesh version 1.0 { [Fill in details here] } SimpleMesh.sidl
C++ Stubs IORs libSimpleMesh.so C++Skeletons C++Implementations legacy_code.so • Implementor generates wrappers • Execute `babel --server=C++SimpleMesh.sidl` • Fill in the details to dispatch to the existing mesh library • Compile and link into a library/DLL SimpleMesh.sidl Babel Compiler
Details go within splicer pairs namespace SimpleMesh { class Class_impl { private: // DO-NOT-DELETE splicer.begin(SimpleMesh.Class._impl) /* Fill in dispatch here */ // DO-NOT-DELETE splicer.end(SimpleMesh.Class._impl) type SimpleMesh::Class_impl::method() throw () { // DO-NOT-DELETE splicer.begin(SimpleMesh.Class.method) /* Fill in dispatch here */ // DO-NOT-DELETE splicer.end(SimpleMesh.Class.method) }
F90 Stubs IOR Headers Application invokes stub methods Babel Runtime SimpleMesh.sidl Babel Compiler Application libSimpleMesh.so • Execute `babel --client=F90SimpleMesh.sidl` • Application calls stub versions of the methods • Compile and link with generated code, library, & Runtime
Application … … Stub Stub IOR IOR Skeleton Skeleton Implementation Implementation … … Field Mesh Private Data Resulting application flow