Re: Class Hierarchy Graphs

2015-04-06 Thread w0rp via Digitalmars-d
I have just updated my reposistory so instead of using a ClassHierarchyInfo type for class diagrams and a ModuleDependencyInfo type for module diagrams, now digraph types are used, coming from my container library. I had to update my container library a little to get it to work, as I had some

Re: Class Hierarchy Graphs

2015-03-29 Thread Andrei Alexandrescu via Digitalmars-d
On 3/29/15 4:24 AM, w0rp wrote: I just added a module dependency graph generator by following a similar process to the library which I used for class hierarchies. I'd be willing to bet that Andrei wants to apply it to Phobos, and that is indeed a thing that can be done. There's an example on

Re: Class Hierarchy Graphs

2015-03-29 Thread w0rp via Digitalmars-d
On Sunday, 29 March 2015 at 15:40:56 UTC, Andrei Alexandrescu wrote: One other informative graph that should be much easier to generate is the direct imports graph (no transitivity). I had a go at it, and I have something for that now. This graph should show what std.regex imports. I'm not

Re: Class Hierarchy Graphs

2015-03-29 Thread w0rp via Digitalmars-d
On Sunday, 29 March 2015 at 16:18:40 UTC, w0rp wrote: I had to add the leaf checking, as the dependencies could be importing each other, and the structure was only storing nodes, not edges. I should maybe make the structures store just a directed graph, but whatever. Thinking about it a

Re: Class Hierarchy Graphs

2015-03-29 Thread w0rp via Digitalmars-d
In an attempt to get something, anything, easier to read, I wrote another function which produces a graph where the module nodes are ranked by their incoming edge counts. The only way I could figure out how to get Graphviz to do this was to write the numbers as edges too and so on. So it looks

Re: Class Hierarchy Graphs

2015-03-29 Thread w0rp via Digitalmars-d
I just added a module dependency graph generator by following a similar process to the library which I used for class hierarchies. I'd be willing to bet that Andrei wants to apply it to Phobos, and that is indeed a thing that can be done. There's an example on GitHub, and the readme explains

Re: Class Hierarchy Graphs

2015-03-29 Thread Andrei Alexandrescu via Digitalmars-d
On 3/29/15 9:18 AM, w0rp wrote: On Sunday, 29 March 2015 at 15:40:56 UTC, Andrei Alexandrescu wrote: One other informative graph that should be much easier to generate is the direct imports graph (no transitivity). I had a go at it, and I have something for that now. This graph should show

Re: Class Hierarchy Graphs

2015-03-29 Thread H. S. Teoh via Digitalmars-d
On Sun, Mar 29, 2015 at 03:44:02PM -0700, Andrei Alexandrescu via Digitalmars-d wrote: [...] * direct imports but followed transitively, e.g. the graph for std.regex' imports would show the imports of the modules imported etc. [...] That would be interesting to see! It would be a great help in

Re: Class Hierarchy Graphs

2015-03-27 Thread w0rp via Digitalmars-d
On Friday, 27 March 2015 at 08:26:51 UTC, Dragos Carp wrote: On Thursday, 26 March 2015 at 17:41:58 UTC, w0rp wrote: If enough people are interested and have a few suggestions for some features they like which aren't crazy massive feature lists, I'd be willing to expand it a bit, add some

Re: Class Hierarchy Graphs

2015-03-27 Thread Dragos Carp via Digitalmars-d
On Thursday, 26 March 2015 at 17:41:58 UTC, w0rp wrote: If enough people are interested and have a few suggestions for some features they like which aren't crazy massive feature lists, I'd be willing to expand it a bit, add some documentation, and offer it as a DUB package. Very nice!

Re: Class Hierarchy Graphs

2015-03-26 Thread Vlad Levenfeld via Digitalmars-d
On Thursday, 26 March 2015 at 17:41:58 UTC, w0rp wrote: Hello everyone. I was talking in the IRC channel today and I mentioned something small I wrote a couple of years ago which generates a Graphviz DOT file based on ModuleInfo, so you can see a visual class hierarchy with interfaces

Re: Class Hierarchy Graphs

2015-03-26 Thread w0rp via Digitalmars-d
On Thursday, 26 March 2015 at 17:41:58 UTC, w0rp wrote: Hello everyone. I was talking in the IRC channel today and I mentioned something small I wrote a couple of years ago which generates a Graphviz DOT file based on ModuleInfo, so you can see a visual class hierarchy with interfaces

Re: Class Hierarchy Graphs

2015-03-26 Thread w0rp via Digitalmars-d
On Thursday, 26 March 2015 at 17:43:46 UTC, Vlad Levenfeld wrote: +1 How much of a stretch would it be to extend the dependency graph to compositional types? struct Foo { mixin Bar!(a,b,c); } alias Qux = Baz!Foo; and so on? I'm not sure about that. I'd have to think about it a bit.

Re: Class Hierarchy Graphs

2015-03-26 Thread Andrei Alexandrescu via Digitalmars-d
On 3/26/15 10:41 AM, w0rp wrote: Hello everyone. I was talking in the IRC channel today and I mentioned something small I wrote a couple of years ago which generates a Graphviz DOT file based on ModuleInfo, so you can see a visual class hierarchy with interfaces included. There was some interest