ACM Home Page
Please provide us with feedback. Feedback
Digital Library logoTake a look at the new version of this page: [ beta version ]. Tell us what you think.
An algebraic array shape inference system for MATLAB®
Full text PdfPdf (1.03 MB)
Source ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 28 ,  Issue 5  (September 2006) table of contents
Pages: 848 - 907  
Year of Publication: 2006
ISSN:0164-0925
Authors
Pramod G. Joisha  Northwestern University, Redmond, WA
Prithviraj Banerjee  Northwestern University, Chicago, IL
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 12,   Downloads (12 Months): 101,   Citation Count: 2
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1152649.1152651
What is a DOI?

ABSTRACT

The problem of inferring array shapes ahead of time in languages that exhibit both implicit and dynamic typing is a critical one because the ramifications of its solution are the better organization of array storage through compaction and reuse, and the generation of high-performance code through specialization by shape. This article addresses the problem in a prototypical implicitly and dynamically typed array language called MATLAB. The approach involves modeling the language's shape semantics using an algebraic system, and applying term rewriting techniques to evaluate expressions under this algebra. Unlike prior efforts at array shape determination, this enables the deduction of valuable shape information even when array extents are compile-time unknowns. Furthermore, unlike some previous methods, our approach doesn't impose monotonicity requirements on an operator's shape semantics. The work also describes an inference methodology and reports measurements from a type inference engine called MAGICA. In a benchmark suite of 17 programs, the shape inference subsystem in MAGICA detected the equivalence of over 61% of the symbolic shapes in six programs, and over 57% and 37% of the symbolic shapes in two others. In the remaining nine programs, all array shapes were inferred to be compile-time constants.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
Adams, J. C., Brainerd, W. S., Martin, J. T., Smith, B. T., and Wagener, J. L. 1992. FORTRAN 90 Handbook. McGraw-Hill, New York.
 
2
Almási, G. 2001. MaJIC: A MATLAB Just-In-Time Compiler. Ph.D. thesis, University of Illinois at Urbana-Champaign.
3
4
 
5
 
6
 
7
 
8
9
 
10
11
 
12
Dershowitz, N. and Plaisted, D. A. 2001. Rewriting. In Handbook of Automated Reasoning, A. Robinson and A. Voronkov, eds. vol. 1. Elsevier, Amsterdam, The Netherlands.
13
 
14
Hindley, J. R. 1969. The principal type-scheme of an object in combinatory logic. Trans. American Math. Society 146, 29--60.
 
15
 
16
 
17
Joisha, P. G. and Banerjee, P. 2001a. Computing array shapes in MATLAB. In Proceedings of the 14th International Workshop on Languages and Compilers for Parallel Computing. Lecture Notes in Computer Science, vol. 2624. Springer Verlag.
18
 
19
Joisha, P. G. and Banerjee, P. 2002. Implementing an array shape inference system for MATLAB using Mathematica. Tech. Rep. CPDC--TR--2002--10--003, Northwestern University.
20
 
21
Joisha, P. G. and Banerjee, P. 2003b. The MAGICA type inference engine for MATLAB. In Proceedings of the 12th International Conference on Compiler Construction. Lecture Notes in Computer Science, vol. 2622. Springer Verlag, 121--125.
 
22
Joisha, P. G., Shenoy, U. N., and Banerjee, P. 2000. An approach to array shape determination in MATLAB. Tech. Rep. CPDC--TR--2000--10--010, Northwestern University.
23
24
 
25
Malishevsky, A. 1998. Implementing a runtime library for a parallel MATLAB compiler. M.S. thesis, Oregon State University.
 
26
McCosh, C. 2003. Type-Based specialization in a telescoping compiler for MATLAB. Tech. Rep. TR03--412, Rice University.
 
27
Milner, R. 1978. A theory of type polymorphism in programming. J. Comput. Syst. Sci. 17, 3 (Dec.), 348--375.
 
28
 
29
 
30
31
 
32
 
33
The MathWorks, Inc. 1997. MATLAB: The Language of Technical Computing. The MathWorks, Inc. Using MATLAB (Version 5).
 
34
The MathWorks, Inc. 2002a. Accelerating MATLAB: The MATLAB JIT-Accelerator. At http://www.mathworks.com/company/newsletters/digest/sept02/accel_matlab.pdf.
 
35
The MathWorks, Inc. 2002b. The MathWorks announces release 13 with major new versions of MATLAB and Simulink. At http://www.mathworks.com/company/pressroom/index.shtml/article/332.
 
36
37
 
38
Weisstein, E. W. 2005. Hilbert matrix; From MathWorld---A Wolfram web resource. At http://mathworld.wolfram.com/HilbertMatrix.html.
39
 
40
41


Collaborative Colleagues:
Pramod G. Joisha: colleagues
Prithviraj Banerjee: colleagues