UML是结构化的语言


The UML is a Language for Consructing
    

The UML is not visual programming language, but its models can be directly connected to a variety of programming languages. This means that it is possible to map from a model in the UML to a programming language such as Java, C++, or Visual Basic, or even to tables in a relational database or the persistent  store of an object-oriented database. Things that are best expressed graphically are done so graphically in the UML, whereas things that are best expressed textually are done so in the programming language.
 

This mapping permits forward engineering ---- the generation of code from a UML model into a programming language. The reverse is also possible: You can reconstruct a model from an implementation back into the UML. Reverse engineering is not magic. Unless you encode that information in the implementation, information lost when moving forward from models to code. Reverse engineering thus requires tool support with human intervention. Combining these two paths of forward code generation and reverse engineering yields round-trip engineering, meaning the ability to work in either a graphical or a textual view, while tools keep the two views consistent.
 
    In addition to this direct mapping, the UML is sufficiently expressive and unambiguous to permit the direct execution of models, the simulation of systems, and the instrumentation of running systems.

    UML不是可视化的程序设计语言,但是用它建构的模型可以直接与多种程序设计语言关联.虽然两者在表现形式上不一致,在UML中最好的表现形式是图形,而在程序设计语言中的最好表达方式却是文本.尽管这样,UML中的模型仍然可以映射到诸如Jave, C++, VB这类的程序设计语言.甚至可以映射到关系数据库中的表,面向对象数据库的持久性存储.

    这类映射允许正向工程,即从UML的模型生成出程序设计语言的代码段.你也可以从代码段重构一个模型到UML中,这就是逆向工程,它不是魔术.在模型映射到代码过程中有可能丢失信息,这时需要你把丢失的信息人工编码到程序设计语言中,逆向工程则需要可人工介入的工具支持.正向工程和逆向工程同时进行的双向工程,需要有工具来保证图形视图和文本视图映射过程中的一致性.

    除了这种直接映射以外,仿真系统和运行了系统的仪器,UML都能充分的用模型表现出来并能无误的用模型模拟执行.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值