Source Code for Biology and Medicine | |
Automatic Fortran to C++ conversion with FABLE | |
Paul D Adams1  Nicholas K Sauter3  Thomas C Terwilliger2  Ralf W Grosse-Kunstleve3  | |
[1] Department of Bioengineering, University of California Berkeley, Berkeley, CA 94720, USA;Los Alamos National Laboratory, Los Alamos, NM 87545, USA;Lawrence Berkeley National Laboratory, Cyclotron Road, BLDG, 64R0121, Berkeley, CA 94720-8118, USA | |
关键词: Test-driven development; Python; Source-to-source conversion; C++; Fortran; | |
Others : 806303 DOI : 10.1186/1751-0473-7-5 |
|
received in 2012-04-25, accepted in 2012-05-28, 发布年份 2012 | |
![]() |
【 摘 要 】
Background
In scientific computing, Fortran was the dominant implementation language throughout most of the second part of the 20th century. The many tools accumulated during this time have been difficult to integrate with modern software, which is now dominated by object-oriented languages.
Results
Driven by the requirements of a large-scale scientific software project, we have developed a Fortran to C++ source-to-source conversion tool named FABLE. This enables the continued development of new methods even while switching languages. We report the application of FABLE in three major projects and present detailed comparisons of Fortran and C++ runtime performances.
Conclusions
Our experience suggests that most Fortran 77 codes can be converted with an effort that is minor (measured in days) compared to the original development time (often measured in years). With FABLE it is possible to reuse and evolve legacy work in modern object-oriented environments, in a portable and maintainable way. FABLE is available under a nonrestrictive open source license. In FABLE the analysis of the Fortran sources is separated from the generation of the C++ sources. Therefore parts of FABLE could be reused for other target languages.
【 授权许可】
2012 Grosse-Kunstleve et al; licensee BioMed Central Ltd.
【 预 览 】
Files | Size | Format | View |
---|---|---|---|
20140708092246871.pdf | 827KB | ![]() |
|
Figure 4. | 58KB | Image | ![]() |
Figure 3. | 52KB | Image | ![]() |
Figure 2. | 38KB | Image | ![]() |
Figure 1. | 27KB | Image | ![]() |
【 图 表 】
Figure 1.
Figure 2.
Figure 3.
Figure 4.
【 参考文献 】
- [1]Adams PD, Afonine PV, Bunkoczi G, Chen VB, Davis IW, Echols N, Headd JJ, Hung LW, Kapral GJ, Grosse-Kunstleve RW, et al.: PHENIX: a comprehensive Python-based system for macromolecular structure solution. Acta Crystallogr D 2010, 66:213-221.
- [2]David Sayre awarded the eighth Ewald Prize. [http://www.iucr.org/iucr/ewald08.html/8th- ewald-prize webcite]
- [3]Backus JW, Beeber RJ, Best S, Goldberg R, Haibt LM, Herrick HL, Nelson RA, Sayre D, Sheridan PB, Stern H, et al.: The FORTRAN automatic coding system. In In Proceedings of the Western Joint Computer Conference. Los Angeles, California; 1957:188-198.
- [4]Programming languages—FORTRAN: Book Programming languages—FORTRAN. City: International Organization for Standardization; 1980. vol. ISO 1539:1980
- [5]Wulf W, Shaw M: Global variable considered harmful. SIGPLAN Notices 1973, 8:28-34.
- [6]LAPACK: A Portable Linear Algebra Library for High-Performance Computers. [http://www.netlib.org/lapack/ webcite]
- [7]Programming languages – C++. International Organization for Standardization; 1998. vol. ISO 14882:1998
- [8]Grosse-Kunstleve RW, Sauter NK, Moriarty NW, Adams PD: The Computational Crystallography Toolbox: crystallographic algorithms in a reusable software framework. J Appl Crystallogr 2002, 35:126-136.
- [9]Feldman SI, Gay DM, Maimone MW, Schryer NL: A Fortran to C Converter. AT&T Bell Laboratories technical report 1990.
- [10]F2CPP: a Python script to convert Fortran 77 to C++ code. [http://sourceforge.net/projects/f2cpp/ webcite]
- [11]Grosse-Kunstleve RW, Terwilliger TC, Adams PD: Experience converting a large Fortran-77 program to C++. Newsletter of the IUCr Commission on Crystallographic Computing 2009, 10:75-84.
- [12]Python programming language. [http://python.org/ webcite]
- [13]Boost C++ libraries. [http://boost.org/ webcite]
- [14]Terwilliger TC, Berendzen J: Automated MAD and MIR structure solution. Acta Crystallogr D 1999, 55:849-861.
- [15]Collaborative Computational Project N: Number 4: The CCP4 Suite—Programs for Protein Crystallography. Acta Crystallogr D 1994, 50:760-763.
- [16]Leslie AGW, Brick P, Wonacott A: Recent changes to the MOSFLM package for processing film and image plate data. Daresbury Lab Inf Q Protein Crystallogry 1986, 18:33-39.
- [17]Leslie AGW: The integration of macromolecular diffraction data. Acta Crystallogr D 2006, 62:48-57.
- [18]Powell H: The Rossmann Fourier autoindexing algorithm in MOSFLM. Acta Crystallographica Section D 1999, 55:1690-1695.
- [19]Steller I, Bolotovsky R, Rossmann MG: An algorithm for automatic indexing of oscillation images using Fourier analysis. J Appl Crystallogr 1997, 30:1036-1040.
- [20]Sauter NK, Grosse-Kunstleve RW, Adams PD: Robust indexing for automatic data collection. J Appl Crystallogr 2004, 37:399-409.