DocumentCode :
251832
Title :
Mc2FOR: A tool for automatically translating MATLAB to FORTRAN 95
Author :
Xu Li ; Hendren, Laurie
Author_Institution :
Sch. of Comput. Sci., McGill Univ., Montreal, QC, Canada
fYear :
2014
fDate :
3-6 Feb. 2014
Firstpage :
234
Lastpage :
243
Abstract :
MATLAB is a dynamic numerical scripting language widely used by scientists, engineers and students. While MATLAB´s high-level syntax and dynamic types make it ideal for prototyping, programmers often prefer using high-performance static languages such as FORTRAN for their final distributable code. Rather than rewriting the code by hand, our solution is to provide a tool that automatically translates the original MATLAB program to an equivalent FORTRAN program. There are several important challenges for automatically translating MATLAB to FORTRAN, such as correctly estimating the static type characteristics of all the variables in a MATLAB program, mapping MATLAB built-in functions, and effectively mapping MATLAB constructs to equivalent FORTRAN constructs. In this paper, we introduce Mc2FOR, a tool which automatically translates MATLAB to FORTRAN. This tool consists of two major parts. The first part is an interprocedural analysis component to estimate the static type characteristics, such as the shape of arrays and the range of scalars, which are used to generate variable declarations and to remove unnecessary array bounds checking in the translated FORTRAN program. The second part is an extensible FORTRAN code generation framework automatically transforming MATLAB constructs to FORTRAN. This work has been implemented within the McLab framework, and we demonstrate the performance of the translated FORTRAN code on a collection of MATLAB benchmarks.
Keywords :
FORTRAN; authoring languages; mathematics computing; program compilers; FORTRAN 95; MATLAB; Mc2FOR; McLab framework; dynamic numerical scripting language; high-performance static language; interprocedural analysis component; static type characteristic; Abstracts; Impedance matching; MATLAB; Merging; Pattern matching; Shape; Vectors;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Software Maintenance, Reengineering and Reverse Engineering (CSMR-WCRE), 2014 Software Evolution Week - IEEE Conference on
Conference_Location :
Antwerp
Type :
conf
DOI :
10.1109/CSMR-WCRE.2014.6747175
Filename :
6747175
Link To Document :
بازگشت