An Extensible Compiler for Creating Scriptable Scientific Software

  • David M. Beazley
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2330)

Abstract

Scripting languages such as Python and Tcl have become a powerful tool for the construction of flexible scientific software because they provide scientists with an interpreted problem solving environment and they form a modular framework for controlling software components written in C,C++, and Fortran. However, a common problem faced by the developers of a scripted scientific application is that of integrating compiled code with a high-level interpreter. This paper describes SWIG, an extensible compiler that automates the task of integrating compiled code with scripting language interpreters. SWIG requires no modifications to existing code and can create bindings for eight different target languages including Python, Perl, Tcl, Ruby, Guile, and Java. By automating language integration, SWIG enables scientists to use scripting languages at all stages of software development and allows existing software to be more easily integrated into a scripting environment.

Keywords

Target Language Script Language Customization Feature Legacy Software Integrate Data Analysis 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

References

  1. 1.
    Abrahams, D.: The Boost Python Library, http://www.boost.org/libs/python/doc/.
  2. 2.
    Aho, A., Sethi, R., Ullman, J.: Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading, Massachusetts. (1986)Google Scholar
  3. 3.
    Beazley, D.: SWIG: An Easy to Use Tool for Integrating Scripting Languages with and C++. In Proceedings of USENIX 4th Tcl/Tk Workshop. (1996) 129–139Google Scholar
  4. 4.
    Beazley, D., Lomdahl, P.: Message-Passing Multi-Cell Molecular Dynamics on the Connection Machine 5. Parallel Computing. 20 (1994) 173–195.CrossRefGoogle Scholar
  5. 5.
    Beazley, D., Lomdahl, P.: Lightweight Computational Steering of Very Large Scale Molecular Dynamics Simulations. In Proceeding of Supercomputing’96, IEEE Computer Society. (1996).Google Scholar
  6. 6.
    Chiba, S.: A Metaobject Protocol for C++. In Proceedings of the ACM Conference on Object-Oriented Programming Systems, Languages, and Applications (OOP-SLA). (1995) 285–299.Google Scholar
  7. 7.
    Dubois, P., Hinsen, K., Hugunin, J.: Numerical Python. Computers in Physics. 10(3) (1996) 262–267.Google Scholar
  8. 8.
    Dubois, P.: The Future of Scientific Programming. Computers in Physics. 11(2)(1997) 168–173.Google Scholar
  9. 9.
    Dubois, P.: Climate Data Analysis Software. In Proceedings of 8th International Python Conference. (2000).Google Scholar
  10. 10.
    Gathmann, F.: Python as a Discrete Event Simulation Environment. In Proceedings of the 7th International Python Conference. (1998).Google Scholar
  11. 11.
    Hinsen, K.: The Molecular Modeling Toolkit: A Case Study of a Large Scientific Application in Python. In Proceedings of the 6th International Python Conference. (1997) 29–35.Google Scholar
  12. 12.
    Martin, K.: Automated Wrapping of a C++ Class Library into Tcl. In Proceedings of USENIX 4th Tcl/Tk Workshop. (1996) 141–148.Google Scholar
  13. 13.
    Ousterhout, J.: Scripting: Higher-Level Programming for the 21st Century. IEEE Computer. 31(3) (1998) 23–30.Google Scholar
  14. 14.
    Owen, M.: An Open-Source Project for Modeling Hydrodynamics in Astrophysical Systems. IEEE Computing in Science and Engineering. 3(6) (2001) 54–59.Google Scholar
  15. 15.
    Peterson, P., Martins, J., Alonso, J.: Fortran to Python Interface Generator with an application to Aerospace Engineering. In Proceedings of 9th International Python Conference. (2000).Google Scholar
  16. 16.
    Scherer, D., Dubois, P., Sherwood, B VPython: 3D Interactive Scientific Graphics for Students. IEEE Computing in Science and Engineering. 2(5) (2000) 56–62.Google Scholar
  17. 17.
    Stroustrup, B The C++ Programming Language, 3rd Ed. Addison-Wesley, Reading, Massachusetts. (1997).Google Scholar
  18. 18.
    Veldhuizen, T.: Arrays in Blitz++. In Proceedings of the 2nd International Scientific Computing in Object-Oriented Parallel Environments (ISCOPE’98), Springer-Verlag. (1998).Google Scholar
  19. 19.
    White, R., Greenfield, P.: Using Python to Modernize Astronomical Software. In Proceedings of the 8th International Python Conference. (1999).Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2002

Authors and Affiliations

  • David M. Beazley
    • 1
  1. 1.University of ChicagoChicagoUSA

Personalised recommendations