Results 1 
2 of
2
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 66 (18 self)
 Add to MetaCart
(Show Context)
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 37 (6 self)
 Add to MetaCart
(Show Context)
. 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...