Ivan Miljenovic | 5 Oct 18:53

ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

I've now uploaded my SourceGraph program to Hackage [1].  It's rather
simple at the moment, but if you pass in the .cabal file as a
parameter (e.g. run it as "SourceGraph Foo.cabal"), it will create in
the same directory as the .cabal file a Directory called "SourceGraph"
that contains an html report of some basic graph-theoretic analysis of
your code.

The output format isn't ideal, but it should serve it's purpose for
now (I'll fix it up and actually make it usable once my Thesis has
been handed in).  What I'd appreciate if people could try it out and
tell me if there's any code, etc. that it can't parse.  At the moment,
it ignores all Data-based functions (e.g. class and instance
declarations as well as record functions) and only looks at
"stand-alone" functions (i.e. normal functions).

SourceGraph requires version 0.3 of my Graphalyze library (version 0.2
added the reports in, but had some bugs that 0.3 fixes).

[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/SourceGraph

--

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic <at> gmail.com
IvanMiljenovic.wordpress.com
Gwern Branwen | 5 Oct 22:29

Re: ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

On 2008.10.06 02:53:43 +1000, Ivan Miljenovic <ivan.miljenovic <at> gmail.com> scribbled 1.1K characters:
> I've now uploaded my SourceGraph program to Hackage [1].  It's rather
> simple at the moment, but if you pass in the .cabal file as a
> parameter (e.g. run it as "SourceGraph Foo.cabal"), it will create in
> the same directory as the .cabal file a Directory called "SourceGraph"
> that contains an html report of some basic graph-theoretic analysis of
> your code.
>
> The output format isn't ideal, but it should serve it's purpose for
> now (I'll fix it up and actually make it usable once my Thesis has
> been handed in).  What I'd appreciate if people could try it out and
> tell me if there's any code, etc. that it can't parse.  At the moment,
> it ignores all Data-based functions (e.g. class and instance
> declarations as well as record functions) and only looks at
> "stand-alone" functions (i.e. normal functions).
>
> SourceGraph requires version 0.3 of my Graphalyze library (version 0.2
> added the reports in, but had some bugs that 0.3 fixes).
>
> [1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/SourceGraph
>
> --
> Ivan Lazar Miljenovic

SourceGraph looks pretty interesting. I don't think the output is that bad, though. (If anyone is curious,
attached is a tarball of what SourceGraph generates for XMonad.)

But I do have one or two problems:
1) Didn't mention that it uses some executable 'dot', which Graphviz provides.
2) Fails on XMonadContrib? While SourceGraph on XMonad finished in 1 or 2 seconds, SourceGraph
(Continue reading)

Magnus Therning | 6 Oct 11:25

Re: Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

Ivan,

I tried building your tool today and found a few packaging related things:

* the dependency on haskell-src-exts says any version should do, but
the one shipped in Debian Sid
(http://packages.debian.org/sid/libghc6-src-exts-dev) doesn't do, so
some extra versioning info seems to be required
* I had to add an import of Distribution.Configuration to Main.hs to
get it to compile (it failed on the use of condTreeData).

/M

2008/10/5 Gwern Branwen <gwern0 <at> gmail.com>:
> On 2008.10.06 02:53:43 +1000, Ivan Miljenovic <ivan.miljenovic <at> gmail.com> scribbled 1.1K characters:
>> I've now uploaded my SourceGraph program to Hackage [1].  It's rather
>> simple at the moment, but if you pass in the .cabal file as a
>> parameter (e.g. run it as "SourceGraph Foo.cabal"), it will create in
>> the same directory as the .cabal file a Directory called "SourceGraph"
>> that contains an html report of some basic graph-theoretic analysis of
>> your code.
>>
>> The output format isn't ideal, but it should serve it's purpose for
>> now (I'll fix it up and actually make it usable once my Thesis has
>> been handed in).  What I'd appreciate if people could try it out and
>> tell me if there's any code, etc. that it can't parse.  At the moment,
>> it ignores all Data-based functions (e.g. class and instance
>> declarations as well as record functions) and only looks at
>> "stand-alone" functions (i.e. normal functions).
>>
(Continue reading)

Niklas Broberg | 6 Oct 14:19

Re: Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

>  * the dependency on haskell-src-exts says any version should do, but
>  the one shipped in Debian Sid
>  (http://packages.debian.org/sid/libghc6-src-exts-dev) doesn't do, so
>  some extra versioning info seems to be required

Ouch, that one's pretty old. Don't the wheels of debian packaging spin
faster than that? But yeah, it should be haskell-src-exts (>= 0.3), to
avoid trying to dig up that should-be-long-dead-and-buried 0.2.1
version...

Cheers,

/Niklas
Ivan Miljenovic | 6 Oct 14:40

Re: Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

2008/10/6 Niklas Broberg <niklas.broberg <at> gmail.com>:
>>  * the dependency on haskell-src-exts says any version should do, but
>>  the one shipped in Debian Sid
>>  (http://packages.debian.org/sid/libghc6-src-exts-dev) doesn't do, so
>>  some extra versioning info seems to be required
>
> Ouch, that one's pretty old. Don't the wheels of debian packaging spin
> faster than that? But yeah, it should be haskell-src-exts (>= 0.3), to
> avoid trying to dig up that should-be-long-dead-and-buried 0.2.1
> version...
>
> Cheers,
>
> /Niklas

OK, I'll try and fix those dependency issues in the next couple of
days.  I didn't specify a version of haskell-src-exts, as I couldn't
find any way of telling which versions were compatible (then again, I
was only able to work out how to use it and what everything meant by
reading the source directly...).

Gwern: I think I've found why it never ends on xmonad-contrib (it
happens for me here on the Grahpalyze library as well): when doing
clique/cycle detection, if a function recurses on itself more than
once (e.g. multiple pattern matches, each of which recurses) then the
clique detection at the very least goes nuts and tries creating an
infinite one-function clique.  This probably happens for cycles when
there's multiple edges between two functions.  I think the way to fix
this is to have a function that turns a graph into a simple graph
(i.e. no multiple edges or loops; well, maybe _one_ loop) and get the
(Continue reading)

Gravatar

Re: Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3


I had this problem:

lane <at> biped:~/src/roguestar/rsagl (master)$ SourceGraph rsagl.cabal
dot: width (40671 >= 32768) is too large.
dot: width (43275 >= 32768) is too large.
dot: width (43720 >= 32768) is too large.
dot: width (40525 >= 32768) is too large.
Unable to generate report
lane <at> biped:~/src/roguestar/rsagl (master)$ dot -V
dot - Graphviz version 2.20.2 (Sat Aug 16 05:41:32 UTC 2008)

--Lane
Gwern Branwen | 8 Oct 23:09

Re: Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

On 2008.10.06 22:40:21 +1000, Ivan Miljenovic <ivan.miljenovic <at> gmail.com> scribbled 1.6K characters:
...
> Gwern: I think I've found why it never ends on xmonad-contrib (it
> happens for me here on the Grahpalyze library as well): when doing
> clique/cycle detection, if a function recurses on itself more than
> once (e.g. multiple pattern matches, each of which recurses) then the
> clique detection at the very least goes nuts and tries creating an
> infinite one-function clique.  This probably happens for cycles when
> there's multiple edges between two functions.  I think the way to fix
> this is to have a function that turns a graph into a simple graph
> (i.e. no multiple edges or loops; well, maybe _one_ loop) and get the
> clique detection, etc. routines use the output of that for processing.
>
> --
> Ivan Lazar Miljenovic

So it'll be fixed for the next release? Cool then; I look forward to seeing my XMC modules' analysis.

--
gwern
DES DDR
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Ivan Miljenovic | 9 Oct 00:42

Re: Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

2008/10/8 Gwern Branwen <gwern0 <at> gmail.com>:
>
> So it'll be fixed for the next release? Cool then; I look forward to seeing my XMC modules' analysis.
>

Yeah, I was planning on making a new release some time this week...
and then I somehow accidentally uninstalled just about everything on
my system, and have to do a reinstall :s

--

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic <at> gmail.com
IvanMiljenovic.wordpress.com
Magnus Therning | 6 Oct 14:44

Re: Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

On Mon, Oct 6, 2008 at 1:19 PM, Niklas Broberg <niklas.broberg <at> gmail.com> wrote:
>>  * the dependency on haskell-src-exts says any version should do, but
>>  the one shipped in Debian Sid
>>  (http://packages.debian.org/sid/libghc6-src-exts-dev) doesn't do, so
>>  some extra versioning info seems to be required
>
> Ouch, that one's pretty old. Don't the wheels of debian packaging spin
> faster than that? But yeah, it should be haskell-src-exts (>= 0.3), to
> avoid trying to dig up that should-be-long-dead-and-buried 0.2.1
> version...

Yeah, I know.  I reported a bug against it and if I find the time
tonight I'll try to build an updated debian package.  Not sure what
the policy is ATM for NMUs though.

/M

--

-- 
Magnus Therning                        (OpenPGP: 0xAB4DFBA4)
magnus@therning.org          Jabber: magnus@therning.org
http://therning.org/magnus         identi.ca|twitter: magthe
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Iavor Diatchki | 6 Oct 18:19

Re: Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

Hi all,
(this message is an ad:-)
For people interested in visualizing dependencies between the modules
in their project: on Hackage there is another simple tool called
"graphmod" that can generate a dot graph from your Haskell source
code.
-Iavor

2008/10/6 Magnus Therning <magnus <at> therning.org>:
> On Mon, Oct 6, 2008 at 1:19 PM, Niklas Broberg <niklas.broberg <at> gmail.com> wrote:
>>>  * the dependency on haskell-src-exts says any version should do, but
>>>  the one shipped in Debian Sid
>>>  (http://packages.debian.org/sid/libghc6-src-exts-dev) doesn't do, so
>>>  some extra versioning info seems to be required
>>
>> Ouch, that one's pretty old. Don't the wheels of debian packaging spin
>> faster than that? But yeah, it should be haskell-src-exts (>= 0.3), to
>> avoid trying to dig up that should-be-long-dead-and-buried 0.2.1
>> version...
>
> Yeah, I know.  I reported a bug against it and if I find the time
> tonight I'll try to build an updated debian package.  Not sure what
> the policy is ATM for NMUs though.
>
> /M
>
> --
> Magnus Therning                        (OpenPGP: 0xAB4DFBA4)
> magnus@therning.org          Jabber: magnus@therning.org
> http://therning.org/magnus         identi.ca|twitter: magthe
(Continue reading)


Gmane