基于场景的构件组合方式的研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着软件系统复杂度的不断增加,对软件需求的抽象变得越来越困难。在一个复杂的软件系统中,需要对用户场景进行充分描述,并对系统结构进行形式化建模。在软件工程中,构件可以是被封装的对象类、类树、软件框架、体系结构、一些功能模块、文档、分析件和设计模式等,其具有的独立性、封装性、适应性和可移植性等特性,使它成为实现软件复用的核心技术。当现有的构件不能满足应用需求时,可以按照一定的软件规范去构建新的能够满足应用需求的构件。为实现高内聚和低耦合的目标,研究并提出一种构件模型的形式化建模方法,通过对已有构件模型的组合来开发新的应用系统,从而达到通过构件重用来设计开发复杂系统的目的。其中,构件组合其实就是通过构件之间彼此的交互与协作来实现系统特定的功能与非功能需求的一个过程,同时也是一个重新构建系统构件以实现业务增值功能的一个过程。
     本文在对构件复用技术与范畴论技术进行深入研究的基础上,结合范畴论和构件技术,并参考形式化建模方法,提出一种基于事件轨迹的构件组合方法。当前一般采用图形加文本的方式或形式化描述语言来为构件建模,这些方法不能很好地描述构件的动态行为和互操作等特性,而范畴论集中考察对象之间的关系,它可以确定系统构件之间的交互本质,所以文中采用进程理论规范来抽象应用需求,采用范畴论对构件及构件组合的过程进行抽象,把构件划分为构件实现和构件接口两个组成部分:采用带事件轨迹的进程行为描述构件实现,以轨迹为对象,以进程之间的继承关系为态射,构造出一个完备的进程行为范畴,表明通过范畴回拉可以捕获进程行为的并行复合;采用进程行为的观察结构描述构件接口,以构件为对象,构件之间的功能包含关系作为态射,从而构造出一个余完备的构件范畴,余完备构件范畴形成图表的余极限揭示了带同步限制的构件行为组合。由此也证明了运用范畴论技术来解决构件行为交互问题的可行性。
     本文以某校简化的教师-学生课程选择系统(TSCSS)为例,运用范畴论思想对构件及构件组合的实现进行了初步的探讨,并详细例证了其在处理构件的带同步限制的并行复合问题时的优越性,同时也验证了本文所提方法对解决构件组合问题是可行的和有效的。进而,把范畴论作为一种高效的数学工具引入到软件工程领域。
As the increase of the software system complexity, the abstraction of software requirements is becoming more and more difficult. In a complex software system, we need to fully describe the scenarios, and formally model the system structure. In software engineering, the components can be encapsulated object class, class trees, software frameworks, software architecture, some functional modules, documents, analysis pieces and design patterns, and so on. The characteristics of the components enable itself as the core technology to achieve software reusability, such as independency, encapsulation, reusability and commonality. When the existed components can not satisfy the application requirements, the software could build new components to satisfy the application according to certain specific requirements. In order to achieve the goal of high cohesion and low coupling, a formal modeling approach of component model is researched and presented. And new applications system could be developed through a composition of component model, so as to achieve complex systems development through the reusability of component. Component composition is actually achieved by the interaction and collaboration between each other. The process can achieve system-specific functional and non-functional requirements and re-build the system components to achieve business value-added features of a process.
     Based on the former research of component reuse and category technology, this paper proposes a component composition method based on event track by the combination of category theory and component technology and reference of formal modeling method. Currently, it adopts graphic with texture or formal description language for modeling components. However these methods are not good at describing the dynamic behavior of components, interoperability and so on. The category theory focuses on the relationship between objects, which can determine the nature of the interconnections that can be established between system components. Therefore, the research utilities the category theories and principles to abstract the application needs, and applies the category theory to abstract the component and the process of component composition. The component could be divided into two parts:component implement and component interface. Component implement is described by the process behaviors based on event track and track and process morphisms are shown to form a complete category where parallel composition is reflected by pullback, process morphisms reflect different forms of inheritance; and component interface is described by the observation based on process behaviors, component and component morphisms are shown to form a cocomplete category where component behavior composition with synchronization constraints is reflected by colimit, component morphisms reflect inclusion. This also proves the feasibility to utilize the category theory and technology to solve the problem of component interaction behavior.
     The paper preliminarily discusses the components and the implementation of component compositions thought category theory taking the Teacher-Student Course Selection System as an example. The research explicitly demonstrates that it advantage in solving parallel composition of component behaviors with synchronization constraints, and the effectiveness and the feasibility in solving the problem of component composition. Furthermore, category theory is introduced into software engineering as an efficient mathematics tool.
