Results 1  10
of
13
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 169 (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 25 (9 self)
 Add to MetaCart
. 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...
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 20 (7 self)
 Add to MetaCart
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. 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 17 (9 self)
 Add to MetaCart
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
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
"... If functional programs are to be used for highperformance computing, efficient data representations and operations must be provided. Our contribution is a calculus for the analysis of the lengths of (nested) lists and a transformation into a form which is liberated from the chain of consoperations ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
If functional programs are to be used for highperformance computing, efficient data representations and operations must be provided. Our contribution is a calculus for the analysis of the lengths of (nested) lists and a transformation into a form which is liberated from the chain of consoperations and which sometimes permits array implementations even if the length depends on runtime values. A major advantage of functional programs vs. imperative programs is that dependence analysis is much easier, due to the absence of reassignments. One severe disadvantage of functional programs as of yet is that efficient, machineoriented data structures (like the array) absolutely necessary for highperformance computing play a minor role in many language implementations since they do not harmonize with functional evaluation schemata (like graph reduction), which are at a higher level of abstraction. We propose to construct programs by composition of skeletons, i.e., functi...
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.
Polymorphism Over Nested Regular Arrays: Theory and Implementation in
, 1998
"... this paper we introduce a wider range of benchmarks, 4 ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
this paper we introduce a wider range of benchmarks, 4
Polydimensional Array Programming
 Partial Evaluation and Automatic Program Generation. International Series in Computer Science
, 1998
"... . FISh is the first language to support a polydimensional, data polymorphic type constructor for regular arrays. Now a fullytyped program may take a vector, matrix or higherdimensional regular array as argument. Regularity is defined using shape theory, which was also used to guide the language d ..."
Abstract

Cited by 2 (2 self)
 Add to MetaCart
. FISh is the first language to support a polydimensional, data polymorphic type constructor for regular arrays. Now a fullytyped program may take a vector, matrix or higherdimensional regular array as argument. Regularity is defined using shape theory, which was also used to guide the language design, e.g. by justifying the exclusion of arrays of functions. Regularity is enforced by static shape analysis which determines the shape of all arrays during compilation. As well as supporting polydimensional programming, it detects all shape errors, a common source of array bound errors. Further, shape analysis supports an aggressive compilation strategy, that compiles FISh programs into simple, efficient C programs. Thus FISh combines the expressive power of higherorder polymorphic programming with the speed of simple imperative programming. Version 1 is available over the internet. Key words: polydimensional arrays, FISh, shape analysis 1 Introduction FISh is the first language to s...
Typed Intermediate Languages for ShapeAnalysis
 In Typed Lambda Calculi and Applications (TLCA'97), Lecture Notes in Computer Science 1210
, 1997
"... We introduce S2, a typed intermediate language for vectors, based on a 2level typetheory, which distinguishes between compiletime and runtime. The paper shows how S2 can be used to extract useful information from programs written in the Nested Sequence Calculus NSC, an idealized highlevel parall ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
We introduce S2, a typed intermediate language for vectors, based on a 2level typetheory, which distinguishes between compiletime and runtime. The paper shows how S2 can be used to extract useful information from programs written in the Nested Sequence Calculus NSC, an idealized highlevel parallel calculus for nested sequences. We study two translations from NSC to S2. The most interesting shows that shape analysis (in the sense of Jay) can be handled at compiletime. Introduction Good intermediate languages are an important prerequisite for program analysis and optimization, the main purpose of such languages is to make as explicit as possible the information that is only implicit in source programs (see [18]). A common features of such intermediate languages is an aggressive use of types to incorporate additional information, e.g.: binding times (see [18]), boxed/unboxed values (see [20]), effects (see [23]). In particular, among the ML community the use of types in intermediat...