Introduction to algorithms
Functional programming with bananas, lenses, envelopes and barbed wire
Proceedings of the 5th ACM conference on Functional programming languages and computer architecture
Algebra of programming
Theoretical Computer Science - Special volume on computer algebra
Purely functional data structures
Purely functional data structures
From fast exponentiation to square matrices: an adventure in types
Proceedings of the fourth ACM SIGPLAN international conference on Functional programming
A new approach to generic functional programming
Proceedings of the 27th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
POPL '83 Proceedings of the 10th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
Data Structures and Algorithms
Data Structures and Algorithms
Polymorphic Type Schemes and Recursive Definitions
Proceedings of the 6th Colloquium on International Symposium on Programming
Functional Programming with Overloading and Higher-Order Polymorphism
Advanced Functional Programming, First International Spring School on Advanced Functional Programming Techniques-Tutorial Text
A Simple, Efficient, and Flexible Implementation of Flexible Arrays
MPC '95 Mathematics of Program Construction
MPC '98 Proceedings of the Mathematics of Program Construction
Journal of Functional Programming
Perfect trees and bit-reversal permutations
Journal of Functional Programming
Three algorithms on Braun trees
Journal of Functional Programming
Bootstrapping one-sided flexible arrays
Proceedings of the seventh ACM SIGPLAN international conference on Functional programming
ACM SIGPLAN Notices
Meta-programming through typeful code representation
Journal of Functional Programming
Practical type inference for arbitrary-rank types
Journal of Functional Programming
Iteration and coiteration schemes for higher-order and nested datatypes
Theoretical Computer Science - Foundations of software science and computation structures
Dependent ML An approach to practical programming with dependent types
Journal of Functional Programming
A history of Haskell: being lazy with class
Proceedings of the third ACM SIGPLAN conference on History of programming languages
A principled approach to programming with nested types in Haskell
Higher-Order and Symbolic Computation
Generalized iteration and coiteration for higher-order nested datatypes
FOSSACS'03/ETAPS'03 Proceedings of the 6th International conference on Foundations of Software Science and Computation Structures and joint European conference on Theory and practice of software
Initial algebra semantics is enough!
TLCA'07 Proceedings of the 8th international conference on Typed lambda calculi and applications
Verification of the redecoration algorithm for triangular matrices
TYPES'07 Proceedings of the 2007 international conference on Types for proofs and programs
Towards generic programming with sized types
MPC'06 Proceedings of the 8th international conference on Mathematics of Program Construction
Hi-index | 0.00 |
This article describes a general framework for designing purely functional datatypes that automatically satisfy given size or structural constraints. Using the framework we develop implementations of different matrix types (for example, square matrices) and implementations of several tree types (for example, Braun trees and 2-3 trees). Consider representing square n×n matrices. The usual representation using lists of lists fails to meet the structural constraints: there is no way to ensure that the outer list and the inner lists have the same length. The main idea of our approach is to solve in a first step a related, but simpler problem, namely to generate the multiset of all square numbers. To describe this multiset we employ recursion equations involving finite multisets, multiset union, addition and multiplication lifted to multisets. In a second step we mechanically derive from these recursion equations datatype definitions that enforce the ‘squareness’ constraint. The transformation makes essential use of parameterized types.