[LLVMdev] Do you use UML utility programs?

310 views
Skip to first unread message

Journeyer J. Joh

unread,
Dec 24, 2012, 4:08:31 AM12/24/12
to cfe-dev@cs.uiuc.edu Developers, llv...@cs.uiuc.edu
Hello list,

I'd like to know if people use UML tool to analyze and/or document LLVM/Clang.

I use StarUML. It's free and very good though it's free.
But I consider using a commercial program. Because the organization I
belong is willing to support for this.

I don't think I will use these tools to write code.
I think I will use these to do a documentation and analyze code.
So the diagram generation feature is a must. But code generation
feature is not needed much.

Do you use one of these tools? If so let me know your experience.
And I don't believe people use these to generate code for LLVM/Clang.
But it you do, I really like to know about you experience.

Also I'd like to listen your recommendation for a certain product to
buy for my purpose.

I hope this talk doesn't violate the subject of this mail-list.

Best regards
--
----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l d o t c o m
----------------------------------------
_______________________________________________
LLVM Developers mailing list
LLV...@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

Sean Silva

unread,
Dec 24, 2012, 1:46:57 PM12/24/12
to Journeyer J. Joh, cfe-dev@cs.uiuc.edu Developers, llv...@cs.uiuc.edu
On Mon, Dec 24, 2012 at 2:08 AM, Journeyer J. Joh
<oosapro...@gmail.com> wrote:
> Do you use one of these tools? If so let me know your experience.
> And I don't believe people use these to generate code for LLVM/Clang.

I personally don't use any tool like that.

My impression is that most developers here do not use any kind of UML
code generation; I could, of course, be wrong.

-- Sean Silva

Journeyer J. Joh

unread,
Dec 24, 2012, 9:16:23 PM12/24/12
to Sean Silva, cfe-dev@cs.uiuc.edu Developers, llv...@cs.uiuc.edu
Hi Sean Silva,

Maybe I am the only one who is trying to use UML.
In my team, I am also the only one who draws UML diagrams.

I expected there be someone who use UML like me.
But it's maybe not as your opinion.
Maybe doxygen is enough for majority of people.

Thanks for your reply.

Sincerely
Journeyer J. Joh

2012/12/25 Sean Silva <sil...@purdue.edu>:
> On Mon, Dec 24, 2012 at 2:08 AM, Journeyer J. Joh
> <oosapro...@gmail.com> wrote:
>> Do you use one of these tools? If so let me know your experience.
>> And I don't believe people use these to generate code for LLVM/Clang.
>
> I personally don't use any tool like that.
>
> My impression is that most developers here do not use any kind of UML
> code generation; I could, of course, be wrong.
>
> -- Sean Silva



--
----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l d o t c o m
----------------------------------------

Sean Silva

unread,
Dec 24, 2012, 11:10:38 PM12/24/12
to Journeyer J. Joh, cfe-dev@cs.uiuc.edu Developers, llv...@cs.uiuc.edu
UML diagrams can be really helpful for explaining how a piece of code
works (such as the diagrams in your klang project on github).

