并发面向对象编程中的通道作为对象

IF 0.1 4区 历史学 0 ARCHAEOLOGY
Joana Campos, V. Vasconcelos
{"title":"并发面向对象编程中的通道作为对象","authors":"Joana Campos, V. Vasconcelos","doi":"10.4204/EPTCS.69.2","DOIUrl":null,"url":null,"abstract":"There is often a sort of a protocol associated to each class, stating when and how certain methods should be called. Given that this protocol is, if at all, described in the documentation accompanying the class, current mainstream object-oriented languages cannot provide for the verification of client code adherence against the sought class behaviour. We have defined a class-based concurrent object-oriented language that formalises such protocols in the form of usage types. Usage types are attached to class definitions, allowing for the specification of (1) the available methods, (2) the tests clients must perform on the result of methods, and (3) the object status - linear or shared - all of which depend on the object's state. Our work extends the recent approach on modular session types by eliminating channel operations, and defining the method call as the single communication primitive in both sequential and concurrent settings. In contrast to previous works, we define a single category for objects, instead of distinct categories for linear and for shared objects, and let linear objects evolve into shared ones. We introduce a standard sync qualifier to prevent thread interference in certain operations on shared objects. We formalise the language syntax, the operational semantics, and a type system that enforces by static typing that methods are called only when available, and by a single client if so specified in the usage type. We illustrate the language via a complete example.","PeriodicalId":53164,"journal":{"name":"Journal of Historic Buildings and Places","volume":"17 1","pages":"12-28"},"PeriodicalIF":0.1000,"publicationDate":"2011-10-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"12","resultStr":"{\"title\":\"Channels as Objects in Concurrent Object-Oriented Programming\",\"authors\":\"Joana Campos, V. Vasconcelos\",\"doi\":\"10.4204/EPTCS.69.2\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"There is often a sort of a protocol associated to each class, stating when and how certain methods should be called. Given that this protocol is, if at all, described in the documentation accompanying the class, current mainstream object-oriented languages cannot provide for the verification of client code adherence against the sought class behaviour. We have defined a class-based concurrent object-oriented language that formalises such protocols in the form of usage types. Usage types are attached to class definitions, allowing for the specification of (1) the available methods, (2) the tests clients must perform on the result of methods, and (3) the object status - linear or shared - all of which depend on the object's state. Our work extends the recent approach on modular session types by eliminating channel operations, and defining the method call as the single communication primitive in both sequential and concurrent settings. In contrast to previous works, we define a single category for objects, instead of distinct categories for linear and for shared objects, and let linear objects evolve into shared ones. We introduce a standard sync qualifier to prevent thread interference in certain operations on shared objects. We formalise the language syntax, the operational semantics, and a type system that enforces by static typing that methods are called only when available, and by a single client if so specified in the usage type. We illustrate the language via a complete example.\",\"PeriodicalId\":53164,\"journal\":{\"name\":\"Journal of Historic Buildings and Places\",\"volume\":\"17 1\",\"pages\":\"12-28\"},\"PeriodicalIF\":0.1000,\"publicationDate\":\"2011-10-18\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"12\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Historic Buildings and Places\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.4204/EPTCS.69.2\",\"RegionNum\":4,\"RegionCategory\":\"历史学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"0\",\"JCRName\":\"ARCHAEOLOGY\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Historic Buildings and Places","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4204/EPTCS.69.2","RegionNum":4,"RegionCategory":"历史学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"0","JCRName":"ARCHAEOLOGY","Score":null,"Total":0}
引用次数: 12

摘要

每个类通常都有一种协议,说明何时以及如何调用某些方法。考虑到这个协议(如果有的话)是在类附带的文档中描述的,当前主流的面向对象语言不能提供针对所寻求的类行为的客户端代码遵从性的验证。我们已经定义了一种基于类的并发面向对象语言,它以使用类型的形式形式化了这些协议。使用类型附加到类定义中,允许规范(1)可用的方法,(2)客户端必须对方法的结果执行的测试,以及(3)对象状态(线性或共享),所有这些都取决于对象的状态。我们的工作扩展了模块化会话类型的最新方法,消除了通道操作,并将方法调用定义为顺序和并发设置中的单个通信原语。与以往的作品不同,我们将线性对象和共享对象定义为单一类别,而不是不同的类别,并让线性对象演变为共享对象。我们引入了一个标准的同步限定符,以防止线程对共享对象的某些操作产生干扰。我们将语言语法、操作语义和类型系统形式化,该系统通过静态类型强制方法仅在可用时调用,并且如果在使用类型中指定了单个客户端,则由单个客户端调用。我们通过一个完整的例子来说明这门语言。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Channels as Objects in Concurrent Object-Oriented Programming
There is often a sort of a protocol associated to each class, stating when and how certain methods should be called. Given that this protocol is, if at all, described in the documentation accompanying the class, current mainstream object-oriented languages cannot provide for the verification of client code adherence against the sought class behaviour. We have defined a class-based concurrent object-oriented language that formalises such protocols in the form of usage types. Usage types are attached to class definitions, allowing for the specification of (1) the available methods, (2) the tests clients must perform on the result of methods, and (3) the object status - linear or shared - all of which depend on the object's state. Our work extends the recent approach on modular session types by eliminating channel operations, and defining the method call as the single communication primitive in both sequential and concurrent settings. In contrast to previous works, we define a single category for objects, instead of distinct categories for linear and for shared objects, and let linear objects evolve into shared ones. We introduce a standard sync qualifier to prevent thread interference in certain operations on shared objects. We formalise the language syntax, the operational semantics, and a type system that enforces by static typing that methods are called only when available, and by a single client if so specified in the usage type. We illustrate the language via a complete example.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信