Quantcast

UML or other modeling tools

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

UML or other modeling tools

Alessandro Sivieri
Hi all,

has anyone of you ever used any modeling tool for describing a system
written in Erlang (or any other functional language)?
I have to describe the architecture of an application, in terms of processes
structure/tree and/or modules, and I was wondering if there is some UML
diagram that could be used, or any "standard" format for doing it; I have
already created several sequence diagrams, and usually in my other projects
I have used (more or less detailed) diagram classes, but for functional
languages I don't know precisely what tools there exist...

--
Sivieri Alessandro
[hidden email]
http://www.chimera-bellerofonte.eu/
http://www.poul.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: UML or other modeling tools

Dirk Scharff
Hi Alessandro,

I haven't tried to do so, but I think you could use UML component diagrams (
http://en.wikipedia.org/wiki/Component_diagram) to describe the modules of
your system. If you have to describe an algorithm in detail you could use a
flow chart.
Depending on the situation an UML state machine diagram (if you use finite
state machines in your system) or activity diagram could also be useful.

Regards,
Dirk.


On Sun, Jan 9, 2011 at 8:56 AM, Alessandro Sivieri <
[hidden email]> wrote:

> Hi all,
>
> has anyone of you ever used any modeling tool for describing a system
> written in Erlang (or any other functional language)?
> I have to describe the architecture of an application, in terms of
> processes
> structure/tree and/or modules, and I was wondering if there is some UML
> diagram that could be used, or any "standard" format for doing it; I have
> already created several sequence diagrams, and usually in my other projects
> I have used (more or less detailed) diagram classes, but for functional
> languages I don't know precisely what tools there exist...
>
> --
> Sivieri Alessandro
> [hidden email]
> http://www.chimera-bellerofonte.eu/
> http://www.poul.org/
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: UML or other modeling tools

Ulf Wiger
In reply to this post by Alessandro Sivieri

I am quite sceptical towards using UML for modeling Erlang
programs, for a number of reasons.

- I mainly subscribe to Fred Brooks' "The Flow Chart Curse" in "The Mythical
  Man-Month": visual modeling provides very little extra information when
  used to illustrate a very high-level programming language. In the case of
  UML and Erlang, Erlang is at roughly the same abstraction level as the
  various versions of Executable UML.

- The things most interesting to model in an Erlang program are the
  state machines and the interaction between processes, but UML
  state machines have very complex - and most importantly, *different*
  - semantics, making it quite probable that the design becomes subject
  to compromises forced by the modeling tool, rather than reflecting the
  power of the programming language.

- The main purpose of a standard notation is that everyone should be
  able to agree on what it means. I assert that very few people can claim
  to understand the subtleties of UML's state machine semantics, and
  even if they do, so much the worse, since Erlang's semantics are
  different. Better to choose a simple notation and explain what it means
  in the relation to Erlang's building blocks. Taking a ubiquitous symbol
  and defining it to mean something different is counter-productive.

