Modular Session Types for Distributed Object-Oriented Programming

被引:11
|
作者
Gay, Simon J. [1 ]
Vasconcclos, Vasco T. [2 ]
Ravara, Antonio [3 ,4 ,5 ,6 ]
Gesbert, Nils [1 ]
Caldeira, Alexandre Z. [2 ]
机构
[1] Univ Glasgow, Dept Comp Sci, Glasgow G12 8QQ, Lanark, Scotland
[2] Univ Lisbon, Dept Informat, P-1699 Lisbon, Portugal
[3] Univ Nova Lisboa, CITI, Lisbon, Portugal
[4] Univ Nova Lisboa, Dept Informat, FCT, Lisbon, Portugal
[5] Univ Tecn Lisboa, SQIG, Inst Telecomunicacoes, P-1100 Lisbon, Portugal
[6] Univ Tecn Lisboa, Dept Math, IST, P-1100 Lisbon, Portugal
关键词
Languages; Theory; Verification; Session types; object-oriented calculus; non-uniform method availability; typestates; LANGUAGE; CHECKING; STATE;
D O I
10.1145/1707801.1706335
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Session types allow communication protocols to be specified type-theoretically so that protocol implementations can be verified by static type-checking. We extend previous work on session types for distributed object-oriented languages in three ways. (1) We attach a session type to a class definition, to specify the possible sequences of method calls. (2) We allow a session type (protocol) implementation to be modularized, i.e. partitioned into separately-callable methods. (3) We treat session-typed communication channels as objects, integrating their session types with the session types of classes. The result is an elegant unification of communication channels and their session types, distributed object-oriented programming, and a form of typestates supporting non-uniform objects, i.e. objects that dynamically change the set of available methods. We define syntax, operational semantics, a sound type system, and a correct and complete type checking algorithm for a small distributed class-based object-oriented language. Static typing guarantees that both sequences of messages on channels, and sequences of method calls on objects, conform to type-theoretic specifications, thus ensuring type-safety. The language includes expected features of session types, such as delegation, and expected features of object-oriented programming, such as encapsulation of local state. We also describe a prototype implementation as an extension of Java.
引用
收藏
页码:299 / 312
页数:14
相关论文
共 50 条
  • [1] Modular Session Types for Distributed Object-Oriented Programming
    Gay, Simon J.
    Vasconcelos, Vasco T.
    Ravara, Antonio
    Gesbert, Nils
    Caldeira, Alexandre Z.
    POPL'10: PROCEEDINGS OF THE 37TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2010, : 299 - 312
  • [2] MODULAR SESSION TYPES FOR OBJECTS
    Gay, Simon J.
    Gesbert, Nils
    Ravara, Antonio
    Vasconcelos, Vasco T.
    LOGICAL METHODS IN COMPUTER SCIENCE, 2015, 11 (04)
  • [3] Session and union types for object oriented programming
    Bettini, Lorenzo
    Capecchi, Sara
    Dezani-Ciancaglini, Mariangioa
    Giachino, Elena
    Venneri, Betti
    CONCURRENCY, GRAPHS AND MODELS: ESSAYS DEDICATED TO UGO MONTANARI ON THE OCCASION OF HIS 65TH BIRTHDAY, 2008, 5065 : 659 - +
  • [4] Generalized algebraic data types and object-oriented programming
    Kennedy, A
    Russo, CV
    ACM SIGPLAN NOTICES, 2005, 40 (10) : 21 - 40
  • [5] Object-oriented Programming with Gradual Abstraction
    Normark, Kurt
    Thomsen, Lone Leth
    Thomsen, Bent
    ACM SIGPLAN NOTICES, 2013, 48 (02) : 41 - 51
  • [6] On type systems for object-oriented database programming languages
    Leontiev, Y
    Özsu, MTR
    Szafron, D
    ACM COMPUTING SURVEYS, 2002, 34 (04) : 409 - 449
  • [7] Constrained Types for Object-Oriented Languages
    Nystrom, Nathaniel
    Saraswat, Vijay
    Palsberg, Jens
    Grothoff, Christian
    ACM SIGPLAN NOTICES, 2008, 43 (10) : 457 - 474
  • [8] Constrained Types for Object-Oriented Languages
    Nystrom, Nathaniel
    Saraswat, Vijay
    Palsberg, Jens
    Grothoff, Christian
    OOPSLA 2008 NASHVILLE, CONFERENCE PROCEEDINGS: MUSIC CITY USA, OOPSLA, 2008, : 457 - +
  • [9] OOPAL: Integrating array programming in object-oriented programming
    Mougin, P
    Ducasse, S
    ACM SIGPLAN NOTICES, 2003, 38 (11) : 65 - 77
  • [10] Object-oriented Modular Model Library for Distillation
    Chen Chang
    Ding Jianwan
    Chen Liping
    CHINESE JOURNAL OF CHEMICAL ENGINEERING, 2013, 21 (06) : 600 - 610