Constrained Types for Object-Oriented Languages

被引:0
|
作者
Nystrom, Nathaniel [1 ]
Saraswat, Vijay [1 ]
Palsberg, Jens [2 ]
Grothoff, Christian [3 ]
机构
[1] IBM Corp, Thomas J Watson Res Ctr, POB 704, Yorktown Hts, NY 10598 USA
[2] Univ Calif Los Angeles, Dept Comp Sci, Los Angeles, CA 90095 USA
[3] Univ Denver, Dept Comp Sci, Denver, CO 80208 USA
关键词
Languages;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
X10 is a modem object-oriented language designed for productivity and performance in concurrent and distributed systems. In this setting, dependent types offer significant opportunities for detecting design errors statically, documenting design decisions, eliminating costly run-time checks (e.g., for array bounds, null values), and improving the quality of,generated code. We present the design and implementation of constrained types, a natural, simple, clean, and expressive extension to object-oriented programming: A type C{c} names a class or interface C and a constraint c on the immutable state of C and in-scope final variables. Constraints may also be associated with class definitions (representing class invariants) and with method and constructor definitions (representing preconditions). Dynamic casting is permitted. The system is parametric on the underlying constraint system: the compiler supports a simple equality-based constraint system but, in addition, supports extension with new constraint systems using compiler plugins.
引用
收藏
页码:457 / +
页数:5
相关论文
共 50 条
  • [1] Constrained Types for Object-Oriented Languages
    Nystrom, Nathaniel
    Saraswat, Vijay
    Palsberg, Jens
    Grothoff, Christian
    [J]. ACM SIGPLAN NOTICES, 2008, 43 (10) : 457 - 474
  • [2] Session types for object-oriented languages
    Dezani-Ciancaglini, Mariangiola
    Mostrous, Dimitris
    Yoshida, Nobuko
    Drossopoulou, Sophia
    [J]. ECOOP 2006 - OBJECT-ORIENTED PROGRAMMING, PROCEEDINGS, 2006, 4067 : 328 - 352
  • [3] USING TYPES AND INHERITANCE IN OBJECT-ORIENTED LANGUAGES
    HALBERT, DC
    OBRIEN, PD
    [J]. LECTURE NOTES IN COMPUTER SCIENCE, 1987, 276 : 20 - 31
  • [4] On problems in polymorphic object-oriented languages with self types and matching
    Winter, Michael
    [J]. FUNDAMENTA INFORMATICAE, 2006, 71 (04) : 477 - 491
  • [5] FOUNDATIONS OF OBJECT-ORIENTED LANGUAGES
    BLACK, A
    PALSBERG, J
    [J]. SIGPLAN NOTICES, 1994, 29 (03): : 3 - 11
  • [6] EXCEPTIONS IN OBJECT-ORIENTED LANGUAGES
    BORGIDA, A
    [J]. SIGPLAN NOTICES, 1986, 21 (10): : 107 - 119
  • [7] THE FUTURE OF OBJECT-ORIENTED LANGUAGES
    ANDERSON, J
    SUZUKI, N
    BORNING, A
    STEFIK, M
    THOMAS, D
    LIEBERMAN, H
    [J]. SIGPLAN NOTICES, 1986, 21 (11): : 507 - 507
  • [8] OBJECT-ORIENTED LANGUAGES FOR THE MACINTOSH
    SCHMUCKER, KJ
    [J]. BYTE, 1986, 11 (08): : 177 - &
  • [9] COMPARING OBJECT-ORIENTED LANGUAGES
    WARREN, RL
    [J]. DR DOBBS JOURNAL, 1994, 19 (03): : 10 - 10
  • [10] Foundations of object-oriented languages
    Bruce, K
    Remy, D
    [J]. INFORMATION AND COMPUTATION, 2002, 172 (01) : 1 - 1