The Meta-Object Facility (MOF)

合集下载

模型转换技术在复杂实时嵌入式系统中的应用

模型转换技术在复杂实时嵌入式系统中的应用

UML(Unified Modeling Language)是一种通用的
入式系统的功能架构 ;通过 SysML 及其扩展的 FACE 可视化建模语言,是 OMG(Object Management Group)
(Future Airborne Capability Environment)概要文件 在 1997 年发布的一个标准,但是由于 UML 更多是面向
功能架构、逻辑架构和物理架构模型,该方法通过模型
1.2 Profile 技术研究
转换技术,可以自动将 SysML、FACE Profile、MARTE
如前所述,SysML 的设计和实现方法主要是通过重
Profile 对应的嵌入式系统架构模型自动转换为对应的 用 UML 的一个子集并扩展以满足系统工程的设计需要,
AADL(Architecture Analysis and Design Language) Profile 是 UML 的一种扩展能力(它不允许创建新的元
架构模型,切实提高了模型转换的效率和准确性。
模型),目的是提供一种简单的机制,基于模型构造型的
传统绝大多数的复杂实时嵌入式系统研发模式,从 方式来扩展现有的元模型。
AADL 模型
图 1 模型转换技术实现 Fig.1 Model transformation technology implementation
62 Copyright©博看网. All Rights Reserved.
季洪新 陶福星 马洪波:模型转换技术在复杂实时嵌入式系统中的应用
2023 年第 5 期
使用 EMF 技术,在 Eclipse 中开发一个 Ecore 元模 型,用于描述复杂实时嵌入式系统功能架构的 SysML 模 型结构 XMI 文件 ;Ecore 模型生成一个解析器,该解析 器将该 XMI 文件中的表示功能架构的 SysML 模型结构 读取出来,从而在 Eclipse 中创建一个 EMF 模型 ;通过 遍历功能架构 SysML 模型对应的 EMF 模型来创建 EMF 模型中的元素到 AADL 中的元素的映射,在制定的转换 规则的基础上,先创建组件对应的 AADL 对象和 EMF 到 AADL 的映射关系,再用模型连接器来建立各个组件 之间的联系,从而得到 AADL 功能架构模型 ;同样地, 将 SysML 及 FACE Profile 的逻辑架构模型和 SysML 及

基于web的学生成绩与管理系统计算机毕业设计英文文献及中文翻译

基于web的学生成绩与管理系统计算机毕业设计英文文献及中文翻译

文档从互联网中收集,已重新修正排版,word格式支持编辑,如有帮助欢迎下载支持。

