|
ABSTRACT
We introduce a notion of guarded recursive (g.r.) datatype constructors, generalizing the notion of recursive datatypes in functional programming languages such as ML and Haskell. We address both theoretical and practical issues resulted from this generalization. On one hand, we design a type system to formalize the notion of g.r. datatype constructors and then prove the soundness of the type system. On the other hand, we present some significant applications (e.g., implementing objects, implementing staged computation, etc.) of g.r. datatype constructors, arguing that g.r. datatype constructors can have far-reaching consequences in programming. The main contribution of the paper lies in the recognition and then the formalization of a programming notion that is of both theoretical interest and practical use.
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
|
C. Chen and H. Xi. Implementing typed meta-programming. Available at http://www.cs.bu.edu/char126hwxi/academic/papers/TMP.ps, November 2002.
|
| |
4
|
A. Church. A formulation of the simple type theory of types. Journal of Symbolic Logic, 5:56--68, 1940.
|
 |
5
|
|
 |
6
|
Karl Crary , Stephanie Weirich , Greg Morrisett, Intensional polymorphism in type-erasure semantics, Proceedings of the third ACM SIGPLAN international conference on Functional programming, p.301-312, September 26-29, 1998, Baltimore, Maryland, United States
|
 |
7
|
|
 |
8
|
Catherine Dubois , François Rouaix , Pierre Weis, Extensional polymorphism, Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.118-129, January 23-25, 1995, San Francisco, California, United States
[doi> 10.1145/199448.199473]
|
| |
9
|
|
 |
10
|
|
 |
11
|
|
 |
12
|
|
| |
13
|
|
| |
14
|
|
| |
15
|
M. Neubauer, P. Thiemann, M. Gasbichler, and M. Sperber. A Functional Notation for Functional Dependencies. In Proceedings of 2001 Haskell Workshop, pages 101--120, Florence, Italy, September 2001.
|
 |
16
|
|
| |
17
|
S. Peyton Jones et al. Haskell~98 -- A non-strict, purely functional language. Available at http://www.haskell.org/onlinereport/, Feb. 1999.
|
| |
18
|
F. Pfenning. Computation and Deduction. Cambridge University Press, 2002.
|
| |
19
|
|
 |
20
|
|
 |
21
|
|
| |
22
|
|
| |
23
|
|
| |
24
|
H. Xi, C. Chen, and G. Chen. Guarded Recursive Datatype Constructors, 2002. Available at http://www.cs.bu.edu/char126hwxi/GRecTypecon/.
|
 |
25
|
|
CITED BY 47
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Martin Sulzmann , Manuel M. T. Chakravarty , Simon Peyton Jones , Kevin Donnelly, System F with type equality coercions, Proceedings of the 2007 ACM SIGPLAN international workshop on Types in languages design and implementation, January 16-16, 2007, Nice, Nice, France
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Paul Hudak , John Hughes , Simon Peyton Jones , Philip Wadler, A history of Haskell: being lazy with class, Proceedings of the third ACM SIGPLAN conference on History of programming languages, p.12-1-12-55, June 09-10, 2007, San Diego, California
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Christian Hofer , Klaus Ostermann , Tillmann Rendel , Adriaan Moors, Polymorphic embedding of dsls, Proceedings of the 7th international conference on Generative programming and component engineering, October 19-23, 2008, Nashville, TN, USA
|
|
|
|
|
|
|
|
|
Julien Brunel , Damien Doligez , René Rydhof Hansen , Julia L. Lawall , Gilles Muller, A foundation for flow-based program matching: using temporal logic and model checking, Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, January 21-23, 2009, Savannah, GA, USA
|
|