{"title":"事务层:控制实时编程环境中变化的粒度","authors":"Toni Mattis, Patrick Rein, R. Hirschfeld","doi":"10.1145/2951965.2951969","DOIUrl":null,"url":null,"abstract":"Modifying source code in a live programming environment changes the behavior of currently running programs immediately. When complex changes affect multiple locations in the code before reaching a consistent state, running programs are in danger of \"de-railing\" when their control flow reaches the yet incomplete \"construction site\". Context-oriented Programming provides layers, which encapsulate code that would otherwise be scattered over many modules and can be activated to jointly adapt program behavior at run-time. We propose to transparently collect and group changes to the code in a COP layer and defer its activation until the programmer deems its change to be completed. Additionally, layer deactivation serves as immediate undo operation on the group of changes. We present and discuss a Squeak/Smalltalk prototype consisting of a code editor, which provides control over when and where such a group of changes is active, and an extension of Squeak's COP implementation ContextS/2 required for representing most code changes in a layer.","PeriodicalId":118660,"journal":{"name":"Proceedings of the 8th ACM International Workshop on Context-Oriented Programming","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-07-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Transaction Layers: Controlling Granularity of Change in Live Programming Environments\",\"authors\":\"Toni Mattis, Patrick Rein, R. Hirschfeld\",\"doi\":\"10.1145/2951965.2951969\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Modifying source code in a live programming environment changes the behavior of currently running programs immediately. When complex changes affect multiple locations in the code before reaching a consistent state, running programs are in danger of \\\"de-railing\\\" when their control flow reaches the yet incomplete \\\"construction site\\\". Context-oriented Programming provides layers, which encapsulate code that would otherwise be scattered over many modules and can be activated to jointly adapt program behavior at run-time. We propose to transparently collect and group changes to the code in a COP layer and defer its activation until the programmer deems its change to be completed. Additionally, layer deactivation serves as immediate undo operation on the group of changes. We present and discuss a Squeak/Smalltalk prototype consisting of a code editor, which provides control over when and where such a group of changes is active, and an extension of Squeak's COP implementation ContextS/2 required for representing most code changes in a layer.\",\"PeriodicalId\":118660,\"journal\":{\"name\":\"Proceedings of the 8th ACM International Workshop on Context-Oriented Programming\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2016-07-17\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 8th ACM International Workshop on Context-Oriented Programming\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/2951965.2951969\",\"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 8th ACM International Workshop on Context-Oriented Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2951965.2951969","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Transaction Layers: Controlling Granularity of Change in Live Programming Environments
Modifying source code in a live programming environment changes the behavior of currently running programs immediately. When complex changes affect multiple locations in the code before reaching a consistent state, running programs are in danger of "de-railing" when their control flow reaches the yet incomplete "construction site". Context-oriented Programming provides layers, which encapsulate code that would otherwise be scattered over many modules and can be activated to jointly adapt program behavior at run-time. We propose to transparently collect and group changes to the code in a COP layer and defer its activation until the programmer deems its change to be completed. Additionally, layer deactivation serves as immediate undo operation on the group of changes. We present and discuss a Squeak/Smalltalk prototype consisting of a code editor, which provides control over when and where such a group of changes is active, and an extension of Squeak's COP implementation ContextS/2 required for representing most code changes in a layer.