实用文档毕业设计说明书英文文献及中文翻译学专JA V A programming language and JA V A platform The Java programming language and platform have emerged as major technologies for performing e-business functions. Java programming standards have enabled portability of applications and the reuse of application components across computing platforms. Sun Microsystems' Java Community Process continues to be a strong base for the growth of the Java infrastructure and language standards. This growth of open standards creates new opportunities for designers and developers of applications and services .Applications of JavaJava uses many familiar programming concepts and constructs and allows portability by providing a common interface through an external Java Virtual Machine (JVM). A virtual machine is a self-contained operating environment, created by a software layer that behaves as if it were a separate computer. Benefits of creating virtual machines include better exploitation of powerful computing resources and isolation of applications to preventcross-corruption and improve security.The JVM allows computing devices with limited processors or memory to handle more advanced applications by calling up software instructions inside the JVM to perform most of the work. This also reduces the size and complexity of Java applications because many of the core functions and processing instructions were built into the JVM. As a result, software developers no longer need to re-create the same application for every operating system. Java also provides security by instructing the application to interact with the virtual machine, which served as a barrier between applications and the core system, effectively protecting systems from malicious code.Among other things, Java is tailor-made for the growing Internet because it makes it easy to develop new, dynamic applications that could make the most of the Internet's power and capabilities. Java is now an open standard, meaning that no single entity controls its development and the tools for writing programs in the language are available to everyone. The power of open standards like Java is the ability to break down barriers and speed up progress.Today, you can find Java technology in networks and devices that range from the Internet and scientific supercomputers to laptops and cell phones, from Wall Street market simulators to home game players and credit cards. There are over 3 million Java developers and now there are several versions of the code. Most large corporations have in-house Java developers. In addition, the majority of key software vendors use Java in their commercial applications (Lazaridis, 2003).ApplicationsJava on the World Wide WebJava has found a place on some of the most popular websites in the world and the uses of Java continues to grow. Java applications not only provide unique user interfaces, they also help to power the backend of websites. Everybody is probably familiar with eBay and Amazon have been Java pioneers on the World Wide Web.eBayFounded in 1995, eBay enables e-commerce on a local, national and international basis with an array of Web sites.You can find it on eBay, even if you didn't know it existed. On a typical day, more than 100 million items are listed on eBay in tens of thousands of categories. on eBay; the world's largest online marketplace.eBay uses Java almost everywhere. To address some security issues, eBay chose Sun Microsystems' Java System Identity Manager as the platform for revamping its identity management system. The task at hand was to provide identity management for more than 12,000 eBay employees and contractors.Now more than a thousand eBay software developers work daily with Java applications. Java's inherent portability allows eBay to move to new hardware to take advantage of new technology, packaging, or pricing, without having to rewrite Java code.Amazon has created a Web Service application that enables users to browse their product catalog and place orders. uses a Java application that searches the Amazon catalog for books whose subject matches a user-selected topic. The application displays ten books that match the chosen topic, and shows the author name, book title, listprice, Amazon discount price, and the cover icon. The user may optionally view one review per displayed title and make a buying decision.Java in Data Warehousing & MiningAlthough many companies currently benefit from data warehousing to support corporate decision making, new business intelligence approaches continue to emerge that can be powered by Java technology. Applications such as data warehousing, data mining, Enterprise Information Portals and Knowledge Management Systems are able to provide insight into customer retention, purchasing patterns, and even future buying behavior.These applications can not only tell what has happened but why and what may happen given certain business conditions; As a result of this information growth, people at all levels inside the enterprise, as well as suppliers, customers, and others in the value chain, are clamoring for subsets of the vast stores of information to help them make business decisions. While collecting and storing vast amounts of data is one thing, utilizing and deploying that data throughout the organization is another.The technical challenges inherent in integrating disparate data formats, platforms, and applications are significant. However, emerging standards such as the Application Programming Interfaces that comprise the Java platform, as well as Extendable Markup Language technologies can facilitate the interchange of data and the development of next generation data warehousing and business intelligence applications. While Java technology has been used extensively for client side access and to presentation layer challenges, it is rapidly emerging as a significant tool for developing scaleable server side programs. The Java2 Platform, Enterprise Edition (J2EE) provides the object, transaction, and security support for building such systems.Metadata IssuesOne of the key issues that business intelligence developers must solve is that of incompatible metadata formats. Metadata can be defined as information about data or simply "data about data." In practice, metadata is what most tools, databases, applications, and other information processes use to define, relate, and manipulate data objects within their own environments. It defines the structure and meaning of data objects managed by an applicationso that the application knows how to process requests or jobs involving those data objects. Developers can use this schema to create views for users. Also, users can browse the schema to better understand the structure and function of the database tables before launching a query.To address the metadata issue, a group of companies have joined to develop the Java Metadata Interface (JMI) API. The JMI API permits the access and manipulation of metadata in Java with standard metadata services. JMI is based on the Meta Object Facility (MOF) specification from the Object Management Group (OMG). The MOF provides a model and a set of interfaces for the creation, storage, access, Metamodel and metadata interchange is done via XML and uses the XML Metadata Interchange (XMI) specification, also from the OMG. JMI leverages Java technology to create an end-to-end data warehousing and business intelligence solutions framework.Enterprise JavaBeansA key tool provided by J2EE is Enterprise JavaBeans (EJB), an architecture for the development of component-based distributed business applications. Applications written using the EJB architecture are scalable, transactional, secure, and multi-user aware. These applications may be written once and then deployed on any server platform that supportsJ2EE. The EJB architecture makes it easy for developers to write components, since they do not need to understand or deal with complex, system-level details such as thread management, resource pooling, and transaction and security management. This allows for role-based development where component assemblers, platform providers and application assemblers can focus on their area of responsibility further simplifying application development.Data Storage & AccessData stored in existing applications can be accessed with specialized connectors. Integration and interoperability of these data sources is further enabled by the metadata repository that contains metamodels of the data contained in the sources, which then can be accessed and interchanged uniformly via the JMI API. These metamodels capture the essential structure and semantics of business components, allowing them to be accessed and queried via the JMI API or to be interchanged via XML. Through all of these processes, the J2EEinfrastructure ensures the security and integrity of the data through transaction management and propagation and the underlying security architecture.To consolidate historical information for analysis of sales and marketing trends, a data warehouse is often the best solution. In this example, data can be extracted from the operational systems with a variety of Extract, Transform and Load tools (ETL). The metamodels allow EJBs designed for filtering, transformation, and consolidation of data to operate uniformly on data from diverse data sources as the bean is able to query the metamodel to identify and extract the pertinent fields. Queries and reports can be run against the data warehouse that contains information from numerous sources in a consistent, enterprise-wide fashion through the use of the JMI API.Java in Industrial SettingsMany people know Java only as a tool on the World Wide Web that enables sites to perform some of their fancier functions such as interactivity and animation. However, the actual uses for Java are much more widespread. Since Java is an object-oriented language, the time needed for application development is minimal.In addition, Java's automatic memory management and lack of pointers remove some leading causes of programming errors. Most importantly, application developers do not need to create different versions of the software for different platforms. The advantages available through Java have even found their way into hardware. The emerging new Java devices are streamlined systems that exploit network servers for much of their processing power, storage, content, and administration.Benefits of JavaThe benefits of Java translate across many industries, and some are specific to the control and automation environment. Java's ability to run on any platform enables the organization to make use of the existing equipment while enhancing the application.IntegrationWith few exceptions, applications running on the factory floor were never intended to exchange information with systems in the executive office, but managers have recently discovered the need for that type of information. Before Java, that often meant bringingtogether data from systems written on different platforms in different languages at different times. Integration was usually done on a piecemeal basis, once it worked, was unique to the two applications it was tying together. Additional integration required developing a brand new system from scratch, raising the cost of integration.ScalabilityAnother benefit of Java in the industrial environment is its scalability. Even when internal compatibility is not an issue, companies often face difficulties when suppliers with whom they share information have incompatible systems. This becomes more of a problem as supply-chain management takes on a more critical role which requires manufacturers to interact more with offshore suppliers and clients. The greatest efficiency comes when all systems can communicate with each other and share information seamlessly. Since Java is so ubiquitous, it often solves these problems.Dynamic Web Page DevelopmentJava has been used by both large and small organizations for a wide variety of applications beyond consumer oriented websites. Sandia, a multiprogram laboratory of the U.S. Department of Energy's National Nuclear Security Administration, has developed a unique Java application. The lab was tasked with developing an enterprise-wide inventory tracking and equipment maintenance system that provides dynamic Web pages.ConclusionOpen standards have driven the e-business revolution. As e-business continues to develop, various computing technologies help to drive its evolution. The Java programming language and platform have emerged as major technologies for performing e-business functions. the time needed for application development is minimal. Java also encourages good software engineering practices with clear separation of interfaces and implementations as well as easy exception handling. Java's automatic memory management and lack of pointers remove some leading causes of programming errors. The advantages available through Java have also found their way into hardware. The emerging new Java devices are streamlined systems that exploit network servers for much of their processing power, storage, content, and administration.。

基于SysML和Modelica的复杂机电产品系统设计与仿真集成

基于SysML和Modelica的复杂机电产品系统设计与仿真集成

