计算机工程与应用 ›› 2013, Vol. 49 ›› Issue (5): 64-69.

• 理论研究、研发设计 • 上一篇    下一篇

一个基于COP的控制软件安全性增强方法

陈智勇1,2,徐  锋1,2,余  萍1,2   

  1. 1.南京大学 软件新技术国家重点实验室,南京 210046
    2.南京大学 计算机科学与技术系,南京 210046
  • 出版日期:2013-03-01 发布日期:2013-03-14

COP based approach to control software safety enhancement

CHEN Zhiyong1,2, XU Feng1,2, YU Ping1,2   

  1. 1.State Key Lab for Novel Software Technology, Nanjing University, Nanjing 210046, China
    2.Department of Computer Science & Technology, Nanjing University, Nanjing 210046, China
  • Online:2013-03-01 Published:2013-03-14

摘要: 控制软件往往是安全攸关系统的核心,其正确性对系统安全起着至关重要的作用。然而由于系统面对的环境因素越来越复杂,软件设计之初不可能考虑到所有可能面对的环境变化因素,系统的安全性面临新的挑战。因此在软件维护阶段,以环境变化为中心,增量式地增强软件的安全性显得非常重要。面向上下文编程方法(Context-Oriented Programming,COP)正是一种以软件运行上下文环境为中心的编程方法。现有的支撑COP思想的运行机制可以使得系统根据精确的上下文信息动态地调整系统的行为,但是有些上下文引发的系统行为调整会导致系统执行器的现有运行被打断,对于这类影响系统执行器行为的上下文,现有的COP运行机制还没有提供有效处理方法。根据现有的COP方法,给出了一个基于软件上下文保存与恢复的控制软件安全性增强的编程模型,并在Lego NXT控制器上实现了相应的运行支撑和编程工具,通过一个产品分拣系统的安全性增强实例,初步验证了该编程模型的合理性。

关键词: 软件安全性, 面向上下文编程(COP), 编程模型

Abstract: Control software is the core of safety-critical systems, its correctness is crucial to the system safety. However, as systems are facing increasingly complex context environment, which cannot be considered all, system safety is facing new challenges. So it is very important to enhance software safety via an environment-centered, incremental method when maintaining the software. Context-oriented programming is a programming technique which treats software context as a central notion. Current opera-
ting mechanisms for COP treat context explicitly, and it provides mechanisms to dynamically adapt behavior in reaction to changes in context. However, some behavior adaptions may interrupt the system actuator’s running state, and affect system’s results. There still don’t have an effective approach to deal with such problems. According to existing COP language, it proposes a control software safety enhancement model based on software context saving and restoring, also, it provides the corresponding runtime support mechanism and programming tools. It shows a parts picking system safety enhancement case to satisfy the model’s correctness.

Key words: software safety, Context-Oriented Programming(COP), programming model