Results 11 - 20
of
50
Context-free languages via coalgebraic trace semantics
- International Conference on Algebra and Coalgebra in Computer Science (CALCO’05), volume 3629 of Lect. Notes Comp. Sci
, 2005
"... Abstract. We show that, for functors with suitable mild restrictions, the initial algebra in the category of sets and functions gives rise to the final coalgebra in the (Kleisli) category of sets and relations. The finality principle thus obtained leads to the finite trace semantics of nondeterminis ..."
Abstract
-
Cited by 11 (8 self)
- Add to MetaCart
Abstract. We show that, for functors with suitable mild restrictions, the initial algebra in the category of sets and functions gives rise to the final coalgebra in the (Kleisli) category of sets and relations. The finality principle thus obtained leads to the finite trace semantics of nondeterministic systems, which extends the trace semantics for coalgebras previously introduced by the second author. We demonstrate the use of our technical result by giving the first coalgebraic account on contextfree grammars, where we obtain generated context-free languages via the finite trace semantics. Additionally, the constructions of both finite and possibly infinite parse trees are shown to be monads. Hence our extension of the application domain of coalgebras identifies several new mathematical constructions and structures. 1
Programming With Types
- CORNELL UNIVERSITY
, 2002
"... Run-time type analysis is an increasingly important linguistic mechanism in modern programming languages. Language runtime systems use it to implement services such as accurate garbage collection, serialization, cloning and structural equality. Component frameworks rely on it to provide reflection m ..."
Abstract
-
Cited by 10 (1 self)
- Add to MetaCart
Run-time type analysis is an increasingly important linguistic mechanism in modern programming languages. Language runtime systems use it to implement services such as accurate garbage collection, serialization, cloning and structural equality. Component frameworks rely on it to provide reflection mechanisms so they may discover and interact with program interfaces dynamically. Run-time type analysis is also crucial for large, distributed systems that must be dynamically extended, because it allows those systems to check program invariants when new code and new forms of data are added. Finally, many generic user-level algorithms for iteration, pattern matching, and unification can be defined through type analysis mechanisms. However, existing frameworks for run-time type analysis were designed for simple type systems. They do not scale well to the sophisticated type systems of modern and next-generation programming languages that include complex constructs such as first-class abstract types, recursive types, objects, and type parameterization. In addition, facilities to support type analysis often require complicated
Container Types Categorically
, 2000
"... A program derivation is said to be polytypic if some of its parameters are data types. Often these data types are container types, whose elements store data. Polytypic program derivations necessitate a general, non-inductive definition of `container (data) type'. Here we propose such a definition: a ..."
Abstract
-
Cited by 9 (0 self)
- Add to MetaCart
A program derivation is said to be polytypic if some of its parameters are data types. Often these data types are container types, whose elements store data. Polytypic program derivations necessitate a general, non-inductive definition of `container (data) type'. Here we propose such a definition: a container type is a relator that has membership. It is shown how this definition implies various other properties that are shared by all container types. In particular, all container types have a unique strength, and all natural transformations between container types are strong. Capsule Review Progress in a scientific dicipline is readily equated with an increase in the volume of knowledge, but the true milestones are formed by the introduction of solid, precise and usable definitions. Here you will find the first generic (`polytypic') definition of the notion of `container type', a definition that is remarkably simple and suitable for formal generic proofs (as is amply illustrated in t...
Distinguishing Data Structures and Functions: the Constructor Calculus and Functorial Types
- Typed Lambda Calculi and Applications: 5th International Conference TLCA 2001
, 2001
"... The expressive power of functional programming can be improved by identifying and exploiting the characteristics that distinguish data types from function types. Data types support generic functions for equality, mapping, folding, etc. that do not apply to functions. Such generic functions requi ..."
Abstract
-
Cited by 8 (1 self)
- Add to MetaCart
The expressive power of functional programming can be improved by identifying and exploiting the characteristics that distinguish data types from function types. Data types support generic functions for equality, mapping, folding, etc. that do not apply to functions. Such generic functions require case analysis, or pattern-matching, where the branches may have incompatible types, e.g. products or sums. This is handled in the constructor calculus where specialisation of program extensions is governed by constructors for data types. Typing of generic functions employs polymorphism over functors in a functorial type system. The expressive power is greatly increased by allowing the functors to be polymorphic in the number of arguments they take, i.e. in their arities. The resulting system can define and type the fundamental examples above. Some basic properties are established, namely subject reduction, the Church-Rosser property, and the existence of a practical type inference algorithm.
Functional In-place Update with Layered Datatype Sharing
"... Hofmann’s LFPL is a functional language with constructs which can be interpreted as referring to heap locations. In this view, the language is suitable for expressing and verifying in-place update algorithms. Correctness of this semantics is achieved by a linear typing. We introduce a non-linear typ ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
Hofmann’s LFPL is a functional language with constructs which can be interpreted as referring to heap locations. In this view, the language is suitable for expressing and verifying in-place update algorithms. Correctness of this semantics is achieved by a linear typing. We introduce a non-linear typing of first-order LFPL programs which is more permissive than the recent effect-based typing of Aspinall and Hofmann. The system efficiently infers separation assertions as well as destruction and re-use effects for individual layers of recursive-type values. Thus it is suitable for in-place update algorithms with complicated data aliasing.
Data Categories
- Computing: The Australasian Theory Symposium Proceedings
, 1996
"... Data categories and functors, and the strong natural transformations between them provide a universe in which to model parametric polymorphism. Data functors are distinguished by being decomposable into shape and data, i.e. they represent types that store data. Every strong transformation between tw ..."
Abstract
-
Cited by 7 (5 self)
- Add to MetaCart
Data categories and functors, and the strong natural transformations between them provide a universe in which to model parametric polymorphism. Data functors are distinguished by being decomposable into shape and data, i.e. they represent types that store data. Every strong transformation between two such is given by a uniform algorithm, and so may represent a polymorphic term. The data functors are closed under composition, finite products and sums, exponentiation by an object, final co-algebras and initial algebras. For any two such, the collection of strong natural transformations between them is representable by an object. The covariant type system supports parametric polymorphism on data types, and can be modelled in a data category. Since the category of sets is a data category, it follows that parametric polymorphism can have a set-theoretic model. Keywords data categories covariance parametric polymorphism. 1 Introduction This paper introduces data functors, the data categor...
Constructing strictly positive families
- In The Australasian Theory Symposium (CATS2007
, 2007
"... We present an inductive definition of a universe containing codes for strictly positive families (SPFs) such as vectors or simply typed lambda terms. This construction extends the usual definition of inductive strictly positive types as given in previous joint work with McBride. We relate this to In ..."
Abstract
-
Cited by 7 (3 self)
- Add to MetaCart
We present an inductive definition of a universe containing codes for strictly positive families (SPFs) such as vectors or simply typed lambda terms. This construction extends the usual definition of inductive strictly positive types as given in previous joint work with McBride. We relate this to Indexed Containers, which were recently proposed in joint work with Ghani, Hancock and McBride. We demonstrate by example how dependent types can be encoded in this universe and give examples for generic programs.
Costing Parallel Programs as a Function of Shapes
- Science of Computer Programming
, 1999
"... Portable, efficient, parallel programming requires cost models to compare different possible implementations. In turn, these require knowledge of the shapes of the data structures being used, as well as knowledge of the hardware parameters. This paper shows how shape analysis techniques developed ..."
Abstract
-
Cited by 6 (1 self)
- Add to MetaCart
Portable, efficient, parallel programming requires cost models to compare different possible implementations. In turn, these require knowledge of the shapes of the data structures being used, as well as knowledge of the hardware parameters. This paper shows how shape analysis techniques developed in the FISh programming language could be exploited to produce a data parallel language with an accurate, portable cost model. 1 Introduction The problem of constructing portable efficient parallel programs is still unsolved. It originates in the observation that an algorithm that executes efficiently in one setting may be extremely inefficient in another. Hence, the challenge is to automatically adapt the algorithm to match the circumstances. To do this during compilation requires a cost model that is able to identify which of two alternative algorithms is faster. To date, most work has focussed on measuring the impact of changes to hardware as observed through a small suite of hardwar...
Shape in Computing
- ACM Computing Surveys
, 1996
"... s is already built [Jay95] using a categorical pullback to capture the decomposition. The mere existence of the decomposition may sometimes be of use. For example, graph types are fundamental, but typically hidden by encodings, e.g. as sparse arrays, when they should be manipulated directly, by both ..."
Abstract
-
Cited by 6 (1 self)
- Add to MetaCart
s is already built [Jay95] using a categorical pullback to capture the decomposition. The mere existence of the decomposition may sometimes be of use. For example, graph types are fundamental, but typically hidden by encodings, e.g. as sparse arrays, when they should be manipulated directly, by both the programmer and the compiler. Another example arises when communicating a value along a channel. By sending the shape first, the receiver can fix the data structure, including pointers, etc., before handling a uniform data stream, free of shape information. Most transmission errors will then appear as a shape-data mismatch. Now let us consider programming with shapes. When interactions between shape and data are rare then the decomposition can lead to significant computational gains. For example, the fundamental operation of mapping a function across all the data in a shape is actually independent of the shape, i.e. is shape School of Computing Sciences, University
A Design for Type-Directed Programming in Java
- In Workshop on Object-Oriented Developments (WOOD
, 2004
"... Type-directed programming is an important and widely used paradigm in the design of software. With this form of programming, a program may analyze type information to determine its behavior. By analyzing the structure of data, many operations, such as serialization, cloning, structural equality, and ..."
Abstract
-
Cited by 6 (0 self)
- Add to MetaCart
Type-directed programming is an important and widely used paradigm in the design of software. With this form of programming, a program may analyze type information to determine its behavior. By analyzing the structure of data, many operations, such as serialization, cloning, structural equality, and iterators, may be defined once, for all types of data. The benefit of type-directed programming is that as software evolves, operations need not be updated---they will automatically adapt to new data forms. Otherwise, each of these operations must be individually redefined for each type of data, forcing programmers to revisit the same program logic many times during a program's lifetime.

