输入上下文相关的行为变化
Typing Context-Dependent Behavioural Variation
摘要:
面向上下文编程(COP)关注程序适应运行环境变化的能力。已经开发了许多具有COP结构和特征的程序设计语言。然而,一些基本问题仍不清楚。本文提出采用静态分析技术来推理和预测程序如何适应它们的行为。我们介绍了一个核心的函数语言,ContextML,配备COP原语操作上下文和编程行为的变化。特别是,我们指定的调度机制,用于选择要在当前活动的上下文中执行的程序片段。除了动态语义,我们提出了一个注释类型系统。它保证了良好类型的程序适应任何上下文,即调度机制总是在运行时成功。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。