Thread: [SrcML] static source code analyzis
Status: Beta
Brought to you by:
crashchaos
From: Leif B. <lei...@in...> - 2005-05-03 23:36:41
|
I explored the field of "static source code analyzis" a bit, and wanted to ask you what you think about it... My main goal is a tool which supports the programmer with static analyses (like possible errors, unused code, will be defined later in detail). Therefore a plug-in into an existing IDE (like Eclipse), instead of a single GUI-application, would be fine. Because I don't have a clue how to write an Eclipse plug-in, I thought about an Ant plug-in (this is probably just a normal java program). This way you can also include this in your build process and could be useful. So for this tool I will need the "analyze platform" which handles the analyze plug-ins, and the plug-ins themselves. I'm still thinking about a reasonable set of plug-ins. be patient :-) Now feel free to criticize me and tell me what you think about. Leif Bladt |
From: Frank R. <fra...@in...> - 2005-05-04 08:14:41
|
On Wed, May 04, 2005 at 01:36:31AM +0200, Leif Bladt wrote: > My main goal is a tool which supports the programmer with static > analyses (like possible errors, unused code, will be defined later in > detail). Therefore a plug-in into an existing IDE (like Eclipse), > instead of a single GUI-application, would be fine. Because I don't > have a clue how to write an Eclipse plug-in, I thought about an Ant > plug-in (this is probably just a normal java program). Ant plugin? Ant is a build platform which is comparable to GNU make. I don't think it makes sense to plug into that. As for an Eclipse plugin this has been planned for a while now. We can offer you a book on the subject (Gamma et.al: Contributing to Eclipse) in which you can read up on how plugins for Eclipse are created. Basically it's a very simple process of writing a special XML file for your plugin. The statical analyses per se don't really require Eclipse, so the Eclipse integration would rather mean making the complete SrcML Framework available within Eclipse (i.e. allowing the current file/project to be parsed). We'll have to think of how to get the plugins done easily and still be able to run the rest without Eclipse as well. > So for > this tool I will need the "analyze platform" which handles the analyze > plug-ins, and the plug-ins themselves. I'm still thinking about a > reasonable set of plug-ins. be patient :-) The platform will be neccessary of course. What I'm wondering (without having thought about it in lengths yet, so I guess you're ahead of me there) is whether we should have different types of plugins for 1) performing the analysis and 2) presenting the result. The Eclipse plugin should then be a plugin of the second type. And of course one to invoke the platform and the plugins of type 1. -- Raiser, Frank Student @ University of Ulm (www.uni-ulm.de) Not all comments are bad. But they are generally deodorant; they cover up mistakes in the code. (Christian Sepulveda) |
From: Leif B. <lei...@ma...> - 2005-05-04 15:31:58
|
Hmm, I think the term "plug-in" is a little confusing. With plug-ins I mean the plug-ins for the "analyzer platform", which are accesible via the API. To use them, we need a "tool", which can be either a single java program or an Eclipse plug-in. > Ant plugin? Ant is a build platform which is comparable to GNU make. > I don't think it makes sense to plug into that. What I meant was to create an Ant task to call the analyzer tool (written in java for example). Just like you execute the JUnit tests. For me it makes sense, because you could run your JUnit tests with 'ant test' and your static analysis with 'ant analyze'. What do you think? > As for an Eclipse plugin this has been planned for a while now. We can > offer you a book on the subject (Gamma et.al: Contributing to Eclipse) > in which you can read up on how plugins for Eclipse are created. > Basically > it's a very simple process of writing a special XML file for your > plugin. > The statical analyses per se don't really require Eclipse, so the > Eclipse > integration would rather mean making the complete SrcML Framework > available > within Eclipse (i.e. allowing the current file/project to be parsed). > We'll > have to think of how to get the plugins done easily and still be able > to > run the rest without Eclipse as well. I would appreciate an Eclipse plug-in for the SrcML project, too. And the analyze functions should be part of it. But I think this whole plug-in is work for more than one person :-) Leif Bladt |
From: Frank R. <fra...@in...> - 2005-05-04 18:42:33
|
On Wed, May 04, 2005 at 05:31:50PM +0200, Leif Bladt wrote: > Hmm, I think the term "plug-in" is a little confusing. With plug-ins I > mean the plug-ins for the "analyzer platform", which are accesible via > the API. Or rather the PluginManager residing in the config package. > To use them, we need a "tool", which can be either a single > java program or an Eclipse plug-in. Or both. > >Ant plugin? Ant is a build platform which is comparable to GNU make. > >I don't think it makes sense to plug into that. > What I meant was to create an Ant task to call the analyzer tool > (written in java for example). Just like you execute the JUnit tests. > For me it makes sense, because you could run your JUnit tests with 'ant > test' and your static analysis with 'ant analyze'. What do you think? Ah ok. I misunderstood you there. Yes that would be a possibility too. I generally believe that there are a lot of different places where the analyses can actually be applied then. But indeed the combination of JUnit tests and analyses through ant sounds like a good idea. > I would appreciate an Eclipse plug-in for the SrcML project, too. And > the analyze functions should be part of it. But I think this whole > plug-in is work for more than one person :-) Ok done :) Simon wanted to work on the Eclipse plugin anyways, so you two could adjust your schedules so that you can get the basic version of an analyzer platform done while Simon prepares the integration of SrcML into Eclipse. You could then flesh out the details of the Eclipse plugin together. As for the analyze functions to be part of the Eclipse plugin I'm not sure I understood you correctly. The goal of the Eclipse plugin should be calling the SrcML Framework. And the various possible analyses should be available outside of Eclipse as well (f.ex. to be used in an ant task). But of course the Eclipse plugin (or plugins.. I'm not yet sure about that) will have to be able to access the analyzer functions in some way (as well as display the results). -- Raiser, Frank Student @ University of Ulm (www.uni-ulm.de) If you torture data sufficiently, it will confess to almost anything. (Fred Menger) |