基于UML和形式化方法的面向方面实时系统模型刘瑞成毕业论文.doc
《基于UML和形式化方法的面向方面实时系统模型刘瑞成毕业论文.doc》由会员分享,可在线阅读,更多相关《基于UML和形式化方法的面向方面实时系统模型刘瑞成毕业论文.doc(102页珍藏版)》请在三一办公上搜索。
1、广东工业大学工学硕士学位论文基于UML和形式化方法的面向方面实时系统模型刘瑞成二零零六年五月八日分类号: 学校代码:111911UDC: 密级: 学 号:2240305243广东工业大学学位论文基于UML和形式化方法的面向方面实时系统模型刘瑞成指 导 教 师: 张立臣 教授 广东工业大学计算机学院学 科 门 类: 工学 专 业 名 称: 计算机软件与理论 申请学位级别: 硕 士 论文提交日期: 2006 年 5 月 论文答辩日期: 2006 年 5 月 学位授予单位: 广东工业大学 A Dissertation Submitted to Guangdong University of Tech
2、nology for the Degree of MasterAspect-Oriented Model for Real-Time systems Based on UML and Formal MethodsMaster Candidate: Liu RuichengSupervisor: Prof. Zhang LichenMay 2006Computer FacultyGuangdong University of TechnologyGuangzhou, Guangdong, P.R.China, 510090摘要关注分离在软件工程上是一种广泛应用的原理,认为难于理解的复杂问题应该被
3、划分为一系列容易理解的简单问题,并且能够容易解决和集成到原处,从而解决原来复杂的问题。由于问题被分解为人容易理解的小单元,而且适合于各种需求的变化,因此这种方式开发软件能够给程序带来更好的可理解性、维护性、适应性和重用性。实时系统已经广泛应用于各个领域,但是实时系统具有很多非功能需求(例如实时性),且这些非功能需求往往横切整个系统模块,引起代码混乱和代码分散等问题,导致系统难于设计、重用和维护,严重影响系统的性能。面向方面编程作为一种基于关注分离的新软件开发范例,能够通过引入实现横切关注点的方面来获得更高的功能性和非功能性关注点的分离,而且系统不同的方面能够进行单独的设计,并织入系统。它不仅能
4、够解决面向对象编程在设计横切关注点时陷入的“应该设计不足还是宁可过分设计”的两难境地,还能够很好的解决上述遇到的问题。目前面向方面编程的实现语言已经不少,例如AspectJ等,但仍然没有适用面向方面程序设计的建模语言。因此,我们利用UML和形式化方法来表达面向方面程序,并建立相应的面向方面软件设计模型来设计实时系统。本文分析介绍了实时系统、面向方面软件设计以及UML等技术;总结了UML建模实时系统现有的方法;论述了扩展UML建立的时间模型;提出一种新的基于UML的面向方面软件设计模型(AOSDM-UML),通过扩展UML表达AOP的相关概念,在UML的元模型层次上设计AOSD的模型框架,从结构
5、模型、行为模型和方面织入等几部分建立面向方面的设计模型,并结合实例说明整个建模过程,即利用UML的类图实现方面的结构模型、方面与核心组件以及方面之间的静态关系,协作图表达方面与核心组件之间的动态行为,最后通过状态图细化系统的动态行为,实现在状态图中表达方面与核心组件以及方面之间的织入关系。接着进一步结合形式化语言RTL对AOSDM-UML进行实时扩展,并通过电梯例子来说明实时系统的建模过程。为了从形式化方法的角度来设计实时系统,本文根据AOP技术把系统不同的方面利用不同的形式化语言来表示,用LOTOS描述实时系统的功能性方面,而实时方面用随机实时时序逻辑SQTL表达,并通过定义迁移系统LTS和
6、事件调度器利用时间自动机来实现方面的织入。根据分布式实时系统的特性,还进一步提出把时间方面划分为确定的、不确定的和模糊的时间子方面,并且把不同的时间子方面分别利用随机实时时序逻辑(SQTL)和模糊时间Petri网(FTN)来设计,然后各个时间子方面都转化为时间自动机组合到系统中,实现系统的实时特性。关键词:面向方面编程;面向方面软件开发;实时系统;UML;形式化方法Abstract Separation of Concerns is a common, widely used principle in software engineering. It suggests that a compl
7、ex problem that is hard to understand be divided into a series of smaller problems that are less complex and easier to comprehend. These smaller problems may than be solved one at a time and finally may be put back together again to solve the big problem. Developing software this way leads to a grea
8、ter comprehensibility, maintainability, adaptability, and reusability of programs since problems are cut down to units whose size is perceptible by human minds and that may be generalized to suit various needs. Real-Time systems have been applied in every area widely, but they have many non-function
9、al requirements, such as the real-time requirement, which cross cut the whole system modules. That may cause the code tangle and scatter, make the systems hard to design, reuse and maintain, and affect performance of systems badly. AOP is a new software development paradigm, which could attain a hig
10、her level of separation of concerns in both functional and non-functional matters by introducing aspect, for the implementation of crosscutting concerns. Different aspects can be designed separately, and woven into system. This way can not only solve the architects under/overdesign dilemma of crossc
11、utting in OOP, but also solve the problems stated above.There are many implementations of aspect-oriented programs recently, such as AspectJ, but no modeling language is available for the design of AOP. So we express the AOP using UML and formal methods, and establish the Aspect-Oriented Software De
12、sign Model correspondingly to model real-time systems.Firstly, we introduce the technologies of real-time systems, aspect-oriented software design, and UML, summarize the expression of real-time in UML, and discuss the time model of UML.Secondly, we propose a new aspect-oriented software design mode
13、l called AOSD-UML which expresses the AOP by extending UML, designs profile of AOSD in the meta-model of UML, and model the aspect-oriented systems from several parts such as structure, behavior and aspect weaving and so on. For demonstration purposes, a simple sample application is modeled in this
14、work with the help of AOSD-UML. Class diagrams model the structure model of aspects, static relationship between aspects and core component, and relationship among aspects. Collaboration diagrams design dynamic behaviors of aspects and core component, while statecharts refine those behaviors and rea
15、lize the aspects weaving. In order to model real-time systems, we extend the real time into AOSDM-UML with integrating real-time logic, and an elevator example illustrates the model. Finally, in order to model real-time systems with formal methods, we design the different aspects of the system by di
16、fferent formal languages according to the aspect-oriented technology. The functional aspects can be described by LOTOS, while the non-functional aspects by SQTL. A labeled transition system and event scheduler can be defined to weave the aspects with timed automata. According to characteristic of di
17、stributed real-time systems, we separate the time aspect into three sub-aspects in advance, which are deterministic time sub-aspect, undeterministic time sub-aspect and fuzzy time sub-aspect. Those sub-aspects are designed by SQTL and FTN etc. After all the sub-aspects are implemented, they are tran
18、slated into timed automata and woven into the system, and realize the real-time feature.Keywords: AOP; AOSD; real-time systems; UML; formal methods目录摘要IAbstractI目录IIIContentsVI第一章 绪论11.1 选题的背景及意义11.2 对国内外研究现状的分析31.3 论文的主要工作及组织方式41.3.1 论文的主要内容41.3.2 论文的组织方式4第二章 相关技术62.1 实时系统(要)62.1.1 实时系统的定义及时间约束62.1
19、.2 实时系统的特征及要求82.1.3 实时系统的开发过程92.1.4 实时系统的建模方法102.1.5 实时系统的应用122.2 UML相关概述(不)132.2.1 UML简介132.2.2 UML扩展机制142.2.3 UML的实时扩展142.3 实时逻辑(RTL)概述172.4 AOP概述182.4.1 问题的提出182.4.2 AOP术语及实现原理182.4.3 AOP的横切模型232.4.4 AOP框架26第三章 时间模型303.1 基本时间模型313.2 定时机制模型333.3 时间事件模型353.3.1 时间动作363.3.2 时间事件373.3.3 时间激励373.4 时间服务
20、模型37第四章 基于UML的面向方面软件设计模型394.1 面向方面系统建模的UML框架394.2 扩展UML表达面向方面概念404.3 结构模型434.4 行为模型464.5 方面织入48第五章 实时AOSDM-UML及实例建模535.1 AOSDM-UML的时间扩展535.2 电梯控制系统例子535.2.1 结构关系545.2.2 行为关系555.2.3 织入时间方面57第六章 基于AOP的实时系统形式化建模及实例596.1 LOTOS和随机实时时序逻辑(SQTL)596.1.1 LOTOS596.1.2 随机实时时序逻辑606.2 LOTOS和SQTL转换为自动机626.3 方面的形式化
21、织入机制636.4 实例建模65第七章 实时方面的形式化建模(要)687.1 模糊时间Petri网687.2 分布式实时系统的时间方面697.2.1 确定的时间子方面697.2.2 不确定的时间子方面697.2.3 模糊时间子方面707.3 组合时间方面707.3.1 模糊时间Petri网转换为时间自动机717.3.2 时间自动机的织入727.4 实例分析73总结与展望76参考文献79攻读硕士学位期间发表的论文86独创性声明87致谢88ContentsAbstractIContentsVIChapter1 Introduction11.1 Research Background and Sig
22、nificance11.2 Related Work31.3 Contents and Structure of the Thesis41.3.1 Research Contents41.3.2 Organization of the Thesis4Chapter2 Correlative Technology62.1 Real-time Systems62.1.1 Real-time Systems and Timing Constranits62.1.2 Characteristic and Requirement82.1.3 Developing Process92.1.4 Modeli
23、ng of Real-time Systems102.1.5 Application of Real-time Systems122.2 UML Introduction132.2.1 UML Introduction132.2.2 Extension Mechanisms142.2.3 Modeling Real-Time Characteristics in UML142.3 Real-Time Logic172.4 AOP Introduction182.4.1 Shortage of OOP182.4.2 Terms and Principle of AOP182.4.3 Cross-
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 基于 UML 形式化 方法 面向 方面 实时 系统 模型 刘瑞成 毕业论文
链接地址:https://www.31ppt.com/p-3939414.html