计算机科学 > 程序设计语言
[提交于 2013年2月26日]
标题:Typing Context-Dependent Behavioural Variation
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Context Oriented Programming (COP) concerns the ability of programs to adapt to changes in their running environment. A number of programming languages endowed with COP constructs and features have been developed. However, some foundational issues remain unclear. This paper proposes adopting static analysis techniques to reason on and predict how programs adapt their behaviour. We introduce a core functional language, ContextML, equipped with COP primitives for manipulating contexts and for programming behavioural variations. In particular, we specify the dispatching mechanism, used to select the program fragments to be executed in the current active context. Besides the dynamic semantics we present an annotated type system. It guarantees that the well-typed programs adapt to any context, i.e. the dispatching mechanism always succeeds at run-time.
提交历史
来自:EPTCS[v1] 2013年2月26日 星期二 06:49:09 UTC