| Incremental mode [message #1018732] |
Thu, 14 March 2013 07:28  |
Thomas Buchmann Messages: 51 Registered: November 2010 |
Member |
|
|
Hi,
i'm wondering how the incremental mode in MoDisco is implemented. Does "incremental" mean that if i run MoDisco on an already discovered project (e.g. if the source code was changed after the former discovery), that the resulting MoDisco model is updated rather than created from scratch again?
Regards,
Thomas
|
|
|
| Re: Incremental mode [message #1018870 is a reply to message #1018732] |
Thu, 14 March 2013 11:44   |
Hugo Bruneliere Messages: 470 Registered: July 2009 |
Senior Member |
|
|
Hello,
MoDisco does not currently provide an incrementality support per se, as reverse engineering usually deals with legacy systems that are not modified anymore (or at least not frequently or significantly).
Talking about model discovery, the discoverers as provided by MoDisco currently allow to get models out of your projects but these models are not actually synchronized with the source code: if a modification occurs in the source code, the full corresponding model will have to be (re)generated.
Best regards,
Hugo
------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
|
|
|
|
| Re: Incremental mode [message #1018890 is a reply to message #1018875] |
Thu, 14 March 2013 12:16   |
Hugo Bruneliere Messages: 470 Registered: July 2009 |
Senior Member |
|
|
The implementation of each discoverer is independent from the MoDisco infrastructure.
Discoverers are just plugged onto MoDisco via a common interface.
So I guess the more efficient way to proceed for you is to start from the current implementation of the MoDisco Java discoverer for instance, and to modifiy it to create a "new" discoverer that you will later on also plugged onto MoDisco via this same interface.
Hugo
------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
|
|
|
|
| Re: Incremental mode [message #1044051 is a reply to message #1043813] |
Thu, 18 April 2013 08:41  |
Fabien Giquel Messages: 134 Registered: July 2009 |
Senior Member |
|
|
Hi Thomas,
I had a look at the JDTVisitor. Its seems to me that the code is complete for what it was supposed to do :
- the visit(VariableDeclarationFragment) does the job to determine previously references and reuse the proxy (call setProxy(false)).
- the visit(FieldDeclaration) does not have to do it, since a FieldDeclaration is just a container for VariableDeclarationFragment. No other statement has reference to one "FieldDeclaration".
Now may be the problem is that you consider the existing parameter called "INCREMENTAL_MODE" as a way to manage the incremental update of one java model. Actually the INCREMENTAL_MODE just proposes some memory optimization, not an attempt of "incremental model update" as you want to do. The memory optimization works as follows :
- when the jdtvisitor encouters some reference to unknown java type/method/field, a "proxy" element is created
- if INCREMENTAL_MODE==false, the discoverer tries to substitute "proxies" with concrete elements at the final end of discovery
- if INCREMENTAL_MODE==true, the discoverer tries to substitute "proxies" with concrete elements at many steps (each java package, and each time a type/method/field declaration is visited)
You may ask through one bugzilla entry to set some fields from JdtVisitor/JavaReader "protected". When possible, one commiter will study the impacts of this modification.
hoping it will help you,
Fabien.
----------------------------------------------------
Fabien GIQUEL
R&D Engineer
Mia-Software
4, rue du Château de l'Eraudiere
44324 NANTES CEDEX 03
----------------------------------------------------
|
|
|
Powered by
FUDForum. Page generated in 0.01769 seconds