Stefan Ramson, Jens Lincke, Harumi Watanabe, R. Hirschfeld
{"title":"基于区域的层激活:跨逻辑连接的异步操作的上下文特定行为适应","authors":"Stefan Ramson, Jens Lincke, Harumi Watanabe, R. Hirschfeld","doi":"10.1145/3422584.3422764","DOIUrl":null,"url":null,"abstract":"Scoping behavior adaptations using dynamic extent is a crucial part of Context-oriented Programming (COP). In a synchronous execution model, dynamic extent ensures the activation of a layer for the entire duration of a block. An asynchronous execution model, however, breaks the intended semantics of dynamic extent. For example, using the await keyword postpones the execution of the block and returns to its caller. Thus, dynamic extent deactivates the behavior adaptation. Consequently, when resuming the postponed execution the layer is no longer active. In this paper, we propose a variant of dynamic extent that activates a layer for a block and all its logically-connected asynchronous operations. We show how zones can be used to track the asynchronous dynamic extent of a block. Further, we provide an implementation of our approach as an extension to ContextJS in JavaScript.","PeriodicalId":192954,"journal":{"name":"Proceedings of the 12th ACM International Workshop on Context-Oriented Programming and Advanced Modularity","volume":"14 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-07-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":"{\"title\":\"Zone-based Layer Activation: Context-specific Behavior Adaptations across Logically-connected Asynchronous Operations\",\"authors\":\"Stefan Ramson, Jens Lincke, Harumi Watanabe, R. Hirschfeld\",\"doi\":\"10.1145/3422584.3422764\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Scoping behavior adaptations using dynamic extent is a crucial part of Context-oriented Programming (COP). In a synchronous execution model, dynamic extent ensures the activation of a layer for the entire duration of a block. An asynchronous execution model, however, breaks the intended semantics of dynamic extent. For example, using the await keyword postpones the execution of the block and returns to its caller. Thus, dynamic extent deactivates the behavior adaptation. Consequently, when resuming the postponed execution the layer is no longer active. In this paper, we propose a variant of dynamic extent that activates a layer for a block and all its logically-connected asynchronous operations. We show how zones can be used to track the asynchronous dynamic extent of a block. Further, we provide an implementation of our approach as an extension to ContextJS in JavaScript.\",\"PeriodicalId\":192954,\"journal\":{\"name\":\"Proceedings of the 12th ACM International Workshop on Context-Oriented Programming and Advanced Modularity\",\"volume\":\"14 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2020-07-21\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"2\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 12th ACM International Workshop on Context-Oriented Programming and Advanced Modularity\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3422584.3422764\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 12th ACM International Workshop on Context-Oriented Programming and Advanced Modularity","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3422584.3422764","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Zone-based Layer Activation: Context-specific Behavior Adaptations across Logically-connected Asynchronous Operations
Scoping behavior adaptations using dynamic extent is a crucial part of Context-oriented Programming (COP). In a synchronous execution model, dynamic extent ensures the activation of a layer for the entire duration of a block. An asynchronous execution model, however, breaks the intended semantics of dynamic extent. For example, using the await keyword postpones the execution of the block and returns to its caller. Thus, dynamic extent deactivates the behavior adaptation. Consequently, when resuming the postponed execution the layer is no longer active. In this paper, we propose a variant of dynamic extent that activates a layer for a block and all its logically-connected asynchronous operations. We show how zones can be used to track the asynchronous dynamic extent of a block. Further, we provide an implementation of our approach as an extension to ContextJS in JavaScript.