Results 1  10
of
23
Eliminating Array Bound Checking Through Dependent Types
 In Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation
, 1998
"... We present a typebased approach to eliminating array bound checking and list tag checking by conservatively extending Standard ML with a restricted form of dependent types. This enables the programmer to capture more invariants through types while typechecking remains decidable in theory and can s ..."
Abstract

Cited by 189 (24 self)
 Add to MetaCart
We present a typebased approach to eliminating array bound checking and list tag checking by conservatively extending Standard ML with a restricted form of dependent types. This enables the programmer to capture more invariants through types while typechecking remains decidable in theory and can still be performed efficiently in practice. We illustrate our approach through concrete examples and present the result of our preliminary experiments which support support the feasibility and effectiveness of our approach. 1 Introduction The absence of runtime array bound checks is an infamous source of fatal errors for programs in languages such as C. Nonetheless, compilers offer the option to omit array bound checks, since they can turn out to be expensive in practice (Chow 1983; Gupta 1994). In statically typed languages such as ML, one would like to provide strong guarantees about the safety of all operations, so array bound checks cannot be omitted in general. The same is true for Ja...
A Monadic Calculus for Parallel Costing of a Functional Language of Arrays
 EuroPar'97 Parallel Processing, volume 1300 of Lecture Notes in Computer Science
, 1997
"... . Vec is a higherorder functional language of nested arrays, which includes a general folding operation. Static computation of the shape of its programs is used to support a compositional cost calculus based on a cost monad. This, in turn, is based on a cost algebra, whose operations may be customi ..."
Abstract

Cited by 27 (9 self)
 Add to MetaCart
(Show Context)
. Vec is a higherorder functional language of nested arrays, which includes a general folding operation. Static computation of the shape of its programs is used to support a compositional cost calculus based on a cost monad. This, in turn, is based on a cost algebra, whose operations may be customized to handle different cost regimes, especially for parallel programming. We present examples based on sequential costing and on the PRAM model of parallel computation. The latter has been implemented in Haskell, and applied to some linear algebra examples. 1 Introduction Secondorder combinators such as map, fold and zip provide programmers with a concise, abstract language for writing skeletons for implicitly parallel programs, as in [Ski94], but there is a hitch. These combinators are defined for list programs (see [BW88]), but efficient implementations (which is the point of parallelism, after all) are based on arrays. This disparity becomes acute when working with nested arrays, which...
Eekelen. Polynomial size analysis of firstorder functions
, 2007
"... Abstract. We present a sizeaware type system for firstorder shapely function definitions. Here, a function definition is called shapely when the size of the result is determined exactly by a polynomial in the sizes of the arguments. Examples of shapely function definitions may be matrix multiplica ..."
Abstract

Cited by 26 (13 self)
 Add to MetaCart
(Show Context)
Abstract. We present a sizeaware type system for firstorder shapely function definitions. Here, a function definition is called shapely when the size of the result is determined exactly by a polynomial in the sizes of the arguments. Examples of shapely function definitions may be matrix multiplication and the Cartesian product of two lists. The type checking problem for the type system is shown to be undecidable in general. We define a natural syntactic restriction such that the type checking becomes decidable, even though size polynomials are not necessarily linear or monotonic. Furthermore, a method that infers polynomial size dependencies for a nontrivial class of function definitions is suggested. 1
The Functional Imperative: Shape!
 7th European Symposium on Programming, ESOP'98 Held as part of the joint european conferences on theory and practice of software, ETAPS'98
, 1997
"... Introduction FiSh is a new programming language for array computation that compiles higherorder polymorphic programs into simple imperative programs expressed in a sublanguage Turbot, which can then be translated into, say, C. Initial tests show that the resulting code is extremely fast: two orde ..."
Abstract

Cited by 23 (7 self)
 Add to MetaCart
