Structured Vectors for Efficient Rank-Generic Array Programs.

K. Trojahner, F. Büther


A powerful concept found in array programming languages such as SaC [1, 2] or Qube [3, 4] is rank-generic programming: array operations and entire programs can be specified for arrays that may not only vary in size, but even in the number of array axes. As the number of axes is inherently variable, individual array elements cannot be selected with any given number of indices. Instead, a vector of indices of appropriate length must be used. To illustrate the merits of rank-generic programming, we provide an example in our experimental array programming language Qube, that extends an Mlstyle language with array-specific features and dependent types for light-weight verification. The functions add1 and add2 perform element-wise addition on vectors of length n and matrices of shape m × n, respectively.
Original languageEnglish
Publication statusPublished - 2009


Dive into the research topics of 'Structured Vectors for Efficient Rank-Generic Array Programs.'. Together they form a unique fingerprint.

Cite this