UML可以用来模拟一个功能程序吗? [英] Can UML be used to model a Functional program?

查看:113
本文介绍了UML可以用来模拟一个功能程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更具体地说,你如何建立一个功能程序的模型,或者使用功能样式(没有类)使用图开发而不是文本表示的功能程序的模型,是否可以,有人请指导我走近最近的应用程序会做到这一点(开放源代码,免费,如在啤酒,如果你愿意)

很多用于图表。许多功能程序员(但不是全部)发现写下类型是封装OO程序员放入UML图表的设计关系的好方法。



<因为可变状态在函数式程序中很少见,所以没有可变的对象,所以通常不需要绘制它们之间的关系。虽然一个函数可能会调用另一个函数,但这个属性对于系统的整体设计通常并不重要,而仅仅是执行调用该函数的函数。



如果我感到非常需要绘制功能性程序,我可能会使用 概念图 在哪些类型或功能扮演着概念的角色。

More specifically, how do you model a functional program, or one developed using the Functional Style (without classes) using a diagram, and not textual representation, is it at all possible and could someone please direct me towards the nearest application that would do this (open source, of free as in beer, if you please)

解决方案

Functional programmers generally don't have a lot of use for diagrams. Many functional programmers (but not all) find that writing down types is a good way to encapsulate the design relationships that OO programmers put into UML diagrams.

Because mutable state is rare in functional programs, there are no mutable "objects", so it is not usually useful or necessary to diagram relationships among them. And while one function might call another, this property is usually not important to the overall design of a system but only to the implementation of the function doing the calling.

If I were feeling a strong need to diagram a functional program I might use a concept map in which types or functions play the role of concepts.

这篇关于UML可以用来模拟一个功能程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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