Results 1  10
of
10
A Semantics for Shape
 Science of Computer Programming
, 1995
"... Shapely types separate data, represented by lists, from shape, or structure. This separation supports shape polymorphism, where operations are defined for arbitrary shapes, and shapely operations, for which the shape of the result is determined by that of the input, permitting static shape checking. ..."
Abstract

Cited by 60 (18 self)
 Add to MetaCart
Shapely types separate data, represented by lists, from shape, or structure. This separation supports shape polymorphism, where operations are defined for arbitrary shapes, and shapely operations, for which the shape of the result is determined by that of the input, permitting static shape checking. The shapely types are closed under the formation of fixpoints, and hence include the usual algebraic types of lists, trees, etc. They also include other standard data structures such as arrays, graphs and records. 1 Introduction The values of a shapely type are uniquely determined by their shape and their data. The shape can be thought of as a structure with holes or positions, into which data elements (stored in a list) can be inserted. The use of shape in computing is widespread, but till now it has not, apparently, been the subject of independent study. The body of the paper presents a semantics for shape, based on elementary ideas from category theory. First, let us consider some examp...
Shapely Types and Shape Polymorphism
 Programming Languages and Systems  ESOP '94: 5th European Symposium on Programming
, 1994
"... . Shapely types separate data, represented by lists, from shape, or structure. This separation supports shape polymorphism, where operations are defined for arbitrary shapes, and shapely operations, for which the shape of the result is determined by that of the input, permitting static shape checkin ..."
Abstract

Cited by 34 (6 self)
 Add to MetaCart
. Shapely types separate data, represented by lists, from shape, or structure. This separation supports shape polymorphism, where operations are defined for arbitrary shapes, and shapely operations, for which the shape of the result is determined by that of the input, permitting static shape checking. They include both arrays and the usual algebraic types (of trees, graphs, etc.), and are closed under the formation of initial algebras. 1 Introduction Consider the operation map which applies a function to each element of a list. In existing functional languages, its type is (ff!fi)!ff list!fi list where ff and fi may range over any types. This data polymorphism allows the data (ff and fi) to vary, but uses a fixed shape, list. Shape polymorphism fixes the data, but allows the shape to vary, so that, for types A and B, instances of map include (A!B)!A tree!B tree and (A!B)!A matrix!B matrix In each case map(f) applies f to the data (the leaves or entries), while leaving the shape fi...
Shape Checking of Array Programs
 In Computing: the Australasian Theory Seminar, Proceedings
, 1997
"... Shape theory provides a framework for the study of data types in which shape and data can be manipulated separately. This paper is concerned with shape checking, i.e. the detection of shape errors, such as array bound errors, without handling the data stored within. It can be seen as a form of parti ..."
Abstract

Cited by 20 (5 self)
 Add to MetaCart
Shape theory provides a framework for the study of data types in which shape and data can be manipulated separately. This paper is concerned with shape checking, i.e. the detection of shape errors, such as array bound errors, without handling the data stored within. It can be seen as a form of partial evaluation in which data computations are ignored. We construct a simplytyped lambdacalculus that supports a vector type constructor, whose iteration yields types of arrays. It is expressive enough to construct all of the usual linear algebra operations. All shape errors in a term t can be detected by evaluating its shape #t. Evaluation of #t will terminate if that of t does. Keywords shape analysis, partial evaluation, arrays, higherorder. 1 Introduction Shape theory explores the consequences of manipulating shape and data separately (Jay [14]). Shape refers to the data structure in which the data is stored. For example, the shape of a threedimensional regular array is a tuple of...
Shape Analysis for Parallel Computing
 In Parallel Computing Workshop '95 at Fujitsu Parallel Computing
, 1995
"... Shapes are also known as (data) structures, containers, or indexing systems. They are used extensively in parallel computing to determine communication strategies, loadbalancing, evaluation strategies, etc. Although widely used, most applications of shape are ad hoc, and may occur either during ..."
Abstract

Cited by 6 (2 self)
 Add to MetaCart