引文
[1]曾红卫,缪淮扣.构件组合的抽象精化验证[J].软件学报,2008,19(5):1149-1159.
    [2]廖军,谭浩,刘锦德.基于Pi-演算的Web服务组合的描述和验证[J].计算机学报,2005,28(4):635-643.
    [3]朱三元,钱乐秋,宿为民.软件工程技术概论[M].北京:科学出版社,2002:15-27.
    [4]刘丽敏.基于软件构件的信息管理系统平台的设计与实现[D].中南大学,2003.
    [5]郑宇恒.基于场景的需求建模研究[D].浙江师范大学,2009.
    [6]李晓春.模型驱动架构中构件组合的研究与实现[D].吉林大学,2008.
    [7]S. Uchitel, J.Kramer and J. Magee. Detecting Implied Scenarios in Message Sequence Chart Specifications [C], Proc ESEC/FSE'01-Ninth European Software Eng. Conf.& ACM SIGSOFT symp. Foundations of Software Eng., Sept.2001.
    [8]E.Letier, J.Kramer and S.Uchitel. Monitoring and Control in Scenario-Based Requirements Analysis [C]. Proc.ICSE 2005-27th Int'l Conf.Software Eng., May 2005.
    [9]J.Whittle, J.Schurnann. Generating Statechart Designs from Scenarios [C]. Proc.ICSE 2000:22nd Int'l Conf.Software Eng., pp.314-323,2000.
    [10]D.Giannakopoulou and J.Magee. Fluent Model Checking for Event-Based System [C]. Proc. ESEC/FSE 2003,2003.
    [11]陆汝铃,金芝等.基于领域知识的需求信息获取[J].软件学报,1996,7(3):137-144.
    [12]张家重.对象式需求分析及其自动化技术的研究[D].南京大学,1997.
    [13]张家重,王志坚,伊波等。对象式软件需求模型及其机器支撑[J].软件学报,1998,9(6):414-418.
    [14]张家重,吕建,王志坚等.一种图形化对象式需求定义语言的设计[J].软件学报,1996,7(11):647-655.
    [15]陈丹.基于形式化方法的软件开发技术[J].软件工程师,2009,9:52-53.
    [16]Luca de Alfaro, Thomas A. Henzinger. Interface Automata [C]. In:Wermelinger M, Gall H, eds. Proc. of the 9th Annual ACM Symposium on Foundations of Software Engineering (FSE2001). New York:ACM Press,2001.109-120.
    [17]Erich Gradel, Wolfqang Thomas and Thomas Wilke. Automata, Logics, and Infinite Games:A Guide to Current Research [C]. Vol.2500 of Lecture Notes in Computer Science. Springer-Verlag,2000.
    [18]宫蓉蓉.基于Petri网的可达树与可达图的构造与算法实现[J].计算机与数字工 程,2006,36(1):111-113.
    [19]M.Jarke and R.Kurki-Suonio. Special issue on scenario management [C]. IEEE Trans. Software Eng,. Eds., vol.24, no.12, Dec.1998.
    [20]Jun Han. Interaction Compatibility:An Essential Ingredient for Service Composition [C]. In Processing of the 2nd International Workshop on Grid and Cooperative Computing (GCC 2003) [172],59-66.
    [21]Yuji Sakata, Kazutoshi Yokoyama and Shigeyuki Matsuda. A Method for Composing Process of Non-deterministic Web Services [C]. In Proceedings of the IEEE International Conference on Web Services (ICWS'04) [113],436-443.
    [22]Prashant Doshi, Richard Goodwin and Rama Akkiraju. Dynamic Workflow Composition using Markov Decision Processes [C]. In Proceedings of the IEEE International Conference on Web Services (ICWS'04) [113],576-582.
    [23]张岩,胡军,于笑丰等.场景驱动的构件行为抽取[J].软件学报,2007,18(1):50-61.
    [24]Hu J., Yu X., ZhangY. etal. Scenario-based verification for component-based embedded software designs [C]. In:Proceeding of the 34th International Conference on Parallel Proceeding Workshops, Oslo, Norway,2005,240-247.
    [25]胡军,于笑丰,张岩等.基于场景规约的构件式系统设计分析与验证[J].计算机学报,2006,29(4):513-525.
    [26]Damas C, Lambeau B, Dupont P, etal. Generating Annotated Behavior Models from End-User Scenarios [C]. IEEE Transactions on Software Engineering,2005,31(12): 1056-1073.
    [27]Francisco A.C. Pinheiro. Preliminary Thoughts on Using Situation Theory for Scenario Modeling [C], In Workshop on IDEAS 2002.
    [28]Potts C, Takahashi K, Anton AI. Inquiry-based requirements analysis [C]. IEEE Software,1994,11(2):21-32.
    [29]K. Weidenhaupt, K. Pohl, M. Jarke, etal. Scenario Usage in System Development:A Report on Current Practice [C], IEEE Software, Mar.1998.
    [30]张晓春.基于用户场景的需求引出及其行为建模技术研究[D].浙江师范大学,2007.
    [31]Bashar Nuseibeh, Steve Easterbrook. Requirements Engineering:A Roadmap. The Future of Software Engineering [C], Anthony Finkelstein (Ed.), ACM Press 2000.
    [32]Damn W, Harel David.. LSCs:Breathing life into message sequence charts [C]. Formal Methods in System Design,2001,19(1):45-80.
    [33]Sebastian Uchitel, Jeff Kramer, Feff Magee. Synthesis of Behavioral Models from Scenarios [C]. IEEE Transactions on Software Engineering,2003,29(2):99-115.
    [34]J.L.Fiadeiro. Categories for Software Engineering [C]. Springer, Berlin Heidelberg New York,2004.
    [35]陈意云.计算机科学中的范畴论[M].合肥:中国科学技术大学出版社,1993:11-11.
    [36]Reniers, Michel Adriaan. Message Sequence Chart Syntax and Semantics [C]. Eindhoven University of Technology,1999.-viii,216p.
    [37]J. L. Fiadeiro, J. F. Costa (1996). Mirror, mirror in my hand:a duality between specifications and models of process behavior [C]. Mathematical Structures in Computer Science 6:353-373.
    [38]H.-D.Ehrich, J.Goguen and A.Sernadas:A Categorial Theory of Objects as Observed Processes [C]. In:J.W.deBakker, W.P.deRoever and GRozenberg (eds):Proc. of the REX90/Workshop on Foundations of Object-Oriented Languages. LNCS 489, Springer-Verlag,1991, pp.203-228.
    [39]张纪昌,陈中育,郭正虎.基于事件轨迹的构件行为建模[J].电脑与电信,2009(12).
    [40]费玉奎,王志坚,艾萍.构件交互模型与组合适配方法研究[J].计算机工程与应用,2004,20:89-91.
    [41]J.Goguen(1991). A categorical manifesto [M]. Mathematical Structures in Computer Science 1(1):49-67.
    [42]费玉奎,王志坚,艾萍.构件交互模型与组合适配方法研究[J].计算机工程与应用,2004,20:89-91.
    [43]张友生.构件运算与软件演化研究[J].计算机应用.2004,24(4):20-22.
    [44]任洪敏,钱乐秋.构件组装及其形式化推导研究[J].软件学报,2003,14(6):1066-1074.
    [45]Hu Qimin, Xue Jinyun. Solving Path Problems with Component Composition [C]. Computer Science,2006,33(8):97-98.
    [46]廖渊,唐磊,李明树.一种基于QoS的服务构件组合方法[J].计算机学报,2005,28(4):627-634.
    [47]Workflow Management Coalition. Workflow Process Definition Interface-XML Process Definition Languagel.0 [C], WFMC-TC-1025[S] Process Definition Languagel.0 [J], WFMC-TC-1025[S].
    [48]李文军,周晓聪,李师贤.并发模型的范畴论方法[J].中山大学学报(自然科学版),2000,39(2):165-171.
    [49]J.Fiadeiro and T.Maibaum. Temporal Theories as Modularisation Units for Concurrent System Specification [C]. Formal Aspects of Computing 4(3),1992, 239-272.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700