{"title":"用于上下文激活的声明性语言","authors":"Nicolás Cardozo","doi":"10.1145/3242921.3242922","DOIUrl":null,"url":null,"abstract":"Context-oriented Programming proposes a language-level technique to enable dynamic adaptations by the activation of contextual situations sensed from the environment. Context activation triggers the dynamic composition of behavioral adaptations with the running system. Currently, there is a close relationship between contexts and the environment, narrowing the application of these techniques to systems that react to sensed data. This can also be a difficulty in systems requiring explicit activation from users by interacting with the user interface. Such systems require a uniform way to express the activation of different contexts based on a set of their defining properties, while minimizing the interaction with the user. We posit a declarative language, CQL, that unifies different mechanisms to activate contexts. CQL can be incorporated as a domain-specific language to any context-oriented language. We validated the appropriateness of the language in two directions. First, we use the expressiveness of the language to realize different mechanisms for context activation in a uniform model. All existing mechanism in the literature are effectively implemented for CQL. Second, we use CQL to automate the explicit activation of many contexts, as is the case of a context-driven multi-versioning application. Both validation cases use Context Traits as a representative Context-oriented Programming language for their implementation.","PeriodicalId":383557,"journal":{"name":"Proceedings of the 10th ACM International Workshop on Context-Oriented Programming: Advanced Modularity for Run-time Composition","volume":"647 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-07-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":"{\"title\":\"A Declarative Language for Context Activation\",\"authors\":\"Nicolás Cardozo\",\"doi\":\"10.1145/3242921.3242922\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Context-oriented Programming proposes a language-level technique to enable dynamic adaptations by the activation of contextual situations sensed from the environment. Context activation triggers the dynamic composition of behavioral adaptations with the running system. Currently, there is a close relationship between contexts and the environment, narrowing the application of these techniques to systems that react to sensed data. This can also be a difficulty in systems requiring explicit activation from users by interacting with the user interface. Such systems require a uniform way to express the activation of different contexts based on a set of their defining properties, while minimizing the interaction with the user. We posit a declarative language, CQL, that unifies different mechanisms to activate contexts. CQL can be incorporated as a domain-specific language to any context-oriented language. We validated the appropriateness of the language in two directions. First, we use the expressiveness of the language to realize different mechanisms for context activation in a uniform model. All existing mechanism in the literature are effectively implemented for CQL. Second, we use CQL to automate the explicit activation of many contexts, as is the case of a context-driven multi-versioning application. Both validation cases use Context Traits as a representative Context-oriented Programming language for their implementation.\",\"PeriodicalId\":383557,\"journal\":{\"name\":\"Proceedings of the 10th ACM International Workshop on Context-Oriented Programming: Advanced Modularity for Run-time Composition\",\"volume\":\"647 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2018-07-16\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"2\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 10th ACM International Workshop on Context-Oriented Programming: Advanced Modularity for Run-time Composition\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3242921.3242922\",\"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 10th ACM International Workshop on Context-Oriented Programming: Advanced Modularity for Run-time Composition","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3242921.3242922","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Context-oriented Programming proposes a language-level technique to enable dynamic adaptations by the activation of contextual situations sensed from the environment. Context activation triggers the dynamic composition of behavioral adaptations with the running system. Currently, there is a close relationship between contexts and the environment, narrowing the application of these techniques to systems that react to sensed data. This can also be a difficulty in systems requiring explicit activation from users by interacting with the user interface. Such systems require a uniform way to express the activation of different contexts based on a set of their defining properties, while minimizing the interaction with the user. We posit a declarative language, CQL, that unifies different mechanisms to activate contexts. CQL can be incorporated as a domain-specific language to any context-oriented language. We validated the appropriateness of the language in two directions. First, we use the expressiveness of the language to realize different mechanisms for context activation in a uniform model. All existing mechanism in the literature are effectively implemented for CQL. Second, we use CQL to automate the explicit activation of many contexts, as is the case of a context-driven multi-versioning application. Both validation cases use Context Traits as a representative Context-oriented Programming language for their implementation.