Typing aspects for MATLAB

  • Authors:
  • Laurie Hendren

  • Affiliations:
  • McGill University

  • Venue:
  • Proceedings of the sixth annual workshop on Domain-specific aspect languages
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

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.