Re: Re: software design clarification

Stefan Seefeld <[email protected]> Thu, 03 May 2007 14:20:38 -0400
Newsgroups gmane.comp.documentation.synopsis
Message-ID <[email protected]>
Markus Elfring wrote:
> 
>> You seem to keep arguing for a design that needs to be done, but you fail
>> to tell us what it actually is that you want to design. Think
>> "use-case driven
>> design", if that helps.
>>   
> 
> Example: How would you perform a search for called functions with
> non-void return types in the source files?

(Please note that right now Synopsis doesn't provide a call-graph, so this
 is a bit speculative. For the point of the argument, let's assume the
 Abstract Syntax Tree kept statements, too.)

I would traverse the AST, looking for function calls. For each hit, I
would check the source position this call was dragged in from (may be
an included file), as well as the function prototype, to find the return
type. It's the traversal object's responsibility to collect all matches,
so once the traversal is finished, I can get back the list.

>> common to what ?
> 
> Do Python and C++ use the same Synopsis class library implementations?

I'm not sure what you mean by 'class library implementation' here.
Synopsis provides multiple representations, some are language-specific
(the parse tree is C++ specific, for obvious reasons), some are not (the
AST is used by both C++ and Python).

>> And why the future tense ? What about the existing APIs ?
>>   
> 
> Your own documentation indicates this.
> http://synopsis.fresco.org/docs/DevGuide/type-analysis.html

And ?

>> No idea. To be honest, such a name change is the least of my concerns
>> right now.
>>   
> 
> I expect consistent names as preconditions for correct design.
> Are more software developers interested in a proper source code
> refactoring?
> 
> 
>> OK, fine. That paragraph suggests swig does some code analysis, too.
>> What was your question, then ?
>>   
> 
> I guess that it will need some more efforts for Synopsis souce code to
> achieve similar parsing capabilities like SWIG or AspectC++.

Fair enough. I also guess that continuing to discuss with you won't help
the matter either. :-(

Regards,
		Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...