Dependently Typed Array Programs Don't Go Wrong. Trojahner, K. and Grelck, C. 78(7):643–664.
Dependently Typed Array Programs Don't Go Wrong [link]Paper  doi  abstract   bibtex   
The array programming paradigm adopts multidimensional arrays as the fundamental data structures of computation. Array operations process entire arrays instead of just single elements. This makes array programs highly expressive and introduces data parallelism in a natural way. Array programming imposes non-trivial structural constraints on ranks, shapes, and element values of arrays. A prominent example where such constraints are violated are out-of-bound array accesses. Usually, such constraints are enforced by means of run time checks. Both the run time overhead inflicted by dynamic constraint checking and the uncertainty of proper program evaluation are undesirable. We propose a novel type system for array programs based on dependent types. Our type system makes dynamic constraint checks obsolete and guarantees orderly evaluation of well-typed programs. We employ integer vectors of statically unknown length to index array types. We also show how constraints on these vectors are resolved using a suitable reduction to integer scalars. Our presentation is based on a functional array calculus that captures the essence of the paradigm without the legacy and obfuscation of a fully-fledged array programming language.
@article{trojahnerDependentlyTypedArray2009,
  title = {Dependently Typed Array Programs Don't Go Wrong},
  author = {Trojahner, Kai and Grelck, Clemens},
  date = {2009-08},
  journaltitle = {The Journal of Logic and Algebraic Programming},
  volume = {78},
  pages = {643--664},
  issn = {1567-8326},
  doi = {10.1016/j.jlap.2009.03.002},
  url = {https://doi.org/10.1016/j.jlap.2009.03.002},
  abstract = {The array programming paradigm adopts multidimensional arrays as the fundamental data structures of computation. Array operations process entire arrays instead of just single elements. This makes array programs highly expressive and introduces data parallelism in a natural way. Array programming imposes non-trivial structural constraints on ranks, shapes, and element values of arrays. A prominent example where such constraints are violated are out-of-bound array accesses. Usually, such constraints are enforced by means of run time checks. Both the run time overhead inflicted by dynamic constraint checking and the uncertainty of proper program evaluation are undesirable. We propose a novel type system for array programs based on dependent types. Our type system makes dynamic constraint checks obsolete and guarantees orderly evaluation of well-typed programs. We employ integer vectors of statically unknown length to index array types. We also show how constraints on these vectors are resolved using a suitable reduction to integer scalars. Our presentation is based on a functional array calculus that captures the essence of the paradigm without the legacy and obfuscation of a fully-fledged array programming language.},
  keywords = {*imported-from-citeulike-INRMM,~INRMM-MiD:c-5204635,array-programming,logics,semantics,software-engineering},
  number = {7}
}
Downloads: 0