UML 序列图的形式语言 [英] Formal language for UML sequence diagrams

查看:35
本文介绍了UML 序列图的形式语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种形式语言可用于将 UML 序列图中存在的信息捕获为易于人类理解的文本格式?

在我们这里,软件需求通常是根据复杂的序列图来指定的,这些图很难审查、验证正确性和进行更改.另外恕我直言,程序员更愿意从需求的明确文本表示中实现,而不是从庞大的多页图表中实现.

解决方案

(1) 是的,有一种专有的几乎正式的文本格式语言能够表达信息程序员可以理解的 UML 序列图(也可能被其他一些人理解).

我所说的语言是由 以获得更多指示)

(2.2) UML 序列图的目标受众(读者)不仅是程序员,而且是技术含量较低的利益相关者,对他们来说,一张图片可能价值数千字.在我看来,为程序员提供 Java 伪代码,如果需要,甚至可以通过工具将其逆向工程为 UML 序列图(参见 Stack Overflow: how to generate sequence diagram from Java source code or Google: java sequence diagram" for some more pointers)比尝试查找/发明一种特定于序列图的语言

(2.3)当然有一些工具可以通过使用缩放、超链接、折叠/展开块、调整显示的细节级别等技巧来帮助阅读大型 UML 设计,还有像 A3 或 A2 可以将典型的多页图变成单页图


根据您的描述,您所在的位置似乎存在流程问题,您最好在 https://softwareengineering.stackexchange.com/help/on-topic

<块引用>

我可以在这里询问哪些主题?

Programmers Stack Exchange 是一个问答网站,面向软件开发及相关领域的专业人士和学生,他们有兴趣获得有关软件开发的概念性问题的专家答案.

如果您有关于...的问题

  • 软件要求
  • 软件架构和设计
  • ...
  • 开发方法和流程
  • 软件工程管理
  • ...

Is there a formal language which can be used to capture the information present in an UML sequence diagram in to a text format, which is easy understandable by humans?

In our place, often times software requirements are specified in terms of complex sequence diagrams which are difficult to review, verify for correctness and make changes. Also IMHO, programmers would prefer to implement from an unambiguous text representation of the requirements, rather than from sprawling multi page diagrams.

解决方案

(1) Yes, there is a proprietary almost formal text format language able to express information in UML sequence diagrams understandable by programmers (and may be also by some other humans).

The language I mean was designed and implemented by Steve Hanov, comprehensive list of examples is available at https://www.websequencediagrams.com/examples.html and I have emphasized one of the examples below so that you can get the readability idea:

(2) But, beware that you (or someone else) can write bad, unreadable, code in any language (textual or graphical) and changing the language will not automatically change your (or someone else's) habit's an make the code automatically better, more readable, more maintainable

(2.1) Writing down "unambiguous text representation of the requirements", e.g. in the form of use cases approved by the client is not an easy to-do nor easy to-learn thing and just a language change will not improve it much. (see e.g. Stack Overflow: From user stories to sequence diagram for some more pointers)

(2.2) intended audience (readers) for the UML sequence diagrams are not only programmers but also less technical stakeholders for whom a picture may be worth thousands of words . In my opinion, giving programmers Java pseudo code which can be even reverse-engineered into UML sequence diagram by a tool if needed (see Stack Overflow: how to generate sequence diagram from Java source code or Google: "java sequence diagram" for some more pointers) is better then trying to find/invent a sequence-diagram-specific language

(2.3) there are certainly tools that aid reading large UML designs by using tricks like zooming, hyperlinks, collapsing/expanding blocks, tuning the displayed level of detail and there are paper sizes like A3 or A2 which can turn typical multi-page diagram into single-page diagram


From your description it seems that in your place you have process problem and you'd better ask a question at https://softwareengineering.stackexchange.com/help/on-topic

What topics can I ask about here?

Programmers Stack Exchange is a Q&A site for professionals and students in software development and related fields who are interested in getting expert answers on conceptual questions about software development.

If you have a question about...

  • software requirements
  • software architecture and design
  • ...
  • development methodologies and processes
  • software engineering management
  • ...

这篇关于UML 序列图的形式语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