第30卷第4期计算机辅助设计与图形学学报Vol.30No.4 2018年4月Journal of Computer-Aided Design & Computer Graphics Apr. 2018基于SysML和Modelica的复杂机电产品系统设计与仿真集成周书华1), 曹悦2), 张政2), 刘玉生2)*1) (浙江经济职业技术学院汽车技术学院杭州 310018)2) (浙江大学CAD&CG国家重点实验室杭州 310058)(ysliu@)摘要: 系统仿真是辅助系统设计的一种重要手段, 如何将系统设计与系统仿真有机结合, 从而支持设计工作的高效开展, 是一项重要的研究课题. 针对这一问题, 基于系统工程标准建模语言SysML和多领域仿真建模语言Modelica提出一套系统层设计与仿真集成方法. 首先基于元对象机制分析和比较了SysML和Modelica的元模型; 然后以Modelica元模型为基准, 构造了面向Modelica的SysML扩展包M-Design; 最后依据扩展的SysML和Modelica 元模型定义了二者之间的映射规则, 从而实现SysML设计模型向Modelica仿真模型的自动转换. 以储水池系统为例, 展示了复杂机电系统的设计和仿真的集成过程.关键词: 基于模型的系统工程; SysML; Modelica; 设计与仿真集成; 模型转换中图法分类号: TP391.41 DOI: 10.3724/SP.J.1089.2018.16520System Design and Simulation Integration for Complex Mechatronic Products Based on SysML and ModelicaZhou Shuhua1), Cao Yue2), Zhang Zheng2), and Liu Yusheng2)*1) (School of Automotive Technology, Zhejiang Technical Institute of Economics, Hangzhou 310018)2) (State Key Lab of CAD&CG, Zhejiang University, Hangzhou 310058)Abstract: System simulation is one of the important methods to assist the system design. How to combine them in order to improve the efficiency of the design process is a challenging research topic. To this end, we proposed a novel system design and simulation integration method based on SysML, which is the standard modeling lan-guage for systems engineering, and the multi-domain simulation modeling language Modelica. Specifically, firstly, we analyzed and compared the metamodels of SysML and Modelica based on the Meta-Object Facility (MOF);then, according to the metamodel of Modelica, we constructed the M-Design profile by extending from SysML;finally, we defined the mapping rules between the two languages so that the automated transformation between the system design model in SysML and system simulation model in Modelica can be achieved. We used the tank system as a case study to illustrate the integration process.Key words: model-based systems engineering; SysML; Modelica; design and simulation integration; model transformation收稿日期: 2017-06-15; 修回日期: 2017-09-08. 基金项目: 国家重点研究计划项目(2016YFD0400301); 国家自然科学基金(61572427, 61772247). 周书华(1963—), 男, 学士, 高级讲师, 主要研究方向为数字化设计、智能控制; 曹悦(1986—), 女, 博士研究生, 主要研究方向为模型驱动设计; 张政(1990—), 男, 硕士, 主要研究方向为模型驱动设计; 刘玉生(1970—), 男, 博士, 教授, 博士生导师, 论文通讯作者, 主要研究方向为模型驱动设计、CAD/CAE/CAM集成.第4期周书华, 等: 基于SysML和Modelica的复杂机电产品系统设计与仿真集成 729复杂机电产品通常涉及机械、电子、电力、液压、热和控制等诸多领域和学科, 由于系统规模的日益庞大, 以及学科间的紧密耦合, 复杂系统的设计工作变得越来越困难. 基于模型的系统工程(model-based systems engineering, MBSE)[1]为复杂系统的建模与设计提供了解决方案, 它采用模型对系统进行描述, 具有可重用、无歧义、易理解、易复制传播等诸多优点, 因此, 逐渐受到工业界的重视. 当前, 基于模型的系统工程采用系统建模语言(systems modeling language, SysML)①作为其标准建模语言, 它在统一建模语言(unified modeling language, UML)的基础上扩展而来, 并添加了针对系统工程的新的元素, 例如, 新增加的表示系统需求的需求图, 以及在UML类图和对象图基础上扩充而来的表示系统架构的模块定义图和模块内部图, 而对于一些针对软件系统建模的图如表示软件的具体实现的组件图和部署图, 则不予保留.系统设计是系统工程中很重要的一环. 基于SysML进行系统设计能够从更高的抽象层次对系统所包含的多学科复杂子系统进行综合考虑, 并以规范、统一的方式对系统设计进行描述, 从而形成系统设计模型. 然而, 由于系统的复杂性和异构性, 如何保证设计模型的正确性和完备性是系统设计成败的关键因素. 仿真是系统核验的一种重要手段. Modelica语言②在综合多种单领域仿真建模语言的基础上, 引入面向对象的先进思想, 形成一种高级的陈述式语言, 从而成为多领域仿真实质上的标准建模语言.在复杂机电系统设计过程中, 采用仿真对系统设计进行验证, 并将修改结果反馈给设计模型, 这是对系统设计进行验证和优化的主要工作方式. 为支持系统设计的动态仿真, 本文基于SysML与Modelica语言, 提出了一套系统设计与仿真集成的方法, 其核心思想是在SysML设计模型与Modelica仿真模型之间建立完善的映射关系, 使得设计模型可以自动转换为仿真模型. 为实现这一目标, 本文首先分析和比较了SysML与Modelica 元模型的差异; 并以Modelica元模型中的相关模型元素为基础, 对SysML进行扩展, 创建了M-Design 扩展包, 以支持兼容Modelica的设计建模; 最后, 在M-Design/SysML设计模型与Modelica仿真模型之间建立映射关系, 以实现二者之间的自动转换. SysML与Modelica模型的自动转换, 使得系统设计人员可将系统设计模型自动转换为系统仿真模型并进行仿真. 基于仿真结果, 设计人员可以对系统设计进行验证和优化, 提高系统设计工作的质量和效率. 需要说明的是, 本文所针对的复杂机电产品是指Modelica可建模仿真的系统, 它的系统行为由代数方程和常微分方程来描述. 由于Modelica不支持偏微分方程的建模和仿真, 因此对于系统行为中包含偏微分方程的情况, 可以通过对Modelica进行扩展[2]或将偏微分方程转化为常微分形式[3]等方法来解决.1相关工作在系统层设计与仿真集成的相关研究工作中, Cao等[4]提出了一种基于SysML的统一行为建模语言, 并与Matlab/Simulink进行集成. 但是, Mat-lab/Simulink偏向于控制系统建模与仿真, 对物理系统仿真的支持相对Modelica较为薄弱, 因此, 它不适合作为系统仿真的支撑平台.Schamai等[5]提出的ModelicaML是基于Mod-elica的SysML扩展, 它为SysML与Modelica集成提供了较为完备的解决方案. 然而, 该语言并没有完整支持的Modelica的所有语法标准, 并且对某些模型元素的表达不够友好.作为对上述方法的补充, Schamai等[6]提出了将UML状态机图转换为Modelica模型的方法, 它将状态机图作为离散和连续行为混合建模的载体, 通过在状态转换中添加注释来表述连续行为. 然而, 这种文本化的连续行为描述方式缺乏形式化的模型表示, 因此无法对模型进行有效地管理和追溯.对象管理组织(object management group, OMG)提出了基于QVT的SysML和Modelica映射方法③, 并给出了基于转换元模型的SysML4Modelica扩展包定义. 该扩展为SysML和Modelica之间的映射提供了一种新的思路, 但该扩展的定义并不完善, 而且在关于方程式和算法的定义上也有待商榷. 另外, 文章采用的QVT方法不支持模型间的双向转换, 而且对于模型增量式变动的转换支持也十分有限.① /spec/SysML/1.2/② https:///documents/ModelicaSpec33_withRevisionMarks.pdf③ /spec/SyM/1.0/730 计算机辅助设计与图形学学报第30卷Gauthier等[7]使用OMG的SysML4Modelica 扩展包, 并采用ATL (ATL transformation language, ATL)[8]将SysML模型转换到Modelica模型, 以验证设计模型. 虽然他们使用了新的映射方法, 但是该方法受制于OMG的SysML4Modelica扩展包, 使得其对于Modelica语法的描述不够完善, 一些语法的描述过于生硬.李新光等[9]提出了基于SysML的可视化模型转换方法, 其并没有对UML/SysML进行扩展, 而是在SysML已有模型元素与Modelica之间建立映射关系. 但是, 由于SysML语言不具备针对复杂机电系统的领域特定语义, 使得二者之间的对应关系过于粗略, 难以维护模型间的细粒度的对应关系.综上所述, 当前复杂机电系统设计和仿真集成研究存在以下3个问题: 面向的仿真语言和平台的非通用性; 对于仿真语言的某些语义构造缺乏形式化表达; 采用的转换实现方法有局限性, 难以维护和扩展.2 SysML与Modelica元模型分析虽然SysML和Modelica都是系统工程领域的建模语言, 但是由于两者的使用场景和目的的不同, 使得它们有着较大的差异. SysML模型使用图形化的符号语言描述系统, 侧重系统的表示、设计, 不具备直接编译运行的能力; 而Modelica模型使用陈述式的编程语言描述系统, 支持编译运行, 擅长对系统设计进行仿真验证.虽然SysML和Modelica语言在表达形式上十分不一致, 但是两者也存在许多共同点.(1) 它们都是面向对象的语言, 具备面向对象的基本特征. 例如, 在SysML中使用模块对对象进行封装, 而在Modelica中, 类是对象建模的基本单元, 因此, 二者之间存在隐含的对应关系.(2) 它们都能够对复杂机电系统中涉及的多个领域进行统一建模. SysML提供简单且强大的模型元素, 用于解决广泛的系统工程问题, 如描述需求、结构、行为、配置和属性约束等; Modelica主要用于物理系统的建模, 除了拥有完备的表达系统及组件结构和行为的能力之外, 还以标准库的形式提供了广泛的基础设施, 如模拟、数字、机械、电子、电力、液压、热、控制等诸多领域的构件.(3) SysML提供了强大的扩展机制, 使用户能够针对特定的领域定义领域相关建模语言, 这为SysML与Modelica集成提供了最根本的支持.由于SysML和Modelica是2种异构的语言, 因此无法直接对它们的模型进行映射转换. 基于元对象机制(meta object facility, MOF)①, 本文给出了二者之间映射的解决思路. MOF最早由OMG提出, 它通过4层元模型架构, 即元元模型、元模型、模型、信息4个层次对各种建模语言的语法和语义进行精确描述. 通过抽象出建模语言的元模型,可以在元模型层对建模语言的模型元素进行对应, 从而指导两者在模型层的映射, 这是SysML与Modelica集成的基本思路, 遵循这一思路, 本文首先提取了SysML和Modelica语言的元模型, 之后, 分析了二者元模型之间的对应关系.2.1 SysML语言架构如图1所示, SysML语言包括9种图, 分别是块结构图(block definition diagram, BDD)、内部块图(internal block diagram, IBD)、参数图(parametric图1 SysML语言架构① /spec/MOF/2.5/第4期周书华, 等: 基于SysML和Modelica的复杂机电产品系统设计与仿真集成 731diagram, PAR)、包图(package diagram, PKG)、活动图(activity diagram, ACT)、用例图(use case diagram, UC)、序列图(sequence diagram, SEQ)、状态机图(state machine diagram, STM)和需求图(requirement diagram, REQ), 支持需求、结构和行为这3种形式的系统表达. 需求模型强调需求之间的追溯关系以及设计对需求的满足关系; 结构模型强调系统的层次以及对象之间的相互连接关系; 行为模型强调系统中对象的行为, 包括它们的活动、交互和状态历史.在设计和仿真集成的过程中, 只有结构模型和行为模型是必要的. 其中, 结构模型主要采用BDD与IBD进行描述, 它们分别展示了系统的组成视图和内部结构视图; 而为了仿真的需求, 行为模型需要采用形式化的描述方法, 其中PAR主要用于展示连续行为视图, 而STM展示离散行为视图. SysML中的其他图不能够为仿真直接提供有效信息, 其中, REQ主要以文字化的形式对需求进行描述, 因此无法直观抽取仿真有效信息; ACT与UC对系统行为的描述较为模糊, 因此, 它们不适合作为仿真模型的来源; SEQ主要展示了元素之间的交互而非单个元素的行为, 因此, 它不作为仿真模型中的行为输入; 包图主要用于模型管理, 这与仿真模型的生成无关. 因此, 本文方法主要依赖于BDD, IBD, PAR和STM这4个图来生成仿真模型.BDD以模块为基本单元对模块及模块之间的关系进行定义. IBD通过模块内部成分及其之间的连接关系描述单个模块的内部结构. PAR用于定义块属性之间的参数关系, 从而支持性能、可靠性、可用性等多种工程分析. STM通过状态及状态之间的转换描述系统或子系统对外部事件的响应. SysML语言的元模型在OMG组织给出的SysML 语言规范中有详细的说明, 本文在此不做赘述. 2.2 Modelica语言元模型Modelica组织在定义Modelica语言时, 给出了详细的语法规定, 但是并没有对语法进行抽象表达. 因此, 本文依据Modelica语言规范和MOF 语法, 构建Modelica的元模型. 需要指出的是, 元模型的抽象并不是唯一的, 本文给出的定义方法只是其中之一. 另外, 由于Modelica语法比较复杂, 本文只讨论基础内容的元模型, 一些高级特性将忽略.2.2.1 类类是Modelica建模中的基本结构单元, 本质上所有的Modelica元素都是类, 如模型构件以及各种数据对象. 类以属性的方式定义对象的结构, 同时可以包含陈述式的方程, 以及常规的过程式的算法代码, 以描述对象的行为. 图2展示了类的元模型.图2 Modelica类元模型2.2.2 组件组件表示类的实例, 组件的定义声明了其类型、访问限制、变化性、数据流和其他属性, 用于描述类中的任何输入输出, 以及常量的、参数的或离散的组成部分. 组件的元模型定义如图3所示.2.2.3 方程方程在Modelica中用于描述系统表现的行为. 根据其出现的语境, 方程可以分为3类: 声明方程, 包括初始化和修改方程, 用于指定变量、常量或参数的值; 连接方程, 表示端口之间的连接关系; 绑定方程, 用于指定变量之间的等价关系. 方程的元模型定义如图4所示.2.2.4 算法虽然方程非常适合于物理建模, 但是对于计算过程的描述, 用算法表达会更为方便.算法在概念上是保持在一起的代码片段, 算法中的语句依据它们出现的顺序被依次执行. 每当算法被调用时, 出现在赋值运算符左侧的所有变量依次被初始化. 图5展示了算法的定义, 它由表达式、函数调用和组件组成.732计算机辅助设计与图形学学报 第30卷图3 Modelica 组件元模型图4 Modelica 方程元模型图5 Modelica 算法元模型2.3 SysM L 与Modelica 元模型映射关系SysML 与Modelica 元模型的元素之间存在较为直观的对应关系. 在结构模型方面, Modelica 模型使用类、模型以及类的子类进行模型定义; 在SysML 中, 有模块与之对应. SysML 和Modelica 都支持子模型定义, 如Modelica 的组件与SysML 的组成部分属性相对应. Modelica 和SysML 都有端口和连接器的概念, 如在Modelica 中分别用 连接器和连接表示, SysML 用端口和连接器分别 表示.Modelica 模型的行为部分包括方程和算法. 在SysML 中, 约束可用于描述客观规律, 不透明行为可用于描述执行过程. 因此, SysML 中的约束与不透明行为可以与Modelica 中的方程和算法相对应.3 面向Modelica 的SysML 扩展基于上述SysML 与Modelica 元模型之间的对应关系, 可以对SysML 已有模型元素进行扩展, 从而定义符合Modelica 语义和语法的新的模型元素. 基于这些模型元素,可以在SysML 平台上创建兼容Modelica 标准的设计模型.通常, 实现SysML 扩展的方式有2种: (1)重量级. 通过定义MOF 元类来表达UML/SysML 中不存在的模型元素; (2)轻量级. 通过在UML/SysML 已有模型元素的基础上定义版型来扩展其语义. 由于第2种方式具有更好的通用性, 因此本文选择第2种扩展方式, 通过定义新的代表Modelica 模型元素的版型, 实现面向Modelica 的SysML 扩展. 这些新定义的版型共同组成M-Design 扩展包, 它包括结构和行为2个子扩展包, 其架构如图6所示.3.1 结构模型扩展模型是Modelica 语言中表示模型定义的最基础的类. 在其基础上, 一些专用类型被定义出来, 从而表示更为精确的语义, 如连接器表示组件之间的连接接口、记录表示数据结构、模块用于兼容基于框图的因果建模、函数用于支持过程式建模等. 这些类型均被定义为相应的SysML 版型, 由对应的UML 或SysML 模型元素扩展而来. 例如,第4期周书华, 等: 基于SysML和Modelica的复杂机电产品系统设计与仿真集成 733图6 M-Design扩展包架构«MoModel»用于描述Modelica的模型, 它由SysML 的模块扩展而来; «MoRecord»由SysML中的数据类型扩展而来. «MoClass»是所有模型定义构造型的父类, 它拥有3个布尔类型的标签: isEncapsu-lated, isPartial和isFinal; 分别表示该类是否是封装类、是否是抽象类及能否被修改或重定义. «Mo-Connector»对应于Modelica中的连接器, 它拥有一个名为expandable的布尔类型的标签表示接口类是否可以被扩展.Modelica模型的组成成分采用组件来表示, 它是Modelica类或模型的实例. 在SysML中, 模型组成成分对应于模块中的属性, 包括组成部分属性、值属性以及端口. 根据Modelica中组件所实例化的类的类型,可以确定它应当映射为的SysML 中属性类型: 如果组件是类、模型或模块的实例, 则被映射为组成部分属性; 如果为记录或类型的实例, 则对应于值属性; 如果为连接器的实例, 则对应于端口. 这3种类型的组件分别用«MoPartProperty», «MoValueProperty»和«MoPort»版型进行表示. 这些版型拥有一些标签值, 用于更进一步描述Modelica语义. 例如, scope用于跨越定义域的变量名称引用, 可取值为inner, outer, inner-outer或none; variability用于表示变化类型, 表示某个值属性是如何随时间变化的, 可取值为constant, parameter, discrete或continuous; flowType 用于表示组件的流属性为单向、双向或无, 它的取值可以是flow, stream或none; causality用于指定因果, 表示某个数值或端口是输入或输出, 可取值为input, output或none.在Modelica中, 连接表示2个连接器之间的连接关系, 它隐含基尔霍夫定理, 即势变量相等, 流变量之和为零. 在SysML中, 连接器用于连接模块的端口, 但不具备基尔霍夫定理的语义约束, 因此, 本文定义了«MoConnection»用于精确描述Modelica中的连接.3.2行为模型扩展方程和算法是Modelica中用于定义模型行为的主要元素. Modelica的方程主要分为3类: 绑定、连接和声明. 绑定方程用于表示参数传递, 连接方程用于指定«MoPort»之间的连接关系; 声明方程包括初始化方程和语句式方程. 在SysML中, 内部块图和参数图中的连接器可以分别用于表达连接和绑定方程, 约束块中的约束属性可以表达声明方程. 因此, 本文分别定义了3个构造型来表示: «MoConnectEquation»扩展自连接器元类; «Mo-BindingEquation»继承自绑定连接器版型; «MoDe-clareEquation»扩展自约束, 并带有指定其是否为初始方程的标签.除了声明方程类型, 还需要对方程的内部逻辑进行描述. Modelica的方程声明中, 可以同时描述时间连续行为以及基于事件的离散行为; 而SysML中行为建模的相关元素并不具备这一能力. 为此, 基于有序参数图[4]概念, 本文将状态机图中的状态和转移引入到参数图中, 以实现离散和连续行为的统一表达. 其中«MoDiscrete»和«MoContinuous»继承自约束块, 用于区分系统的离散和连续行为. 针对离散行为, 本文定义了«MoState»和«MoAction», 分别继承自约束块中的约束属性, 用于表示系统的离散状态和状态下的行为; «MoTransition»扩展了UML的依赖元模型, 用于表示离散状态间的状态转移, 它拥有条件这个标签, 表示触发状态转移的布尔表达式.与方程不同, Modelica的算法主要以过程式的方式对模型行为进行描述. 本文在SysML中的不透明行为元类的基础上, 定义了«MoAlgorithm»版型, 以支持算法的建模.4设计与仿真模型的自动转换基于M-Design扩展包, 可以使用SysML语言对系统进行设计建模. 由于M-Design元模型与Modelica之间存在对应关系, 使得基于扩展后的SysML所建立的设计模型可以通过模型转换自动生成基于Modelica的仿真模型. 模型转换的核心是定义源模型与目标模型的元模型之间的映射734 计算机辅助设计与图形学学报第30卷规则, 通过元模型之间的映射规则, 指导模型间的自动转换.4.1映射规则的定义由于M-Design扩展包中的大部分模型元素与Modelica语言中的模型元素存在直接的对应关系, 例如, MoModel对应于模型, MoConnection对应于连接器. 对于这种元素, 可以通过定义模型映射规则, 采用模型映射的方法实现二者之间的转换. 而离散和连续行为模型的相关模型元素在Modelica语言中不存在直接对应物, 需要对其进行特殊处理.4.1.1 模型映射如前所述, M-Design/SysML与Modelica语言中的大部分元素之间存在直观的对应关系. 然而, 在描述模型映射规则时, 仅有元模型之间的对应关系还不足以完整描述具体的转换操作和实现过程, 需要定义具体的规则来指导每一个转换的实现. 本文抽象出了转换规则的模板, 并形式化地表达为F(S, O, P s, D, C, P); 其中, S是源元类的实例, O是目标元类的实例, P s是源元类实例的属性. 如果属性是基本类型(如整型、实型), 则指定目标元类的实例也拥有相同的类型; 如果属性是枚举类型, 那么需要在目标语言中构造相同的枚举类型; 如果属性是类(引用)类型, 那么需要调用该类型对应的源元类转换规则实施转换. D是源元类实例的依赖条件, 待转换的模型可能是其他模型属性, 只有当其所属模型存在转换时, 当前转换才能进行. C是约束, 表示该转换规则实施时应该满足的条件, 只有条件满足时转换规则才能实施. 约束一般分为类型约束、值约束和从属约束, 类型约束指源元类实例只能选择特定的类型, 值约束指源元类实例值的取值范围, 从属约束指源元类的实例必须是特定父类型的实例的属性.P是优先级, 表示规则的优先级. 在源元类和目标元类之间可能存在多条映射规则, 每条映射规则都有不同的依赖条件和约束, 必须根据优先级高低的顺序依次判断约束是否满足, 直到找到满足约束条件的转换规则, 如果未找到, 那么表示转换失败. 表1给出了一些映射规则的示例.表1映射规则示例S OP s D CP MoModel Model MoPart无符合Modelica的模型约束 1MoPart Component MoModel类型是MoClass, MoModel或MoBlock 1MoDeclare Equation Declare Equation MoClass 必须用于约束块 14.1.2 混合行为映射如前所述, 为了实现离散和连续行为的统一建模, 本文将状态机图的状态和转移融入参数图, 而这些模型元素与Modelica元模型之间并无直接对应关系, 因此需要特殊处理. 通过分析混合行为模型, 可以看出, 对于映射有指导意义的是初始状态(通过声明«MoDiscrete»构造型的isInitial属性来指定)和状态转移条件«MoTransition». 初始条件确定了方程式的所有初始变量定义; 状态转移条件则定义了方程式中的when语句, 当执行when 语句时, 就是离散状态发生转移时.基于这一基本思想, 本文设计针对离散和连续行为模型的映射算法, 其步骤如下:Step1. 确定初始状态, 获取参数初始值.Step2. 从该状态出发, 根据«MoTransition»构造when语句.Step3. 移动到下一状态, 初始化该状态的参数, 重复上述步骤, 直到回到初始状态.图7展示了一个弹球的混合行为模型.图7 弹球的混合行为模型这是一个经典的离散和连续行为混合的物理模型. 其中, 在above ground状态下, 小球做连续运动, 其运动情况符合由方程der(h)=v以及der(v)= g指定. 当小球撞击地面后反弹时, 小球做离散跳变, 其行为由方程v=−v来描述.基于上述算法步骤, 本文可以将上述混合行为模型转换生成Modelica模型中小球模型的方程.第4期周书华, 等: 基于SysML和Modelica的复杂机电产品系统设计与仿真集成 735其内容如下:model BouncingBallparameter Real g = 9.8;Real v(start=0);Real h(start=0.9);equationder(h)= v;der(v)= −g;when h<0 thenreinit(v, −v);end when;end BouncingBall;4.2映射的实现本文采用ATL实现基于M-Design的SysML 设计模型到Modelica仿真模型的转换. 该框架提供了模型转换语言以及相应的工具包, 其模型转换的基本思想如图8所示.图8 基于ATL的模型转换实现思路用户基于M-Design扩展包所创建的设计模型符合M-Design/SysML元模型, 是整个转换的源模型; 而基于Modelica的仿真模型符合Modelica元模型, 是转换的目标模型. 通过在M-Design元模型与Modelica元模型之间建立ATL转换规则, 则可以实现二者模型之间的转换. 而无论是源或者目标元模型, 还是ATL转换规则, 均符合ECORE 这一元元模型.在具体实现时,首先需要定义M-Design/SysML 以及Modelica的ECORE元模型.之后, 采用ATL语言建立2个元模型的对应模型元素之间的映射规则. 以下展示了从SysML 中的MoModel转化为Modelica中的模型的ATL 规则(部分)示例.rule block2model {froms: UML!Class (s.oclIsTypeOf(UML!Class) ands.hasStereotype(‘MoModel’)) tot: Modelica!Mode l (name←s.qualifiedName) …}基于这些ECORE元模型以及ATL映射规则, ATL转换引擎便可将任何基于M-Design扩展包所建立的SysML设计模型转换为Modelica仿真模型.5实例本文以储水池系统[10]为例来说明SysML设计与Modelica仿真的集成过程.储水池系统是一个经典的非特定领域的物理问题系统. 如图9所示, 该系统包括1个水源, 以及连接在一起的2个储水池. 每个储水池都有1个水深传感器和1个比例积分(proportional integral, PI)控制器, 用于将水池中的水调整到参考水平位置. 当水源用水填充第1个水池时, PI控制器根据其实际水平来调节水量流出, 流入第2个水池, 第2个水池也通过PI控制器调节其水量.采用M-Design扩展包,可以在SysML建模环境中建立该系统的设计模型. 本文使用MagicDraw 平台进行建模, 该平台是当前SysML主流建模平台之一.本文首先建立系统的顶层视图, 它由1个水源、2个储水池、2个PI控制器组成. 系统的BDD 如图10a所示, 它展示了系统的组成模块, 它们均由MoModel来表示; 模块之间的连接关系如图10b所示的IBD来描述.接着, 本文对系统中的每一个模块进行详细建模. 例如, 图11展示了PI控制器的结构模型. 该控制器包括一个输出控制和一个出错控制方程, 还包含一个PI连续控制器子模块.PI控制器的行为模型由图12所示PAR所描述, 该图详细展示了描述PI控制器行为的各种方程的定义以及方程之间的参数传递关系.基于所定义的ATL转换规则, 使用ATL引擎, 可以将上述设计模型转换为基于Modelica的仿真模型. 该模型的部分内容如下:图9 储水池系统示意图。

