{"title":"用于可补偿和可中断执行的DSL","authors":"Hiroaki Inoue, Tomoyuki Aotani, Atsushi Igarashi","doi":"10.1145/3141858.3141860","DOIUrl":null,"url":null,"abstract":"Context-awareness is getting more and more important in software applications. Such an application runs depending on the time-varying status of the surrounding environment such as network connection, battery/energy charge and heat. Interruptions, or asynchronous exceptions, are useful to achieve context-awareness: if the environment changes, the execution of the application is interrupted reactively to stop and/or recover the internal state for adapting to the new environment. It is, however, difficult to program with interruptions modularly in most programming languages because their support is too basic and is based on synchronous exception handling mechanism such as try-catch. We propose a domain-specific language ContextWorkflow for modular interruptible programs as a solution to the problem. An interruptible program is basically a workflow, i.e., a sequence of atomic computations with compensations. The uniqueness of ContextWorkflow is that, during its execution, a workflow watches the context, which is represented as a reactive value in functional reactive programming and instructs how the execution reflects the status of the surrounding environment.","PeriodicalId":372925,"journal":{"name":"Proceedings of the 4th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems","volume":"13 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-10-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":"{\"title\":\"A DSL for compensable and interruptible executions\",\"authors\":\"Hiroaki Inoue, Tomoyuki Aotani, Atsushi Igarashi\",\"doi\":\"10.1145/3141858.3141860\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Context-awareness is getting more and more important in software applications. Such an application runs depending on the time-varying status of the surrounding environment such as network connection, battery/energy charge and heat. Interruptions, or asynchronous exceptions, are useful to achieve context-awareness: if the environment changes, the execution of the application is interrupted reactively to stop and/or recover the internal state for adapting to the new environment. It is, however, difficult to program with interruptions modularly in most programming languages because their support is too basic and is based on synchronous exception handling mechanism such as try-catch. We propose a domain-specific language ContextWorkflow for modular interruptible programs as a solution to the problem. An interruptible program is basically a workflow, i.e., a sequence of atomic computations with compensations. The uniqueness of ContextWorkflow is that, during its execution, a workflow watches the context, which is represented as a reactive value in functional reactive programming and instructs how the execution reflects the status of the surrounding environment.\",\"PeriodicalId\":372925,\"journal\":{\"name\":\"Proceedings of the 4th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems\",\"volume\":\"13 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2017-10-23\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"3\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 4th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3141858.3141860\",\"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 4th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3141858.3141860","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
A DSL for compensable and interruptible executions
Context-awareness is getting more and more important in software applications. Such an application runs depending on the time-varying status of the surrounding environment such as network connection, battery/energy charge and heat. Interruptions, or asynchronous exceptions, are useful to achieve context-awareness: if the environment changes, the execution of the application is interrupted reactively to stop and/or recover the internal state for adapting to the new environment. It is, however, difficult to program with interruptions modularly in most programming languages because their support is too basic and is based on synchronous exception handling mechanism such as try-catch. We propose a domain-specific language ContextWorkflow for modular interruptible programs as a solution to the problem. An interruptible program is basically a workflow, i.e., a sequence of atomic computations with compensations. The uniqueness of ContextWorkflow is that, during its execution, a workflow watches the context, which is represented as a reactive value in functional reactive programming and instructs how the execution reflects the status of the surrounding environment.