The main reason I don't draw them is that I haven't found convenient
tools to use which integrate well with my workflow. Doxygen produces
class diagrams, but I would really like to have something which
produces sequence diagrams (such as
<http://journeyer.github.com/klang/sequence_diagram_llvm.html>). What
tools did you use to generate the diagrams for the klang
documentation?

-- Sean Silva

On Mon, Dec 24, 2012 at 7:16 PM, Journeyer J. Joh

Sean Silva

unread,
Dec 24, 2012, 11:46:17 PM12/24/12
to C. Bergström, cfe-dev@cs.uiuc.edu Developers, llv...@cs.uiuc.edu
On Mon, Dec 24, 2012 at 9:19 PM, "C. Bergström"
<cberg...@pathscale.com> wrote:
> At the bottom
>
> Created using<a href="http://sphinx.pocoo.org/
> <view-source:http://sphinx.pocoo.org/>">Sphinx</a> 1.1.3.

That is the documentation generator which creates generate the HTML
page from the .rst files (similar to how LLVM and Clang's `docs/*.rst`
files get turned into `{,clang.}llvm.org/docs/*.html`), and is not
related to the sequence diagrams (which are just images as far as
Sphinx is concerned). (As it happens, I'm actually the one that set up
the Sphinx infrastructure for klang (see
<https://github.com/Journeyer/klang/pull/2>)).

-- Sean Silva

Journeyer J. Joh

unread,
Dec 25, 2012, 3:53:18 AM12/25/12
to Sean Silva, C. Bergström, cfe-dev@cs.uiuc.edu Developers, llv...@cs.uiuc.edu
Hi Sean Silva and people on our list,

>> What tools did you use to generate the diagrams for the klang documentation?

I use StarUML. ( http://staruml.sourceforge.net/en/ )

I mentioned about this earlier before on this mail-list.
It's a Windows only application and free software.

It is good SW. But development is stopped since long ago.
The product was originally a commercial one. But all of a sudden the
company has been shutdown and the product is released as a free and
open source.

Please don't get me wrong I am not related with this SW.
I am only a user.

Sincerely
Journeyer

2012/12/25 Sean Silva <sil...@purdue.edu>:
> On Mon, Dec 24, 2012 at 9:19 PM, "C. Bergström"
> <cberg...@pathscale.com> wrote:
>> At the bottom
>>
>> Created using<a href="http://sphinx.pocoo.org/
>> <view-source:http://sphinx.pocoo.org/>">Sphinx</a> 1.1.3.
>
> That is the documentation generator which creates generate the HTML
> page from the .rst files (similar to how LLVM and Clang's `docs/*.rst`
> files get turned into `{,clang.}llvm.org/docs/*.html`), and is not
> related to the sequence diagrams (which are just images as far as
> Sphinx is concerned). (As it happens, I'm actually the one that set up
> the Sphinx infrastructure for klang (see
> <https://github.com/Journeyer/klang/pull/2>)).
>
> -- Sean Silva



--
----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l d o t c o m
----------------------------------------

Journeyer J. Joh

unread,
Dec 25, 2012, 4:19:47 AM12/25/12
to Sean Silva, C. Bergström, cfe-dev@cs.uiuc.edu Developers, llv...@cs.uiuc.edu
Hi Sean Silva,

There is a tool, which can be integrated into doxygen and can generate
sequence diagram.

http://www.gooli.org/blog/doxygen-meets-sequence-diagrams/

I was recommended using this program earlier but haven't tried this yet.
I just want to let you know about this.

Please don't blame me if this consumed your time without successful return. ^^;

I think sequence diagram provides an insight to the readers but
requires too much time for the person who draws it.

Sincerely
Journeyer

2012/12/25 Journeyer J. Joh <oosapro...@gmail.com>:

"C. Bergström"

unread,
Dec 24, 2012, 11:19:04 PM12/24/12
to Sean Silva, cfe-dev@cs.uiuc.edu Developers, llv...@cs.uiuc.edu
On 12/25/12 11:10 AM, Sean Silva wrote:
> UML diagrams can be really helpful for explaining how a piece of code
> works (such as the diagrams in your klang project on github).
>
> The main reason I don't draw them is that I haven't found convenient
> tools to use which integrate well with my workflow. Doxygen produces
> class diagrams, but I would really like to have something which
> produces sequence diagrams (such as
> <http://journeyer.github.com/klang/sequence_diagram_llvm.html>). What
> tools did you use to generate the diagrams for the klang
> documentation?
At the bottom

Created using<a href="http://sphinx.pocoo.org/ <view-source:http://sphinx.pocoo.org/>">Sphinx</a> 1.1.3.


Sean Silva

unread,
Dec 26, 2012, 7:12:00 PM12/26/12
to Alex Turbov, cfe-dev@cs.uiuc.edu Developers, llv...@cs.uiuc.edu
On Wed, Dec 26, 2012 at 3:31 PM, Alex Turbov <i.z...@gmail.com> wrote:
> do you know that doxygen have a @msc and @mscfile commands?

Didn't know about that. However, I was thinking more along the lines
of something that would extract such diagrams automatically.

-- Sean Silva

Alex Turbov

unread,
Dec 26, 2012, 5:31:22 PM12/26/12
to Sean Silva, cfe-dev@cs.uiuc.edu Developers, llv...@cs.uiuc.edu
On Tue, Dec 25, 2012 at 8:10 AM, Sean Silva <sil...@purdue.edu> wrote:

The main reason I don't draw them is that I haven't found convenient
tools to use which integrate well with my workflow. Doxygen produces
class diagrams, but I would really like to have something which
produces sequence diagrams

do you know that doxygen have a @msc and @mscfile commands?
they are exactly for rendering message sequences...
http://www.stack.nl/~dimitri/doxygen/commands.html#cmdmsc

but you have to draw a diagram using language similar to graphviz dot.

 

Journeyer J. Joh

unread,
Jan 12, 2013, 9:52:45 PM1/12/13
to Sean Silva, cfe-dev@cs.uiuc.edu Developers, Alex Turbov, llv...@cs.uiuc.edu
Hello Sean Silva and List,

I've got an incomplete idea about implementing a utility which
extracts such diagrams automatically. And guess that there should
exist one already.

Let's say I want to draw a seq. diagram of an application.
- To draw the diagram I compile the application with a modified
version of clang/llvm.
- This modified clang/llvm inserts some extended llvm intrinsic
function calls into start and end of every functions.
- Then I execute the application for the scenario needed to draw the
seq. diagram for the application.
- Executing the application generates a binary file.
- A utility like any other llvm utility reads the binary output file
and draw seq. diagram of the application for the tested scenario.
- The utility which draws the seq. diagram is easily configurable.

I think, to do this, a set of extended llvm intrinsic functions which
print out logging message of each function calls/returns must be
implemented.
And this intrinsic functions can be added via llvm optimization pass.

This is my brief and incomplete idea.
And I think this could also be an item of patent if is not registered ever.
But I believe not. This is so simple and easy. There should exist
already implemented software which does this better. Maybe Rose or
stuffs like this I doubt.

I'd like
- to know if there exist one or some similar to my idea. (Regardless
of weather it is based on llvm)
- to know if my idea is realistic and possible?

I wish I could implement this myself.

Sincerely
Journeyer


2012/12/27 Sean Silva <sil...@purdue.edu>:
> On Wed, Dec 26, 2012 at 3:31 PM, Alex Turbov <i.z...@gmail.com> wrote:
>> do you know that doxygen have a @msc and @mscfile commands?
>
> Didn't know about that. However, I was thinking more along the lines
> of something that would extract such diagrams automatically.
>
> -- Sean Silva



--
----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l d o t c o m
----------------------------------------

Sean Silva

unread,
Jan 12, 2013, 9:57:38 PM1/12/13
to Journeyer J. Joh, cfe-dev@cs.uiuc.edu Developers, Alex Turbov, llv...@cs.uiuc.edu
You can easily collect this information with DTrace on a Mac (or
Solaris or FreeBSD) without any special LLVM instrumentation.

-- Sean Silva

Journeyer J. Joh

unread,
Jan 12, 2013, 10:00:36 PM1/12/13
to Sean Silva, cfe-dev@cs.uiuc.edu Developers, Alex Turbov, llv...@cs.uiuc.edu
Oh I see. Thank you. I will study that.

Journeyer

2013/1/13 Sean Silva <sil...@purdue.edu>:
> You can easily collect this information with DTrace on a Mac (or
> Solaris or FreeBSD) without any special LLVM instrumentation.
>
> -- Sean Silva



--
----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l d o t c o m
----------------------------------------

Sean Silva

unread,
Jan 12, 2013, 10:10:41 PM1/12/13
to Journeyer J. Joh, cfe-dev@cs.uiuc.edu Developers, Alex Turbov, llv...@cs.uiuc.edu
On Sat, Jan 12, 2013 at 10:00 PM, Journeyer J. Joh
<oosapro...@gmail.com> wrote:
> Oh I see. Thank you. I will study that.

You will want to use the pid provider. The most basic thing you can
probably do is to turn on flowindent and just trace
`pid$target:::entry' and `pid$target:::return`, which will trace all
the function calls and returns. This blog post
<http://cuddletech.com/blog/pivot/entry.php?id=923> gives an example
of the script I'm thinking of (this is one of the most basic DTrace
scripts).

Also, you may want to compile at -O0, because DTrace can't instrument
functions that have been inlined.

-- Sean Silva

Journeyer J. Joh

unread,
Jan 12, 2013, 11:01:46 PM1/12/13
to Sean Silva, cfe-dev@cs.uiuc.edu Developers, Alex Turbov, llv...@cs.uiuc.edu
Thank you Sean Silva!

I guess DTrace should be very useful.
Thank you.

Journeyer


2013/1/13 Sean Silva <sil...@purdue.edu>:
> On Sat, Jan 12, 2013 at 10:00 PM, Journeyer J. Joh
> <oosapro...@gmail.com> wrote:
>> Oh I see. Thank you. I will study that.
>
> You will want to use the pid provider. The most basic thing you can
> probably do is to turn on flowindent and just trace
> `pid$target:::entry' and `pid$target:::return`, which will trace all
> the function calls and returns. This blog post
> <http://cuddletech.com/blog/pivot/entry.php?id=923> gives an example
> of the script I'm thinking of (this is one of the most basic DTrace
> scripts).
>
> Also, you may want to compile at -O0, because DTrace can't instrument
> functions that have been inlined.
>
> -- Sean Silva



--
----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l d o t c o m
----------------------------------------
Reply all
Reply to author
Forward
0 new messages