ABSTRACT
The MATLAB programming language is heavily used in many scientific and engineering domains. Part of the appeal of the language is that one can quickly prototype numerical algorithms without requiring any static type declarations. However, this lack of type information is detrimental to both the programmer in terms of software reliability and understanding, and to the compiler in terms of generating efficient code.
This paper introduces the idea of adding typing aspects to MATLAB programs. A typing aspect can be used to: (1) capture the runtime types of variables, and (2) to check runtime types against either a declared type or against a previously captured runtime type. Typing aspects can be can be used: (1) solely as documentation, (2) to log type errors, or (3) to catch type errors at runtime.
- McLab: An Extensible Compiler Framework for MATLAB. Home page http://www.sable.mcgill.ca/mclab/.Google Scholar
- Accelerating MATLAB, 2002. http://www.mathworks.com/company/newsletters/digest/sept02/accel_matlab.pdf.Google Scholar
- G. Almasi and D. A. Padua. MaJIC: A MATLAB Just-In-Time Compiler. In Languages and Compilers for Parallel Computing. Springer Berlin / Heidelberg, 2001. Google ScholarDigital Library
- T. Aslam, J. Doherty, A. Dubrau, and L. Hendren. AspectMatlab: An Aspect-Oriented Scientific Programming Language. In Proceedings of 9th International Conference on Aspect-Oriented Software Development, pages 181--192, March 2010. Google ScholarDigital Library
- M. Chevalier-Boisvert, L. Hendren, and C. Verbrugge. Optimizing MATLAB through Just-In-Time Specialization. In International Conference on Compiler Construction, pages 46--65, March 2010. Google ScholarDigital Library
- M. Denker, S. Ducasse, A. Lienhard, and P. Marschall. Sub-method reflection. Journal of Object Technology, 6(9):275--295, 2007.Google ScholarCross Ref
- R. E. Filman and D. P. Friedman. Aspect-oriented programming is quantification and obliviousness. Technical Report Technical Report 01.12, RICAS, 2001. Presented at the Workshop on Advanced Separation of Concerns, OOPSLA 2000. Google ScholarDigital Library
- M. Furr, J. hoon (David) An, J. S. Foster, and M. Hicks. Static type inference for Ruby. In Proceedings of the 2009 ACM symposium on Applied Computing, SAC '09, pages 1859--1866, New York, NY, USA, 2009. ACM. Google ScholarDigital Library
- M. M. Papi, M. Ali, T. L. Correa Jr., J. H. Perkins, and M. D. Ernst. Practical pluggable types for Java. In ISSTA 2008, Proceedings of the 2008 International Symposium on Software Testing and Analysis, pages 201--212, Seattle, WA, USA, July 22-24, 2008. Google ScholarDigital Library
- L. D. Rose, K. Gallivan, E. Gallopoulos, B. A. Marsolf, and D. A. Padua. FALCON: A MATLAB Interactive Restructuring Compiler. In LCPC '95: Proceedings of the 8th International Workshop on Languages and Compilers for Parallel Computing, pages 269--288, London, UK, 1996. Springer-Verlag. Google ScholarDigital Library
Index Terms
- Typing aspects for MATLAB
Recommendations
Typing dynamic typing
Even when programming in a statically typed language we every now and then encounter statically untypable values; such values result from interpreting values or from communicating with the outside world. To cope with this problem most languages include ...
On polymorphic gradual typing
We study an extension of gradual typing—a method to integrate dynamic typing and static typing smoothly in a single language—to parametric polymorphism and its theoretical properties, including conservativity of typing and semantics over both statically ...
Typing dynamic typing
ICFP '02: Proceedings of the seventh ACM SIGPLAN international conference on Functional programmingEven when programming in a statically typed language we every now and then encounter statically untypable values; such values result from interpreting values or from communicating with the outside world. To cope with this problem most languages include ...
Comments