- The FMC (http://fmc-modeling.org/) notation seems to complement
  Erlang fairly well, describing roughly the things that are most interesting
  to describe visually in an Erlang program.

BR,
Ulf W

On 9 Jan 2011, at 08:56, Alessandro Sivieri wrote:

> Hi all,
>
> has anyone of you ever used any modeling tool for describing a system
> written in Erlang (or any other functional language)?
> I have to describe the architecture of an application, in terms of processes
> structure/tree and/or modules, and I was wondering if there is some UML
> diagram that could be used, or any "standard" format for doing it; I have
> already created several sequence diagrams, and usually in my other projects
> I have used (more or less detailed) diagram classes, but for functional
> languages I don't know precisely what tools there exist...
>
> --
> Sivieri Alessandro
> [hidden email]
> http://www.chimera-bellerofonte.eu/
> http://www.poul.org/

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com




________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: UML or other modeling tools

Alain O'Dea
On 2011-01-09, at 10:36, Ulf Wiger <[hidden email]> wrote:

>
> I am quite sceptical towards using UML for modeling Erlang
> programs, for a number of reasons.
>
> - I mainly subscribe to Fred Brooks' "The Flow Chart Curse" in "The Mythical
>  Man-Month": visual modeling provides very little extra information when
>  used to illustrate a very high-level programming language. In the case of
>  UML and Erlang, Erlang is at roughly the same abstraction level as the
>  various versions of Executable UML.
>
> - The things most interesting to model in an Erlang program are the
>  state machines and the interaction between processes, but UML
>  state machines have very complex - and most importantly, *different*
>  - semantics, making it quite probable that the design becomes subject
>  to compromises forced by the modeling tool, rather than reflecting the
>  power of the programming language.
>
> - The main purpose of a standard notation is that everyone should be
>  able to agree on what it means. I assert that very few people can claim
>  to understand the subtleties of UML's state machine semantics, and
>  even if they do, so much the worse, since Erlang's semantics are
>  different. Better to choose a simple notation and explain what it means
>  in the relation to Erlang's building blocks. Taking a ubiquitous symbol
>  and defining it to mean something different is counter-productive.
>
> - The FMC (http://fmc-modeling.org/) notation seems to complement
>  Erlang fairly well, describing roughly the things that are most interesting
>  to describe visually in an Erlang program.

Hi Ulf:

What success stories can you share about using FMC?

I have been looking for a lightweight and comprehensive form of design documentation.  I like the idea of using CRC/MRC (Class/Module Responsibilities and Collaborators) cards, but they have limitations.  I imagine CRC/MRC cards effectively describe the parts of the system, but cannot effectively describe how the entire system of parts moves together.

Is FMC worth serious investigation?

Thank you,
Alain


>
> BR,
> Ulf W
>
> On 9 Jan 2011, at 08:56, Alessandro Sivieri wrote:
>
>> Hi all,
>>
>> has anyone of you ever used any modeling tool for describing a system
>> written in Erlang (or any other functional language)?
>> I have to describe the architecture of an application, in terms of processes
>> structure/tree and/or modules, and I was wondering if there is some UML
>> diagram that could be used, or any "standard" format for doing it; I have
>> already created several sequence diagrams, and usually in my other projects
>> I have used (more or less detailed) diagram classes, but for functional
>> languages I don't know precisely what tools there exist...
>>
>> --
>> Sivieri Alessandro
>> [hidden email]
>> http://www.chimera-bellerofonte.eu/
>> http://www.poul.org/
>
> Ulf Wiger, CTO, Erlang Solutions, Ltd.
> http://erlang-solutions.com
>
>
>
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:[hidden email]
>

________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: UML or other modeling tools

Ulf Wiger

On 9 Jan 2011, at 22:30, Alain O'Dea wrote:

> On 2011-01-09, at 10:36, Ulf Wiger <[hidden email]> wrote:
>
>> - The FMC (http://fmc-modeling.org/) notation seems to complement
>> Erlang fairly well, describing roughly the things that are most interesting
>> to describe visually in an Erlang program.
>
> Hi Ulf:
>
> What success stories can you share about using FMC?

None, actually. It would be interesting to hear from someone who's
actually tried it. :)

The most ambitious story around FMC is The Apache Modelling Project

http://www.fmc-modeling.org/download/projects/apache/the_apache_modelling_project.pdf

as far as I know.

Last time I looked at it, the state of FMC-capable editors was a bit
troubling. MS Visio supposedly supports FMC notation, as well as
OpenOffice. Oryx is an Open Source project and an online editor,
but it failed to convert me, at least.

http://bpt.hpi.uni-potsdam.de/Oryx/FMC

BR,
Ulf W

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: UML or other modeling tools

Robert Raschke
In reply to this post by Alessandro Sivieri
Hi Allessandro,

On Sun, Jan 9, 2011 at 7:56 AM, Alessandro Sivieri <
[hidden email]> wrote:

> has anyone of you ever used any modeling tool for describing a system
> written in Erlang (or any other functional language)?
> I have to describe the architecture of an application, in terms of
> processes
> structure/tree and/or modules, and I was wondering if there is some UML
> diagram that could be used, or any "standard" format for doing it; I have
> already created several sequence diagrams, and usually in my other projects
> I have used (more or less detailed) diagram classes, but for functional
> languages I don't know precisely what tools there exist...
>
>
I write business level applications that bridge between an ITSM (IT Service
Management) tool and other ITSM tools and system monitoring tools. For this
we use an Erlang/RabbitMQ framework that runs Lua business logic snippets
based on the state of the linkage between the two systems.

So, for a bridged "thing" (which exists in two different guises on either
side of the bridge), we manage its state and what kind of
interactions/messages in each direction are allowed, how those messages get
transformed (i.e., what effect they have on the other system) and what state
changes they trigger.

For this, I personally, use UML state charts. And that works very well so
far. The trick is to keep the level of detail at an acceptable level. I am
not interested in implementing the logic in a state diagram. All I want is
to capture the salient points and manage the overall complexity of the
logic.

While I ship these diagrams as part of the ongoing (requirements)
documentation, I don't think they've added enormously to a customers
understanding. But they do help me rather a lot when discussing details with
them.

I find it is important to realise that modelling tools are there to model
your proposed solution, not implement it. They are very valuable during
design of a complex system. They make mistakes in your design a bit cheaper
to handle, because you may not have gone and implemented all of it yet. This
makes changing your design a little bit less risky.

Robby
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: UML or other modeling tools

Alain O'Dea
In reply to this post by Ulf Wiger
On 2011-01-10, at 5:35, Ulf Wiger <[hidden email]> wrote:

>
> On 9 Jan 2011, at 22:30, Alain O'Dea wrote:
>
>> On 2011-01-09, at 10:36, Ulf Wiger <[hidden email]> wrote:
>>
>>> - The FMC (http://fmc-modeling.org/) notation seems to complement
>>> Erlang fairly well, describing roughly the things that are most interesting
>>> to describe visually in an Erlang program.
>>
>> Hi Ulf:
>>
>> What success stories can you share about using FMC?
>
> None, actually. It would be interesting to hear from someone who's
> actually tried it. :)
>
> The most ambitious story around FMC is The Apache Modelling Project
>
> http://www.fmc-modeling.org/download/projects/apache/the_apache_modelling_project.pdf
>
> as far as I know.
>
> Last time I looked at it, the state of FMC-capable editors was a bit
> troubling. MS Visio supposedly supports FMC notation, as well as
> OpenOffice. Oryx is an Open Source project and an online editor,
> but it failed to convert me, at least.
>
> http://bpt.hpi.uni-potsdam.de/Oryx/FMC
>
> BR,
> Ulf W
>
> Ulf Wiger, CTO, Erlang Solutions, Ltd.
> http://erlang-solutions.com

FMC looks easy enough to draw.  One key for a modeling system for me is the ease with which it can be drawn on a flip-chart or whiteboard.

Tools that understand the semantics are less important to me. I imagine that OmniGraffle/Visio would work reasonably since they support the magnets and connectors elements needed to make the editing comfortable.  A more purposed editor would be interesting, but in my experience they limit the expression and annotation too much to be generally useful.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: UML or other modeling tools

Alessandro Sivieri
In the end I'm using FMC with the OOo template, it looks good for drawing a
description of my server application.

--
Sivieri Alessandro
[hidden email]
http://www.chimera-bellerofonte.eu/
http://www.poul.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: UML or other modeling tools

Geoffrey Biggs
In reply to this post by Ulf Wiger
On 09/01/11 23:06, Ulf Wiger wrote:
> - The things most interesting to model in an Erlang program are the
>   state machines and the interaction between processes, but UML
>   state machines have very complex - and most importantly, *different*
>   - semantics, making it quite probable that the design becomes subject
>   to compromises forced by the modeling tool, rather than reflecting the
>   power of the programming language.

I wonder if you could expand on what these differences are. As a novice
at both UML and Erlang, I don't want to fall into any traps caused by
making false assumptions.

Geoff

________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: UML or other modeling tools

Torben Hoffmann
In reply to this post by Alain O'Dea
I am using OPM (http://en.wikipedia.org/wiki/Object_Process_Methodology) for
my high level drawings.
OPM has the nice aspect that it allows you to treat both objects and
processes as 1st level citizens of the language. (Mind you the processes are
not a 1:1 with Erlang processes!!).

OPM has both a graphical and a textual representation that matches up 1:1 -
I have not had the time to try out the OPCAT tool yet, so I cannot say how
that works.
So far I have used my own Dia stencil with OPM shapes to draw things.

As a supplement I use MSCs, where http://plantuml.sourceforge.net/ is a nice
tool to create them.
I have been contemplating extending PlantUML with OPM or write a simple Dot
based tool for OPM, but that is the kind of activity that requires a bit of
time to get right and right now I am busy trying to make money, I am content
with my Dia drawings right now.

Cheers,
Torben

On Mon, Jan 10, 2011 at 15:11, Alain O'Dea <[hidden email]> wrote:

> On 2011-01-10, at 5:35, Ulf Wiger <[hidden email]> wrote:
>
> >
> > On 9 Jan 2011, at 22:30, Alain O'Dea wrote:
> >
> >> On 2011-01-09, at 10:36, Ulf Wiger <[hidden email]>
> wrote:
> >>
> >>> - The FMC (http://fmc-modeling.org/) notation seems to complement
> >>> Erlang fairly well, describing roughly the things that are most
> interesting
> >>> to describe visually in an Erlang program.
> >>
> >> Hi Ulf:
> >>
> >> What success stories can you share about using FMC?
> >
> > None, actually. It would be interesting to hear from someone who's
> > actually tried it. :)
> >
> > The most ambitious story around FMC is The Apache Modelling Project
> >
> >
> http://www.fmc-modeling.org/download/projects/apache/the_apache_modelling_project.pdf
> >
> > as far as I know.
> >
> > Last time I looked at it, the state of FMC-capable editors was a bit
> > troubling. MS Visio supposedly supports FMC notation, as well as
> > OpenOffice. Oryx is an Open Source project and an online editor,
> > but it failed to convert me, at least.
> >
> > http://bpt.hpi.uni-potsdam.de/Oryx/FMC
> >
> > BR,
> > Ulf W
> >
> > Ulf Wiger, CTO, Erlang Solutions, Ltd.
> > http://erlang-solutions.com
>
> FMC looks easy enough to draw.  One key for a modeling system for me is the
> ease with which it can be drawn on a flip-chart or whiteboard.
>
> Tools that understand the semantics are less important to me. I imagine
> that OmniGraffle/Visio would work reasonably since they support the magnets
> and connectors elements needed to make the editing comfortable.  A more
> purposed editor would be interesting, but in my experience they limit the
> expression and annotation too much to be generally useful.




--
http://www.linkedin.com/in/torbenhoffmann
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: UML or other modeling tools

Ulf Wiger
In reply to this post by Geoffrey Biggs

It's not an entirely easy question to answer, because there are (at least)
three levels to consider:

- what the UML standard says
- *which version* of the UML standard (since there are semantic differences)
- what the specific tool actually supports

The UML standard doesn't specify in which order state machines
should process messages, but in practice, this usually means FIFO.
Messages are processed with run-to-completion semantics, so so
far, it's pretty similar to Erlang's gen_server.

However, there is no selective receive support in UML. You can specify
an event as 'deferrable' in a given state (this is not exactly prominent
in the spec, and not all tools support it). You can also explicitly defer
and recall messages.

One consequence of this is that it's near impossible to model a
generic RPC* in UML. In UML 2.0, there is a synchronousCall()
method, so you can get by to some extent anyway…

* or gen_server:call()

UML's method of tackling state machine complexity is to support
hierarchical state machines, but this mainly gives some modularity
assuming that the order of messages is ok; it cannot really help
you if messages can arrive out of order or in undefined order.

BR,
Ulf W

On 14 Jan 2011, at 01:46, Geoffrey Biggs wrote:

> On 09/01/11 23:06, Ulf Wiger wrote:
>> - The things most interesting to model in an Erlang program are the
>>  state machines and the interaction between processes, but UML
>>  state machines have very complex - and most importantly, *different*
>>  - semantics, making it quite probable that the design becomes subject
>>  to compromises forced by the modeling tool, rather than reflecting the
>>  power of the programming language.
>
> I wonder if you could expand on what these differences are. As a novice
> at both UML and Erlang, I don't want to fall into any traps caused by
> making false assumptions.
>
> Geoff
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:[hidden email]
>

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com




________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]

Loading...