将UML静态模型转换为面向对象代码的系统方法

L. Favre, S. Clerici
{"title":"将UML静态模型转换为面向对象代码的系统方法","authors":"L. Favre, S. Clerici","doi":"10.4018/978-1-930708-05-1.CH002","DOIUrl":null,"url":null,"abstract":"Formal and semi-formal techniques can play complementary roles in objectoriented software development. The purpose of this chapter is to present a reusebased rigorous method to forward engineering UML static models. This approach is based on the integration of semi-formal notations in UML with the algebraic style. The main contributions of this chapter are the definition of the GSBLoo algebraic language to cope with concepts of the UML models, the definition of the SpReIm model for the description of the structure of reusable components and the definition of a rigorous process with reuse that assists in the transformation of UML class diagrams to object-oriented code. Eiffel was the language of choice in which to demonstrate the feasibility of our approach. INTRODUCTION The Unified Modeling Language, UML, is rapidly becoming a de-facto standard for modeling software systems (OMG, 1999). It is a set of graphical and textual notations for specifying, visualizing and documenting object-oriented systems. An important feature of UML is that it is a modeling language, not a method, and therefore it does not prescribe any particular development process. UML is not a visual programming language, but its models can be directly connected to a variety of object-oriented programming languages through forward engineering processes. These processes transform UML models into code through a mapping to an implementation language (Booch, Rumbaugh & Jacobson, 1999). 22 Favre and Clerici UML is too imprecise and ambiguous when it comes to simulation, verification, validation and forecasting of system properties and even when it comes to generating implementations from specifications. Another problem is that models written in UML are semantically richer than any other current object programming language. For example, an object-oriented language does not possess an explicit syntax to express UML associations. These can be simulated by pointers and references, but then the structure of the system is not apparent. This often leads to problems during forward/reverse engineering between the specification and code. A variety of advantages have been attributed to the use of formal software specification to solve these problems. It is commonly accepted that a formal specification can reveal gaps, ambiguities and inconsistencies. Furthermore, a precise semantics provides the basis for automated forward engineering and reverse engineering (the process of transforming code into a model through a mapping from a specific implementation language). However, semi-formal approaches still dominate even in areas where formal approaches should provide a competitive advantage. The success of graphical modeling techniques is due to several reasons. On the one hand, they provide a set of graphical and textual descriptions that are easily understandable for both system developers and expert users. In general, there are also good tools to support them. On the other hand, formal methods provide minimal guidelines for eliciting and structuring requirements, and the notation of formal specification languages requires familiarity with symbolic logic that most designers and implementers do not currently have. Besides, the learning curve for the application of these new techniques requires considerable time. Formal and informal techniques can play complementary roles in software development. The integration should be based on the following considerations: • Formal models must preserve the interpretation of object-oriented models, constructions and underlying concepts reinforcing the informal interpretations. • Specification and reasoning must be integrated with code. • It is necessary to define mappings between formal models and object-oriented model constructs and concepts that provide the basis for assisted generation of formal specifications from informal specifications without forcing the user to change specification style. • Only those parts that can benefit from more rigorous specification and analysis must be formalized. In this chapter we present a rigorous process with reuse to forward engineer UML static models. This approach is based on the integration of semi-formal notations in UML with algebraic specifications. The primary objective of this integration is to make easier the analysis, reuse, evolution and maintenance of the software. Rather than requiring that developers manipulate formal specifications, we want to provide formal semantics for graphical modeling notations and develop rigorous tools that permit developers to directly manipulate models they have created. The bases of our approach are: • The definition of the GSBLoo algebraic language. • The definition of the SpReIm model for the description of the structure of a reusable component. • The definition of a method with reuse that assists in the transformation of UML class diagrams to object-oriented code. The GSBLoo language enriches GSBL (Clerici & Orejas,1988) with constructs that allow us to express different kinds of UML relations: generalization/specialization, depen20 more pages are available in the full version of this document, which may be purchased using the \"Add to Cart\" button on the publisher's webpage: www.igi-global.com/chapter/systematic-approach-transformuml-static/30569","PeriodicalId":255100,"journal":{"name":"Unified Modeling Language: Systems Analysis, Design and Development Issues","volume":"171 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2001-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"A Systematic Approach to Transform UML Static Models to Object-Oriented Code\",\"authors\":\"L. Favre, S. Clerici\",\"doi\":\"10.4018/978-1-930708-05-1.CH002\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Formal and semi-formal techniques can play complementary roles in objectoriented software development. The purpose of this chapter is to present a reusebased rigorous method to forward engineering UML static models. This approach is based on the integration of semi-formal notations in UML with the algebraic style. The main contributions of this chapter are the definition of the GSBLoo algebraic language to cope with concepts of the UML models, the definition of the SpReIm model for the description of the structure of reusable components and the definition of a rigorous process with reuse that assists in the transformation of UML class diagrams to object-oriented code. Eiffel was the language of choice in which to demonstrate the feasibility of our approach. INTRODUCTION The Unified Modeling Language, UML, is rapidly becoming a de-facto standard for modeling software systems (OMG, 1999). It is a set of graphical and textual notations for specifying, visualizing and documenting object-oriented systems. An important feature of UML is that it is a modeling language, not a method, and therefore it does not prescribe any particular development process. UML is not a visual programming language, but its models can be directly connected to a variety of object-oriented programming languages through forward engineering processes. These processes transform UML models into code through a mapping to an implementation language (Booch, Rumbaugh & Jacobson, 1999). 22 Favre and Clerici UML is too imprecise and ambiguous when it comes to simulation, verification, validation and forecasting of system properties and even when it comes to generating implementations from specifications. Another problem is that models written in UML are semantically richer than any other current object programming language. For example, an object-oriented language does not possess an explicit syntax to express UML associations. These can be simulated by pointers and references, but then the structure of the system is not apparent. This often leads to problems during forward/reverse engineering between the specification and code. A variety of advantages have been attributed to the use of formal software specification to solve these problems. It is commonly accepted that a formal specification can reveal gaps, ambiguities and inconsistencies. Furthermore, a precise semantics provides the basis for automated forward engineering and reverse engineering (the process of transforming code into a model through a mapping from a specific implementation language). However, semi-formal approaches still dominate even in areas where formal approaches should provide a competitive advantage. The success of graphical modeling techniques is due to several reasons. On the one hand, they provide a set of graphical and textual descriptions that are easily understandable for both system developers and expert users. In general, there are also good tools to support them. On the other hand, formal methods provide minimal guidelines for eliciting and structuring requirements, and the notation of formal specification languages requires familiarity with symbolic logic that most designers and implementers do not currently have. Besides, the learning curve for the application of these new techniques requires considerable time. Formal and informal techniques can play complementary roles in software development. The integration should be based on the following considerations: • Formal models must preserve the interpretation of object-oriented models, constructions and underlying concepts reinforcing the informal interpretations. • Specification and reasoning must be integrated with code. • It is necessary to define mappings between formal models and object-oriented model constructs and concepts that provide the basis for assisted generation of formal specifications from informal specifications without forcing the user to change specification style. • Only those parts that can benefit from more rigorous specification and analysis must be formalized. In this chapter we present a rigorous process with reuse to forward engineer UML static models. This approach is based on the integration of semi-formal notations in UML with algebraic specifications. The primary objective of this integration is to make easier the analysis, reuse, evolution and maintenance of the software. Rather than requiring that developers manipulate formal specifications, we want to provide formal semantics for graphical modeling notations and develop rigorous tools that permit developers to directly manipulate models they have created. The bases of our approach are: • The definition of the GSBLoo algebraic language. • The definition of the SpReIm model for the description of the structure of a reusable component. • The definition of a method with reuse that assists in the transformation of UML class diagrams to object-oriented code. The GSBLoo language enriches GSBL (Clerici & Orejas,1988) with constructs that allow us to express different kinds of UML relations: generalization/specialization, depen20 more pages are available in the full version of this document, which may be purchased using the \\\"Add to Cart\\\" button on the publisher's webpage: www.igi-global.com/chapter/systematic-approach-transformuml-static/30569\",\"PeriodicalId\":255100,\"journal\":{\"name\":\"Unified Modeling Language: Systems Analysis, Design and Development Issues\",\"volume\":\"171 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2001-04-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Unified Modeling Language: Systems Analysis, Design and Development Issues\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.4018/978-1-930708-05-1.CH002\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Unified Modeling Language: Systems Analysis, Design and Development Issues","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4018/978-1-930708-05-1.CH002","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

摘要

正式和半正式技术可以在面向对象的软件开发中发挥互补的作用。本章的目的是提出一种基于重用的严格方法来推进工程UML静态模型。这种方法基于UML中的半形式化符号与代数风格的集成。本章的主要贡献是定义了用于处理UML模型概念的GSBLoo代数语言,定义了用于描述可重用组件结构的SpReIm模型,以及定义了一个严格的可重用过程,该过程有助于将UML类图转换为面向对象的代码。Eiffel是用来证明我们的方法的可行性的语言。统一建模语言UML正迅速成为软件系统建模的事实上的标准(OMG, 1999)。它是一组用于指定、可视化和记录面向对象系统的图形和文本符号。UML的一个重要特性是它是一种建模语言,而不是一种方法,因此它不规定任何特定的开发过程。UML不是一种可视化的编程语言,但是它的模型可以通过前向工程过程直接连接到各种面向对象的编程语言。这些过程通过映射到实现语言将UML模型转换为代码(Booch, Rumbaugh & Jacobson, 1999)。当涉及到系统属性的模拟、验证、确认和预测,甚至当涉及到从规范生成实现时,Favre和Clerici UML太不精确和模棱两可了。另一个问题是,用UML编写的模型在语义上比任何其他当前的对象编程语言都要丰富。例如,面向对象的语言不具备表达UML关联的显式语法。这些可以通过指针和引用来模拟,但是这样系统的结构就不明显了。这通常会在规范和代码之间的正向/反向工程期间导致问题。使用正式的软件规范来解决这些问题有很多优点。人们普遍认为,正式的规范可以揭示差距、歧义和不一致。此外,精确的语义为自动化的正向工程和反向工程(通过从特定实现语言的映射将代码转换为模型的过程)提供了基础。然而,即使在正式方法应该提供竞争优势的领域,半正式方法仍然占主导地位。图形化建模技术的成功有几个原因。一方面,它们为系统开发人员和专家用户提供了一组易于理解的图形和文本描述。一般来说,也有很好的工具来支持它们。另一方面,形式化方法为引出和构造需求提供了最少的指导方针,而形式化规范语言的符号要求熟悉符号逻辑,这是大多数设计人员和实现者目前所不具备的。此外,应用这些新技术的学习曲线需要相当长的时间。正式技术和非正式技术在软件开发中可以发挥互补的作用。集成应该基于以下考虑:•正式模型必须保留对面向对象模型、结构和强化非正式解释的潜在概念的解释。•规范和推理必须与代码集成。•有必要定义正式模型和面向对象模型构造之间的映射,以及为从非正式规范辅助生成正式规范提供基础的概念,而不强迫用户改变规范风格。•只有那些可以从更严格的规范和分析中受益的部分必须形式化。在本章中,我们提出了一个严格的过程,通过重用来向前工程UML静态模型。这种方法基于UML中的半形式化符号与代数规范的集成。这种集成的主要目标是使软件的分析、重用、发展和维护变得更容易。我们不要求开发人员操作正式的规范,而是希望为图形化建模符号提供正式的语义,并开发严格的工具,允许开发人员直接操作他们创建的模型。我们的方法的基础是:•GSBLoo代数语言的定义。•定义用于描述可重用组件结构的SpReIm模型。•具有重用的方法的定义,帮助将UML类图转换为面向对象的代码。 GSBLoo语言丰富了GSBL (Clerici & Orejas,1988)的结构,使我们能够表达不同类型的UML关系:一般化/专门化,依赖。在这个文档的完整版本中有更多的页面,可以使用发布者网页上的“添加到购物车”按钮购买:www.igi-global.com/chapter/systematic-approach-transformuml-static/30569
本文章由计算机程序翻译,如有差异,请以英文原文为准。
A Systematic Approach to Transform UML Static Models to Object-Oriented Code
Formal and semi-formal techniques can play complementary roles in objectoriented software development. The purpose of this chapter is to present a reusebased rigorous method to forward engineering UML static models. This approach is based on the integration of semi-formal notations in UML with the algebraic style. The main contributions of this chapter are the definition of the GSBLoo algebraic language to cope with concepts of the UML models, the definition of the SpReIm model for the description of the structure of reusable components and the definition of a rigorous process with reuse that assists in the transformation of UML class diagrams to object-oriented code. Eiffel was the language of choice in which to demonstrate the feasibility of our approach. INTRODUCTION The Unified Modeling Language, UML, is rapidly becoming a de-facto standard for modeling software systems (OMG, 1999). It is a set of graphical and textual notations for specifying, visualizing and documenting object-oriented systems. An important feature of UML is that it is a modeling language, not a method, and therefore it does not prescribe any particular development process. UML is not a visual programming language, but its models can be directly connected to a variety of object-oriented programming languages through forward engineering processes. These processes transform UML models into code through a mapping to an implementation language (Booch, Rumbaugh & Jacobson, 1999). 22 Favre and Clerici UML is too imprecise and ambiguous when it comes to simulation, verification, validation and forecasting of system properties and even when it comes to generating implementations from specifications. Another problem is that models written in UML are semantically richer than any other current object programming language. For example, an object-oriented language does not possess an explicit syntax to express UML associations. These can be simulated by pointers and references, but then the structure of the system is not apparent. This often leads to problems during forward/reverse engineering between the specification and code. A variety of advantages have been attributed to the use of formal software specification to solve these problems. It is commonly accepted that a formal specification can reveal gaps, ambiguities and inconsistencies. Furthermore, a precise semantics provides the basis for automated forward engineering and reverse engineering (the process of transforming code into a model through a mapping from a specific implementation language). However, semi-formal approaches still dominate even in areas where formal approaches should provide a competitive advantage. The success of graphical modeling techniques is due to several reasons. On the one hand, they provide a set of graphical and textual descriptions that are easily understandable for both system developers and expert users. In general, there are also good tools to support them. On the other hand, formal methods provide minimal guidelines for eliciting and structuring requirements, and the notation of formal specification languages requires familiarity with symbolic logic that most designers and implementers do not currently have. Besides, the learning curve for the application of these new techniques requires considerable time. Formal and informal techniques can play complementary roles in software development. The integration should be based on the following considerations: • Formal models must preserve the interpretation of object-oriented models, constructions and underlying concepts reinforcing the informal interpretations. • Specification and reasoning must be integrated with code. • It is necessary to define mappings between formal models and object-oriented model constructs and concepts that provide the basis for assisted generation of formal specifications from informal specifications without forcing the user to change specification style. • Only those parts that can benefit from more rigorous specification and analysis must be formalized. In this chapter we present a rigorous process with reuse to forward engineer UML static models. This approach is based on the integration of semi-formal notations in UML with algebraic specifications. The primary objective of this integration is to make easier the analysis, reuse, evolution and maintenance of the software. Rather than requiring that developers manipulate formal specifications, we want to provide formal semantics for graphical modeling notations and develop rigorous tools that permit developers to directly manipulate models they have created. The bases of our approach are: • The definition of the GSBLoo algebraic language. • The definition of the SpReIm model for the description of the structure of a reusable component. • The definition of a method with reuse that assists in the transformation of UML class diagrams to object-oriented code. The GSBLoo language enriches GSBL (Clerici & Orejas,1988) with constructs that allow us to express different kinds of UML relations: generalization/specialization, depen20 more pages are available in the full version of this document, which may be purchased using the "Add to Cart" button on the publisher's webpage: www.igi-global.com/chapter/systematic-approach-transformuml-static/30569
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信