物联网的基本功能是感知物理环境,并根据实时的感知信息和用户的执行需求实现对物理环境的控制.因此,感执模块是物联网软件的核心模块.为最终将软件体系结构应用于物联网软件的开发,在基于物理模型的物联网软件体系结构(physical-model driven software architecture,简称PMDA)研究的基础上,对PMDA中的感执模型SEM进行求精,求精后的感执模型称为R-SEM.R-SEM考虑了物联网的特有属性,将SEM的内部构件按照物理应用的感执工作流程分解为用通信顺序进程(communication sequential process,简称CSP)表达的子构件来说明构件端口的功能实现,并采用CSP中的导管运算符来说明子构件的端口与构件的端口之间的同步,通过CSP描述了子构件与子构件之间的交互.使用进程分析工具(process analysis toolkit,简称PAT)对R-SEM进行了验证.验证结果表明: R-SEM中子构件之间的交互、子构件的端口与构件的端口之间的同步保持了SEM所具有的保证物理应用之间有效互联的性质--不死锁、不中止和不发散.由于R-SEM精化了SEM的内部组成,且保持了SEM的有效互联性质,因此,R-SEM对最终将PMDA应用于物联网软件的开发具有实际的指导意义.
Internet of things (IoT) is developed to sense and control physical environment. Its control of physical environment is based on the sensed information and the users’ requirements. Therefore, sense-execute model (SEM) is the core module in software architecture of IoT. In order to finally achieve the goal of developing IoT software guided by software architecture, this paper is dedicated to refining SEM in a physical-model driven software architecture (PMDA). The refined sense-execute model is called R-SEM. R-SEM divides the component of SEM into subcomponents according to the features of IoT and the procedures of physical application. Each subcomponent illustrates the functions of a port of a component of SEM, and is expressed by the communication sequential process (CSP). Synchronization between ports of component and subcomponent is illustrated by the pipeline operation of CSP. The interaction between subcomponents is illustrated by CSP as well. R-SEM is verified by the process analysis toolkit (PAT). The result of the verification validates that R-SEM keeps the properties of SEM, namely deadlock-free, nonterminating and divergence-free, which is necessary to guarantee valid interconnections among physical applications. Since R-SEM not only refines components in SEM but also keeps the valid properties of SEM, PMDA can be finally used for guiding software development in IoT.