Shapes are also known as (data) structures, containers, or indexing systems. They are used extensively in parallel computing to determine communication strategies, loadbalancing, evaluation strategies, etc. Although widely used, most applications of shape are ad hoc, and may occur either during compilation, optimisation or at runtime. A primary goal of shape theory is to organise these techniques under a single umbrella, supported by a simple semantics. This paper focuses on potential applications in parallel computing. Then I will present a schematic view of how we intend to exploit shape in a dataparallel language. 1 Introduction When programming in parallel, it is often useful to compute the shapes, structures, containers, in which the data will be stored and distributed, before acting on the data itself. Shape theory provides formal support for this approach. The theory of shape did not arise in response to the needs of parallel programming, but from a fundamental st...
Exploiting Shape in Parallel Programming
, 1996
"... Shape theory is a new approach to data types and programming based on the separation of a data type into its "shape" and "data" parts. Shape is common in parallel computing. This paper identifies areas where the explicit use of shape reduces the burden of programming a parallel computer, via the ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
Shape theory is a new approach to data types and programming based on the separation of a data type into its "shape" and "data" parts. Shape is common in parallel computing. This paper identifies areas where the explicit use of shape reduces the burden of programming a parallel computer, via the implementation of Cholesky decomposition. keywords: shape, parallel programming, error detection, Cholesky decomposition Abstract Shape theory is a new approach to data types and programming based on the separation of a data type into its "shape" and "data" parts. Shape is common in parallel computing. This paper identifies areas where the explicit use of shape reduces the burden of programming a parallel computer, via the implementation of Cholesky decomposition. 1
What is a Data Type?
, 1996
"... A program derivation is said to be polytypic if some of its parameters are data types. Polytypic program derivations necessitate a general, noninductive definition of `data type'. Here we propose such a definition: a data type is a relator that has membership. It is shown how this definition implie ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
A program derivation is said to be polytypic if some of its parameters are data types. Polytypic program derivations necessitate a general, noninductive definition of `data type'. Here we propose such a definition: a data type is a relator that has membership. It is shown how this definition implies various other properties that are shared by all data types. In particular, all data types have a unique strength, and all natural transformations between data types are strong. 1 Introduction What is a data type? It is easy to list a number of examples: pairs, lists, bags, finite sets, possibly infinite sets, function spaces . . . but such a list of examples hardly makes a definition. The obvious formalisation is a definition that builds up the class of data types inductively; such an inductive definition, however, leads to cumbersome proofs if we want to prove a property of all data types. Here we aim to give a noninductive characterisation, defining a data type as a mathematical object...
Monads, Shapely Functors and Traversals
, 1999
"... This paper demonstrates the potential for combining the polytypic and monadic programming styles, by introducing a new kind of combinator, called a traversal. The natural setting for dening traversals is the class of shapely data types. This result reinforces the view that shapely data types form a ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
This paper demonstrates the potential for combining the polytypic and monadic programming styles, by introducing a new kind of combinator, called a traversal. The natural setting for dening traversals is the class of shapely data types. This result reinforces the view that shapely data types form a natural domain for polytypism: they include most of the data types of interest, while to exceed them would sacrice a very smooth interaction between polytypic and monadic programming. Keywords: functional/monadic/polytypic programming, shape theory. 1 Introduction Monadic programming has proved itself extremely useful as a means of encapsulating state and other computational eects in a functional programming setting (see e.g. [12,14]). Recently, interactions between monads and data structures have been studied as a further way for structuring programs. Initially focusing on lists, the studies have been extended to the class of regular datatypes (see e.g. [4,11,1]), with the aim to embo...
The FISh language definition
, 1998
"... FISh is a arraybased programming language that combines imperative and functional programming styles. It supports a generous class of polymorphic, higherorder, array operations, such as mapping and folding (reduction) of arbitrary array functions, which are implemented using efficient array access ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
FISh is a arraybased programming language that combines imperative and functional programming styles. It supports a generous class of polymorphic, higherorder, array operations, such as mapping and folding (reduction) of arbitrary array functions, which are implemented using efficient array access. This report gives a formal definition of the types, terms and evaluation rules of the language, plus some additional guidance on implementation issues. 1 Introduction This report provides a formal definition of the FISh language; its types, terms and evaluation rules. Although selfcontained, it does not supply motivation or examples, which can be found elsewhere [JS98, Jay98, FISh]. Nor does it address denotational semantics, though the language was motivated by some denotational insights [Jay94, Jay95]. This report is intended for those who are interested in implementation issues, theoretical properties, or simply want to obtain a deeper understanding of the underlying principles of the...
Mapping Adl to the BirdMeertens Formalism
, 1994
"... Bulk data operations such as map and reduce are an elegant medium for expressing repetitive computation over aggregate data structures. They also serve as a tool for abstraction: not all details of the computation, such as the exact ordering of the constituent operations, need to be specified by the ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
Bulk data operations such as map and reduce are an elegant medium for expressing repetitive computation over aggregate data structures. They also serve as a tool for abstraction: not all details of the computation, such as the exact ordering of the constituent operations, need to be specified by the programmer. A precise description of the behaviour of the bulk data operator is the preserve of the language implementor. If the implementation of these operators is parallel then they become a medium for expressing implicit data parallelism. There is a large body of work formally the relating bulk data operators to each other and to their underlying data types. Much of this research stems from Category Theory where a number of general properties of types and operators have been established. One theoretical framework in particular, the BirdMeertens Formalism (BMF), has proved to be extremely useful. The BMF theory of a type provides a set of operators on that type and a set of algebraic id...
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...