(Show Context)
Introduction FiSh is a new programming language for array computation that compiles higherorder polymorphic programs into simple imperative programs expressed in a sublanguage Turbot, which can then be translated into, say, C. Initial tests show that the resulting code is extremely fast: two orders of magnitude faster than Haskell, and two to four times faster than Objective Caml, one of the fastest ML variants for array programming. Every functional program must ultimately be converted into imperative code, but the mechanism for this is often hidden. FiSh achieves this transparently, using the "equation" from which it is named: Functional = Imperative + Shape Shape here refers to the structure of data, e.g. the length of a vector, or the number of rows and columns of a matrix. The FiSh compiler reads the equation from left to right: it converts functions into procedures by using
Eekelen, M.: Size analysis of algebraic data types
 Selected revised papers of the 9th international symposium on Trends in Functional Programming (TFP’08
, 2009
"... The following full text is a preprint version which may differ from the publisher's version. ..."
Abstract

Cited by 11 (5 self)
 Add to MetaCart
(Show Context)
The following full text is a preprint version which may differ from the publisher's version.
A Transformational Approach which Combines Size Inference and Program Optimization
 SEMANTICS, APPLICATIONS, AND IMPLEMENTATION OF PROGRAM GENERATION (SAIG’01), LECTURE NOTES IN COMPUTER SCIENCE 2196
, 2001
"... ..."
(Show Context)
Bounds Checking: An Instance of Hybrid Analysis
 In Procs. Int. Workshop on Lib. Lang. and Compilers for Array Prog. (ARRAY). ACM
, 2014
"... This paper presents an analysis for bounds checking of array subscripts that lifts checking assertions to program level under the form of an arbitrarilycomplex predicate (inspector), whose runtime evaluation guards the execution of the code of interest. Separating the predicate from the computat ..."
Abstract

Cited by 3 (2 self)
 Add to MetaCart
(Show Context)
This paper presents an analysis for bounds checking of array subscripts that lifts checking assertions to program level under the form of an arbitrarilycomplex predicate (inspector), whose runtime evaluation guards the execution of the code of interest. Separating the predicate from the computation makes it more amenable to optimization, and allows it to be split into a cascade of sufficient conditions of increasing complexity that optimizes the commoninspection path. While synthesizing the bounds checking invariant resembles type checking techniques, we rely on compiler simplification and runtime evaluation rather than employing complex inference and annotation systems that might discourage the nonspecialist user. We integrate the analysis in the compiler’s repertoire of Futhark: a purelyfunctional core language supporting mapreduce nested parallelism on regular arrays, and show how the highlevel language invariants enable a relatively straightforward analysis. Finally, we report a qualitative evaluation of our technique on three realworld applications from the financial domain that indicates that the runtime overhead of predicates is negligible.
Compilation of a Specialized Functional Language for Massively Parallel Computers
 Journal of Functional Programming
, 2000
"... We propose a parallel specialized language that ensures portable and costpredictable implementations on parallel computers. The language is basically a firstorder, recursionless, strict functional language equipped with a collection of higherorder functions or skeletons. These skeletons apply on ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
We propose a parallel specialized language that ensures portable and costpredictable implementations on parallel computers. The language is basically a firstorder, recursionless, strict functional language equipped with a collection of higherorder functions or skeletons. These skeletons apply on (nested) vectors and can be grouped in four classes: computation, reorganization, communication, and mask skeletons. The compilation process is described as a series of transformations and analyses leading to spmdlike functional programs which can be directly translated into real parallel code. The language restrictions enforce a programming discipline whose benefit is to allow a static, symbolic, and accurate cost analysis. The parallel cost takes into account both load balancing and communications, and can be statically evaluated even when the actual size of vectors or the number of processors are unknown. It is used to automatically select the best data distribution among a set of standard distributions. Interestingly, this work can be seen as a cross fertilization between techniques developed within the Fortran parallelization, skeleton, and functional programming communities.
A SizeAware Type System with Algebraic Data Types  With proofs of soundness and decidability
, 2008
"... We present a sizeaware type system for a firstorder functional language with algebraic data types, where types are annotated with polynomials over size variables. We define how to generate typing rules for each data type, provided its user defined size function meets certain requirements. As an e ..."
Abstract

Cited by 3 (3 self)
 Add to MetaCart
(Show Context)
We present a sizeaware type system for a firstorder functional language with algebraic data types, where types are annotated with polynomials over size variables. We define how to generate typing rules for each data type, provided its user defined size function meets certain requirements. As an example, a program for balancing binary trees is type checked. The type system is shown to be sound with respect to the operational semantics in the class of shapely functions. Type checking is shown to be undecidable, however, decidability for a large subset of programs is guaranteed.