| Relationally-parametric polymorphic contracts |
| Full text |
Pdf
(428 KB)
|
Source
|
Dynamic Languages Symposium
archive
Proceedings of the 2007 symposium on Dynamic languages
table of contents
Montreal, Quebec, Canada
SESSION: Integrating static features into dynamic languages
table of contents
Pages: 29 - 40
Year of Publication: 2007
ISBN:978-1-59593-868-8
|
|
Authors
|
|
| Sponsors |
|
| Publisher |
|
| Bibliometrics |
Downloads (6 Weeks): 3, Downloads (12 Months): 37, Citation Count: 1
|
|
|
ABSTRACT
The analogy between types and contracts raises the question of how many features of static type systems can be expressed as dynamic contracts. An important feature missing in prior work on contracts is parametricity, as represented by the polymorphic types in languages like Standard ML. We present a contract counterpart to parametricity. We explore multiple designs for such a system and present one that is simple and incurs minimal execution overhead. We show how to extend the notion of contract blame to our definition. We present a form of inference that can often save programmers from having to explicitly instantiate many parametric contracts. Finally, we present several examples that illustrate how this system mimics the feel and properties of parametric polymorphism in typed languages.
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
|
Carrillo-Castellon, M., J. Garcia-Molina, E. Pimentel and I. Repiso. Design by contract in Smalltalk. Journal of Object-Oriented Programming, 7(9):23--28, 1996.
|
| |
2
|
Conway, D. and C. G. Goebel. Class::Contract -- design-bycontract OO in Perl. search.cpan.org/?ggoebel/Class-Contract-1.14.
|
| |
3
|
ECMA. ECMAScript language specification.
|
 |
4
|
|
| |
5
|
Findler, Barzilay, Blume, Codik, Felleisen, Flatt, Huang, Matthews, McCarthy, Scott, Press, Rainey, Reppy, Riehl, Spiro, Tucker and Wick. The eighth annual ICFP programming contest. icfpc.plt-scheme.org/.
|
 |
6
|
|
| |
7
|
Findler, R. B. and M. Blume. Contracts as pairs of projections. In International Symposium on Functional and Logic Programming, pages 226--241, 2006.
|
 |
8
|
|
| |
9
|
Flapjax Team. Flapjax programming language. www.flapjax-lang.org.
|
 |
10
|
|
 |
11
|
|
| |
12
|
Hinze, R., J. Jeuring and A. Löh. Typed contracts for functional programming. In International Symposium on Functional and Logic Programming, pages 208--225, 2006.
|
| |
13
|
Ignatoff, D., G. H. Cooper and S. Krishnamurthi. Crossing state lines: Adapting object-oriented frameworks to functional reactive languages. In International Symposium on Functional and Logic Programming, pages 259--276, 2006.
|
| |
14
|
|
 |
15
|
|
| |
16
|
McFarlane, K. Design by contract framework. www.codeproject.com/csharp/designbycontract.asp.
|
| |
17
|
|
| |
18
|
Milner, R. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:348--375, August 1978.
|
| |
19
|
|
 |
20
|
|
| |
21
|
Pierce, B. and E. Sumii. Relating cryptography and polymorphism, 2000. Unpublished manuscript.
|
| |
22
|
|
| |
23
|
|
| |
24
|
PLT. PLT MzLib: Libraries manual. Technical Report PLTTR05-4-v300, PLT Scheme Inc., 2005. www.plt-scheme.org/techreports/.
|
| |
25
|
Reynolds, J. C. Types, absraction, and parametric polymorphism. In Information Processing 83, pages 513--523, 1983.
|
| |
26
|
|
 |
27
|
Sam Tobin-Hochstadt , Matthias Felleisen, Interlanguage migration: from scripts to programs, Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applications, October 22-26, 2006, Portland, Oregon, USA
[doi> 10.1145/1176617.1176755]
|
 |
28
|
|
 |
29
|
|
CITED BY
|
|
Amal Ahmed , Robert Bruce Findler , Jacob Matthews , Philip Wadler, Blame for all, Proceedings for the 1st workshop on Script to Program Evolution, p.1-13, July 06-06, 2009, Genova, Italy
|
|