A type safe state abstraction for coordination in J-like languages

被引:10
|
作者
Damiani, Ferruccio [1 ]
Giachino, Elena [1 ,2 ]
Giannini, Paola [3 ]
Drossopoulou, Sophia [4 ]
机构
[1] Univ Torino, Dipartimento Informat, I-10149 Turin, Italy
[2] Univ Paris 07, PPS, F-75013 Paris, France
[3] Univ Piemonte Orientale, Dipartimento Informat, I-15100 Alessandria, Italy
[4] Univ London Imperial Coll Sci Technol & Med, Dept Comp, London SW7 2BZ, England
关键词
D O I
10.1007/s00236-008-0079-y
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
The state of a concurrent object, intended as some abstraction over the values of the fields of the object, usually determines its coordination behavior. Therefore, state is always in the programmer's mind, even though implicitly. We suggest a feature for J ava-like languages, which makes the state of a concurrent object explicit and supports the expression of the object's behavior depending on the state it is currently in. Namely, an object will be in one of the states declared in its class. The state determines the presence of fields and methods. State transition statements explicitly change the state of an object, and thus change the availability of fields and methods. When a thread calls a method which is declared in the object's class but absent from its current state, it waits, until the state of the object changes to a state which does contain that method. This directly expresses coordination. We claim that this feature makes it easier to understand and develop concurrent programs, and substantiate our claim through the discussion of some popular examples of concurrent programs written using this feature.We develop a type and effect system, which guarantees that, during execution of a method invoked on a concurrent object. No attempt will be made to access fields not available in the current state of and (2) No method invoked on a receiver (syntactically) different from may cause the invocation of a method on the latter guarantee helps to enforce the former and prevents a family of accidental violations of the intended coordination protocol.
引用
收藏
页码:479 / 536
页数:58
相关论文
共 50 条
  • [41] XMem: Type-safe, transparent, shared memory for cross-runtime communication and coordination
    Wegiel, Michal
    Krintz, Chandra
    ACM SIGPLAN NOTICES, 2008, 43 (06) : 327 - 338
  • [42] XMem: Type-Safe, Transparent, Shared Memory for Cross-Runtime Communication and Coordination
    Wegiel, Michal
    Krintz, Chandra
    PLDI'08: PROCEEDINGS OF THE 2008 SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN & IMPLEMENTATION, 2008, : 327 - 338
  • [43] Large resonant third-order optical nonlinearity of thin film containing J-like aggregates of a bis[4-(N-dibutylamino)phenyl]squarylium dye
    Li, Zhongyu
    Xu, Song
    Zhu, Lin
    Kasatani, Kazuo
    BULLETIN OF MATERIALS SCIENCE, 2012, 35 (07) : 1111 - 1116
  • [44] Large resonant third-order optical nonlinearity of thin film containing J-like aggregates of a bis[4-(N-dibutylamino)phenyl]squarylium dye
    ZHONGYU LI
    SONG XU
    LIN ZHU
    KAZUO KASATANI
    Bulletin of Materials Science, 2012, 35 : 1111 - 1116
  • [45] A Pure Polyproline Type I-like Peptoid Helix by Metal Coordination
    Zborovsky, Lieby
    Smolyakova, Alisa
    Baskin, Maria
    Maayan, Galia
    CHEMISTRY-A EUROPEAN JOURNAL, 2018, 24 (05) : 1159 - 1167
  • [46] A Type System for Quantified Information-Flow Security in Java']Java-Like Languages
    Shakoori, Gohar
    Fallah, Mehran S.
    Iranmanesh, Zeinab
    PROCEEDINGS OF 2016 11TH INTERNATIONAL CONFERENCE ON AVAILABILITY, RELIABILITY AND SECURITY, (ARES 2016), 2016, : 464 - 473
  • [47] A type-safe embedding of SQL into Java']Java using the extensible compiler framework J%
    Karakoidas, Vassilios
    Mitropoulos, Dimitris
    Louridas, Panagiotis
    Spinellis, Diomidis
    COMPUTER LANGUAGES SYSTEMS & STRUCTURES, 2015, 41 : 1 - 20
  • [48] Competitive coordination enhancing the thermal stability of PDOL electrolytes for safe solid-state lithium metal batteries
    Pei, Ying-Ying
    Hu, Jiang-Kui
    Yuan, Hong
    Yang, Shi-Jie
    Wang, Xi-Long
    Liao, Zheng
    Liu, Jia
    Li, Bo-Quan
    Huang, Jia-Qi
    NANO RESEARCH, 2025, 18 (03)
  • [49] Current state-of-the-art in the safe and efficient management of type 2 diabetes mellitus
    Ametov, A. S.
    Karpova, E., V
    Ivanova, E., V
    DIABETES MELLITUS, 2009, 12 (02): : 18 - 24
  • [50] A three-valued type system for true positives detection in Java']Java-like languages
    Ancona, Davide
    Frassetto, Federico
    17TH WORKSHOP ON FORMAL TECHNIQUES FOR JAVA-LIKE PROGRAMS (FTFJP 2015), 2015,