【软件学报】_模型驱动_期刊发文热词逐年推荐_20140727

【软件学报】_模型驱动_期刊发文热词逐年推荐_20140727
2008年 序号 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
科研热词 需求驱动 聚合 目标 用户界面 模型检测 模型 极小不可满足 智能agent 抽象精化 开发方法 工具箱 信息可视化 人机交互 主动实体 bdi模型 agent编程语言 agent结构 agent协作
2012年 序号 1 2 3 4 5 6
科研热词 推荐指数 软件体系结构 1 组合转换 1 模型驱动开发 1 模型驱动 1 模型转换 1 mof(meta-object facility) 1
2013年 序号 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
推荐指数 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
2009年 序号 1 2 3 4 5 6 7 8
科研热词 软件体系结构 语义描述 模型驱动开发 模型驱动工程 模型转换 形式化方法 异构性 marte(modeling and analysis of real time
科研热词 领域特定建模 需求分析 运行时维护与演化 运行时体系结构 软件可信性 转换语言 踪迹驱动 系统设计 笔式用户界面 用户界面描述语言 用户界面开发 模型驱动软件工程 模型驱动体系结构 模型驱动 模型转换 旁路攻击 指令cache计时攻击 执行语义 同步多线程 可信性需求 xml rsa密码算法
推荐指数 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5
2014年 科研热词 缓存网络 缓存协同 缓存 内容中心网络 信息中心网络 推荐指数 1 1 1 1 1
2011年 科研热词 高级加密标准 面向服务的体系结构 面向方面 远程攻击 进化方程 访问驱动 设计 行为调控 自动机 网络 网格计算 程序设计复杂性 离散粒子群算法 模型驱动体系结构 模型 期货 并发 嵌入式系统 安全融合模型 多线程 均匀分布 场景规约 可靠性 双目标优化 依赖任务调度 事件驱动 业务流程模型转换 web服务 stack-ripping qvt petri网 openssl cache计时攻击 bpel 推荐指数 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

元模型

元模型

元模型――来自百度百科是关于模型的模型。

这是特定领域的模型,定义概念并提供用于创建该领域中的模型的构建元素。

例如,可以将 SPEM 视为流程工程元模型。

四层元模型体系结构采用元模型驱动的体系结构对于企业建模有重要价值,它解决了产品数据一致性与企业信息共享问题。

元建模理论是从80年代后期发展起来的,虽然起步晚,但发展速度很快。

到目前为止,为了不同的目的,已经定义了很多元元模型和元模型,例如最早由EIA(电子工业协会)定义的CIDF(CASE Data Interchange Format)元元模型,OMG(对象管理组织)定义的MOF(Meta Object Facility)元元模型等。

这些元元模型的建立都是以经典的四层元数据体系结构为基础的。

四层元模型是OMG组织指定的UML的语言体系结构。

这种体系结构是精确定义一个复杂模型语义的基础。

除此之外,该体系结构具有,通过递归地将语义应用到不同层次上,完成语义结构的定义,为UML的元模型扩展提供体系结构基础,为UML元模型实现与其他的基于四层元模型体系结构的标准相结合提供体系结构基础。

OMG提出的MOF是一个标准。

为了描述某一特定的模型,需要描述组成该类模型的建模结构集,MOF能对建模结构进行描述。

MOF的4层元建模架构提供一组建模元素以及使用这些元素的规则[21]。

典型的元模型结构可以描述为:实例层、模型层、元模型层和元元模型层。

每一层描述如下[22]:1.信息层(information layer)信息是由我们希望描述的数据组成,这些数据通常是一些用户数据(user data),主要职责是描述信息领域中的详细信息。

2.模型层(model layer)模型层是由元数据组成,元数据是描述信息层的数据,元数据的集合被称作为模型。

模型层的主要职责是为描述信息层而定义的一种“抽象语言”(即没有具体语法或符号的语言)。

信息层的数据,即用户数据,是模型层的一个实例。

MDA概述

MDA概述

MDA,可以理解为中国移动手机桌面助理软件,适用于很多手机玩家;也可以理解为模型驱动架构。

它是由OMG定义的一个软件开发框架。

. MDA(MAIL DELIVERY AGENT)从MTA取得邮件并传送至邮件接受者的邮箱。

常见的MDA通常和MUA合二为一.MDA(Mobile Desktop Assitant)是中国移动手机桌面助理的英文缩写,它是中国移动为提高用户服务而推出的一款集短信、彩信、联系人管理、话费查询等功能在内的软件工具。

中国移动手机桌面助理(简称MDA)是中国移动最新推出的一款集短信、彩信、联系人管理、话费查询等强大功能于一体的通讯软件。

提供安全稳定的短信、彩信服务;短信定时发送功能;强大的彩信编辑功能;创意无穷的彩信文字;简约快捷的通讯录管理;方便的用户话费查询等。

手机桌面助理通过个人电脑的优势将您从手机终端解脱出来,您不用费力在手机上一个一个的打字,不用担心手机里的图片无法编辑剪裁,不用再登录网站查话费,一切都由手机桌面助理帮您完成。

中国移动全球通、动感地带和神州行(不包括北京,北京神州行暂不能开通)用户均可注册使用MDA。

MDA客户端软件免费使用,无任何包月费用;·发送短信:按0.10 元/条收费;·接收短信:接收短信免费,该短信的回复方按照移动品牌的短信资费标准收费;·发送普通彩信:按0.50元/条收费(北京、山西、江苏、安徽地区按0.30元/条收费);·发送福娃彩信:按0.30/条收费。

运行环境:中文Windows2000/Windows2003/WindowsXP2.Model Driven Architecture模型驱动架构自从2001年被OMG(Object Management Group 国际对象管理集团)提出以后,"随风潜入夜,润物细无声",未见轰轰烈烈宣传,各大厂商却惊人一致地争相跟进,关于MDA 的话题转眼之间在网络上也如火如荼地繁荣起来了。

给对象导管子16种方法

给对象导管子16种方法

给对象导管子16种方法对象导管子(Object Management Group,简称OMG)是一个国际性的计算机标准化组织,成立于1989年,其目标是促进和发展面向对象技术的标准化,以便实现不同平台和系统之间的互操作性。

OMG定义了丰富的标准,涵盖了软件开发的方方面面。

在本文中,我将介绍OMG定义的对象导管子的16种方法。

1. UML(Unified Modeling Language):UML是一种用于软件系统建模的标准化语言,OMG定义了UML的规范。

UML提供了一套丰富的图形符号和工具,帮助开发人员在需求分析、设计和实现过程中进行可视化建模。

3. MOF(Meta Object Facility):MOF是OMG定义的一种元模型语言,用于描述和定义其他对象模型的元模型。

它提供了一种规范的方式来描述元数据和元模型,并支持扩展和自定义。

5. BPMN(Business Process Model and Notation):BPMN是一种OMG定义的标准化的业务流程建模语言,用于描述和管理业务流程和工作流程。

它提供了一套图形符号和规则,帮助企业分析、设计和优化业务流程。

6. MOF Model to Text Transformation(MOFM2T):MOFM2T是OMG 定义的一种将MOF模型转换为文本的转换技术。

它允许开发人员根据特定的模板和规则将MOF模型转换为各种文本格式,如代码、配置文件等。

7. MOF Model to Model Transformation(MOFM2M):MOFM2M是OMG 定义的一种将MOF模型转换为其他MOF模型的转换技术。

它允许开发人员根据特定的转换规则和映射关系将一个MOF模型转换为另一个MOF模型,从而实现模型的转换和重用。

8. OCL(Object Constraint Language):OCL是一种OMG定义的对象约束语言,用于描述和定义对象模型中的约束条件。

【软件学报】_软件体系结构分析_期刊发文热词逐年推荐_20140728

【软件学报】_软件体系结构分析_期刊发文热词逐年推荐_20140728
2008年 序号 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
53 as(autonomous system)联盟
1
推荐指数 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
2010年 序号 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
2011年 科研热词 推荐指数 序号 软件可靠性 1 1 路由机制 1 2 路由协议 1 3 跨层设计 1 4 资源分配 1 5 网络体系结构 1 6 组件模型 1 7 组件容器 1 8 系统体系结构 1 9 模型驱动 1 10 模型转换 1 11 拥塞控制 1 12 容延/容断网络 1 13 复杂嵌入式实时系统 1 14 基于构件的软件开发 1 15 产品线工程 1 16 产品线体系结构 1 17 uml 1 18 markov链 1 19 adhoc网络 1 20 aadl(architecture analysis and1 design language)21 22 23 24 25 26 27 28 29 30 31 32
科研热词 推荐指数 龙芯2号微处理器 1 软件质量 1 软件体系结构评估 1 软件体系结构 1 路由节点 1 路由查找 1 跨层设计 1 跨层优化 1 资源搜索 1 计算机体系结构建模 1 计算机体系结构 1 解析器 1 自适应 1 网络体系结构 1 结构一致性 1 纯粹总分学粗糙性 1 粒度表示演算 1 粒度粗糙理论 1 端到端的qos体系结构 1 竞争协议 1 移动对等网络 1 片上网络 1 模拟器 1 模拟 1 无线传感器网络 1 数据平面 1 数据分发 1 控制平面 1 性能评估 1 性能分析 1 性能优化 1 建模技术 1 实体-属性-值模型 1 处理器特性 1 可管理性 1 可扩展路由器 1 可扩展性 1 单映像 1 半结构化数据表示 1 动态资源管理 1 分片式cmp(chip multiprocessor)1 分布式路由计算 1 内存数据库 1 信任模型 1 互连结构 1 xml(extensible markup language) 1 ttm(translator trust model) 1 tpc-h负载 1 tdma 1 se-bgp(security enhanced bgp) 1 mac协议 1 bgp(border gateway protocol)安全 1
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

-3-
Eclipse ECESIS Project
The Meta-Object Facility (MOF)
Refresher
Recall the OMG metamodel architecture.
M3 M2
metamodel Meta-Object Facility (MOF)
metameta model
The Meta-Object Facility (MOF)
The Meta-Object Facility (MOF)
Richard Paige University of York, UK July 2006
Eclipse ECESIS Project
The Meta-Object Facility (MOF)
instanceOf
...
model 0..* basedOn 1
meta-model
...
Model
Classifier
1
meta-entity
Package
Class
- 10 -
Eclipse ECESIS Project
The Meta-Object Facility (MOF)
MOF 1.x
The UML metamodel and other MM’s
M1
model
UML models and other M’s
Various usages of these models
M0
“the real world"
-4-
Eclipse ECESIS Project
The Meta-Object Facility (MOF)
Their definition requires a type specification
Classifier is the base Class for all M3-level Classes that (notionally) define types.
Examples of Classifier include Class and DataType
- 12 -
Eclipse ECESIS Project
The Meta-Object Facility (MOF)
The MOF 1.x Model Main Concrete Classes
The key concrete classes (or meta-metaclasses) of MOF are as follows: Class Association Exception (for defining abnormal behaviours) Attribute Constant Constraint
Namespace is the base Class for all M3-level Classes that need to act as containers GeneralizableElement is the base Class for all M3-level Classes that support generalization (i.e., inheritance in OOP) TypedElement is the base Class for M3-level Classes such as Attribute, Parameter, and Constant
-8-
Eclipse ECESIS Project
The Meta-Object Facility (MOF)
MOF Evolution
MOF has evolved through several versions. MOF 1.x is the most widely supported by tools. MOF 2.0 is the current standard, and it has been substantially influenced by UML 2.0. MOF 2.0 is also critical in supporting transformations, e.g., QVT and Model-to-text. We will carefully clarify which version of MOF we are presenting. Important lessons can be learned by considering each version.
- 13 -
Eclipse ECESIS Project
The Meta-Object Facility (MOF)
The MOF 1.x Model: Key associations
Contains: relates a ModelElement to the Namespace that contains it Generalizes: relates a GeneralizableElement to its ancestors (superclass and subclass) IsOfType: relates a TypedElement to the Classifier that defines its type
- An object is an instance of a class
DependsOn: relates a ModelElement to others that its definition depends on
- E.g. a package depends on another package
- 16 -
Eclipse ECESIS Project
The Meta-Object Facility (MOF)
MOF 2.0 Structure
MOF is separated into Essential MOF (EMOF) and Complete MOF (CMOF). EMOF corresponds to facilities found in OOP and XML.
Context of this work




The present courseware has been elaborated in the context of the MODELWARE European IST FP6 project (/). Co-funded by the European Commission, the MODELWARE project involves 19 partners from 8 European countries. MODELWARE aims to improve software productivity by capitalizing on techniques known as Model-Driven Development (MDD). To achieve the goal of large-scale adoption of these MDD techniques, MODELWARE promotes the idea of a collaborative development of courseware dedicated to this domain. The MDD courseware provided here with the status of open source software is produced under the EPL 1.0 license.
-7-
Eclipse ECESIS Project
The Meta-Object Facility (MOF)
The MDA meta-model stack
M1, M2 & M3 spaces
M3
M2
M2
M2
M1
M1
M1
M1
M1
Université de NANTES
-
One unique Meta-Meta-model (the MOF) An important library of compatible Meta-models Each of the models is defined in the language of its unique meta-model
Easy to map EMOF models to JMI, XMI, etc.
CMOF is what is used to specify metamodels for languages such as UML 2.0.
How has come to be?
-5Eclipse ECESIS Project
The Meta-Object Facility (MOF)
Fragments of a UML metamodel
UML
-6-
Eclipse ECESIS Project
The Meta-Object Facility (MOF)
Stages in the Evolution of Languages at the OMG.
(a)
UML MOF
(b)
MOF
(c)
aModel
UML
UML
SPEM
Workflow
etc.
aModel
UML_for_CORBA
Common Warehouse Metadata
aModel
Action language
MOF 2.0 shares a common core with UML 2.0.
Simpler rules for modelling metadata. Easier to map from/to MOF. Broader tool support for metamodelling (i.e., any UML 2.0 tool can be used).
相关文档
最新文档