Abstract
We describe the design and implementation of a program generator that can produce extensions of Fortran that are specialized to support the programming of particular applications. Extensions are specified through parameter structures that can be referred to in Fortran programs to specify the dependency of program parts on these parameters. By providing parameter values, a parameterized Fortran program can be translated into a regular Fortran program.
We describe as a real-world application of this program generator the implementation of a generic inverse ocean modeling tool. The program generator is implemented in Haskell and makes use of sophisticated features, such as multi-parameter type classes, existential types, and generic programming extensions and thus represents the application of an advanced applicative language to a real-world problem.
This work was supported by the National Science Foundation under the grant ITR/AP-0121542.
Chapter PDF
References
Bodin, F., Beckman, P., Gannon, D., Gotwals, J., Srinivas, S.: Sage++: A Class Library for Building Fortran 90 and C++ Restructuring Tools. In: Second Object- Oriented Numerics Conference (OON-SKI 1994), pp. 122–138 (1994)
Chapman, S.J.: MATLAB Programming for Engineers. Brooks Cole, Pacific Grove (2001)
Chua, B., Bennett, A.F.: An Inverse Ocean Modeling System. Ocean Modelling 3, 137–165 (2001)
Dickenson, R.E., Zebiak, S.E., Anderson, J.L., Blackmon, M.L., DeLuca, C., Hogan, T.F., Iredell, M., Ji, M., Rood, R., Suarez, M.J., Taylor, K.E.: How Can We Advance Our Weather and Climate Models as a Community? Bulletin of the American Meteorological Society 83(3) (2002)
Dornan, C.: Alex: A Lex for Haskell Programmers (1997), http://haskell.org/libraries/alextar.gz
Ferraro, R., Sato, T., Brasseur, G., DeLuca, C., Guilyardi, E.: Modeling The Earth System. In: Int. Symp. on Geoscience and Remote Sensing (2003)
Fitzpatrick, S., Harmer, T.J., Stewart, A., Clint, M., Boyle, J.M.: The Automated Transformation of Abstract Specifications of Numerical Algorithms into Efficient Array Processor Implementations. Science of Computer Programming 28(1), 1–41 (1997)
Gomez, C., Capolsini, P.: Macroc and Macrofort, C and Fortran Code Generation Within Maple. Maple Technical Newsletter 3(1) (1996)
IOM, http://iom.asu.edu/
Iverson, K.E.: Introduction to APL. APL Press (1984)
Iverson, K.E.: J Introduction and Dictionary. Iverson Software Inc., Toronto, Canada (1995)
Lämmel, R., Peyton Jones, S.: Scrap Your Boilerplate: A Practical Design Pattern for Generic Programming. In: ACM SIGPLAN Workshop on Types in Language Design and Implementation, pp. 26–37 (2003)
Marlow, S., Gill, A.: Happy User Guide (2000), http://www.haskell.org/happy/doc/html/happy.html
Myers, B., Hudson, S., Pausch, R.: Past, Present, and Future of User Interface Software Tools. ACM Transactions on Computer-Human Interaction 7(1), 3–28 (2000)
Peyton Jones, S.L.: Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, Cambridge (2003)
Sheard, T.: Accomplishments and Research Challenges in Meta-Programming. In: Taha, W. (ed.) SAIG 2001. LNCS, vol. 2196, pp. 2–44. Springer, Heidelberg (2001)
Sheard, T., Peyton Jones, S.L.: Template Metaprogramming for Haskell. In: Haskell Workshop (2002)
Simulog, S.A.: Guyancourt, France. FORESYS, FORtran Engineering SYStem, Reference Manual v1.5 (1996)
Taha, W., Sheard, T.: MetaML and Multi-Stage Programming with Explicit Annotations. Theoretical Computer Science 248(1-2), 211–242 (2000)
van Engelen, R., Wolters, L., Cats, G.: The CTADEL Application Driver for Numerical Weather Forecast Systems. In: 15th IMACS World Congress, vol. 4, pp. 571–576 (1997)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Erwig, M., Fu, Z. (2004). Parametric Fortran – A Program Generator for Customized Generic Fortran Extensions. In: Jayaraman, B. (eds) Practical Aspects of Declarative Languages. PADL 2004. Lecture Notes in Computer Science, vol 3057. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24836-1_15
Download citation
DOI: https://doi.org/10.1007/978-3-540-24836-1_15
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-22253-8
Online ISBN: 978-3-540-24836-1
eBook Packages: Springer Book Archive