ACM Home Page
Please provide us with feedback. Feedback
From fast exponentiation to square matrices: an adventure in types
Full text PdfPdf (727 KB)
Source International Conference on Functional Programming archive
Proceedings of the fourth ACM SIGPLAN international conference on Functional programming table of contents
Paris, France
Pages: 28 - 35  
Year of Publication: 1999
ISBN:1-58113-111-9
Also published in ...
Author
Chris Okasaki  Department of Computer Science, Columbia University, New York, NY
Sponsors
INRIA : Institut Natl de Recherche en Info et en Automatique
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 9,   Downloads (12 Months): 34,   Citation Count: 13
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues   peer to peer  

Tools and Actions: Review this Article  
Save this Article to a Binder    Display Formats: BibTex  EndNote ACM Ref   
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/317636.317781
What is a DOI?

ABSTRACT

Square matrices serve as an interesting case study in functional programming. Common representations, such as lists of lists, are both inefficient---at least for access to individual elements---and error-prone, because the compiler cannot enforce "squareness". Switching to a typical balanced-tree representation solves the first problem, but not the second. We develop a representation that solves both problems: it offers logarithmic access to each individual element and it captures the shape invariants in the type, where they can be checked by the compiler. One interesting feature of our solution is that it translates the well-known fast exponentiation algorithm to the level of types. Our implementation also provides a stress test for today's advanced type systems---it uses nested types, polymorphic recursion, higher-order kinds, and rank-2 polymorphism.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
 
2
 
3
 
4
Jeremy D. Frens and David S. Wise. Matrix inversion using quadtrees implemented in gofer. Technical Report 433, Computer Science Department, Indiana University, May 1995.
5
 
6
Ratf Hinze. Polytypic functions over nested datatypes (extended abstract). In Latin-American Conference on Functional Programming, March 1999.
 
7
 
8
 
9
Simon Peyton Jones et al. Haskell 98: A non-strict, purely functional language. http://haskell, org/onlinereport/, February 1999.
10
 
11
David S. Wise. Matrix algorithms using quadtrees. Technical Report 357, Computer Science Department, Indiana University, June 1992.

CITED BY  13
 
 
 
 
 


Peer to Peer - Readers of this Article have also read: