Re: Synopsis as documentation tool

[email protected] (Gilles J. Seguin)
Newsgroups gmane.comp.documentation.synopsis
Message-ID <[email protected]>
On Tue, 2005-12-13 at 00:42 -0800, TR wrote:
> Seems pretty ambitious. I'd be interested in hearing a description of how such 
> a thing might be accomplished.
> 
> -TR

nomenclature can be obtain from
http://en.wikipedia.org/wiki/Control_flow

Seeing "control flow statements" like a node in a graph.
This node will have outgoing branches;
- we want the number of those branches.

Branches will normally reduce/merge at predefine nodes.

Human brains work best when this information have a graphical
representation (synopsis already use graphviz).


Synopsis is not ready for this yet.
- missing label list in function-body production.
- scopes introduce by declaration in block statement.  You can not jump
  in a middle of a scope.


Example of use of this information is typically shown by optimization
steps.  Optimization will take different paths depending on desired
effects.

Typical applications will want
- analysis/comprehension of the code.
- transformations, code injections. 
- QA analysis

hope this help

> On Mon December 12 2005 3:53 pm, Gilles J. Seguin wrote:
> > On Mon, 2005-12-12 at 08:49 -0500, Stefan Seefeld wrote:
> > > Tom Russell wrote:
> > > > I looked into using Synopsis to generate control-flow diagrams as
> > > > documentation for C code. This was a while back. I didn't get far, as I
> > > > was waiting for an engineer at work to show me how it might be useful.
> > > > The last news I got was that, since our code uses function pointers
> > > > extensively, that this probably wouldn't be worth the effort. I assume
> > > > this is correct.
> > >
> > > Right. Synopsis presently doesn't provide the required analysis, though
> > > something like that would be a very useful extension. As always,
> > > contributions are very much appreciated.
> >
> > It is on my TODO list also
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.