Hostname: page-component-7c8c6479df-ph5wq Total loading time: 0 Render date: 2024-03-18T14:47:37.396Z Has data issue: false hasContentIssue false

Comparing Id and Haskell in a Monte Carlo photon transport code

Published online by Cambridge University Press:  07 November 2008

Jeffrey Hammes
Affiliation:
Colorado State University, CO, USA (e-mail: hammes@cs.colostate.edu, jhammes@lanl.gov)
Olaf Lubeck
Affiliation:
Los Alamos National Laboratory, CA, USA (e-mail:oml@lanl.gov)
Wim Böhm
Affiliation:
Colorado State University, CO, USA (e-mail:bohm@cs.colostate.edu)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

In this paper we present functional Id and Haskell versions of a large Monte Carlo radiation transport code, and compare the two languages with respect to their expressiveness. Monte Carlo transport simulation exercises such abilities as parsing, input/output, recursive data structures and traditional number crunching, which makes it a good test problem for languages and compilers. Using some code examples, we compare the programming styles encouraged by the two languages. In particular, we discuss the effect of laziness on programming style. We point out that resource management problems currently prevent running realistically large problem sizes in the functional versions of the code.

Type
Research Article
Copyright
Copyright © Cambridge University Press 1995

References

Bird, R. and Wadler, P. (1988) Introduction to Functional Programming. Prentice Hall.Google Scholar
Briesmeister, J. F. ed. (1993) MCNP-A General Monte Carlo N-Particle Transport Code, Version 4A. Los Alamos National Laboratory Report LA-12625-M.Google Scholar
Carter, L. L. and Cashwell, E. D. (1975) Particle-Transport Simulation with the Monte Carlo Method. ERDA Critical Review Series, TID-26607.CrossRefGoogle Scholar
Hendricks, J. S. (1991) Effects of Changing the Random Number Stride in Monte Carlo Calculations. Nuclear Science and Eng. 109(1): 8691.CrossRefGoogle Scholar
Hicks, J. (1993) Experiences with Compiler-Directed Storage Reclamation. In: Conference on Functional Programming Languages and Computer Architecture.ACM Press, pp. 95105.CrossRefGoogle Scholar
Hicks, J., Chiou, D., Ang, B. S. and Arvind, . (1993) Performance studies of Id on the Monsoon dataflow system. J. Parallel and Distributed Computing 18: 273300.CrossRefGoogle Scholar
Hudak, P. and Fasel, J. (1992) A gentle Introduction to Haskell. ACM SIGPLAN Notices 27(5).CrossRefGoogle Scholar
Hudak, P., Peyton Jones, S. and Wadler, P. eds. (1992) Report on the Programming Language Haskell, A Non-strict Purely Functional Language (Version 1.2). ACM SIGPLAN Notices 27(5).CrossRefGoogle Scholar
Morais, D. R. (1986) ID WORLD: An Environment for the Development of Dataflow Programs written in Id. MIT/LCS/TR-365.Google Scholar
Nikhil, R. S. (1990) Id Version 90.0 Reference Manual. Computational Structures Group Memo 284–1, Massachusetts Institute of Technology.Google Scholar
Whalen, D. J., Hollowell, D. E. and Hendricks, J. S. (1991) MCNP: Photon Benchmark Problems. Los Alamos National Laboratory Report LA-12196.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.