Home
D8.2.1 Components for Model Discovery from Legacy
Contents
1. esee 31 SMS MED DUC NN UR mmm 31 2225 Licensine IDEO HDI OP EU TUNE 32 3 2 3 Component Generic UML Class Diagram Discoverer from Microsoft library 32 Faal OVC 32 32 3 2 9 9 33 3 2 3 4 Download and installation esee 33 33 3 2 3 6 Licensing information 33 3 2 4 Component SharePoint Data Model Discoverer from SharePoint database 33 SVP 33 2442 PUN descripti 34 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 5 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 22 20 34 3 2 4 4 Download and installation instructions 34 DP A nur m H M 35 SPA MM m D TU TT 35 3 3 ceneni m 36 3 3 1 Component Generic XML Model Discover and Aggregator from XML A 36 UII 36 598 611 enar tesco sted pU ndi coded e
2. ccssseccccecssseseccecessesccsecusessessecnsessesseenssseesees 19 3 1 4 Component Generic UML Class Diagram Discoverer structural part of the code from Java 5 2 52 20 SWR NNMERO UI 20 3 1 4 2 Functional 20 0 00 20 94 59 MECHANICA SPECI ICALIONS 21 3 1 4 4 Download and installation instructions 21 SW RENE Noch MT T 21 MICELI IVS MOM UO eT 22 3 1 5 Component Generic UML Activity Diagram Discoverer behavioural part of the code from Java source code direct ccccccccseesseccccecsseseccecessesecsecuseesessecusessesseensesessees 22 MEN MERO GING n 22 22155227 22 3 15 3 Technical specifications lena e cp eau iret veg 23 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 4 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 3 1 5 4 Download and installation instructions 23 MP CERIS ocu e 24 3 1 5 6 Licensing duce T o UTEM 24 3 1 6 Componen
3. For more information reference documentation or download installation instructions please go to the MoDisco homepage 4 3 1 7 Component Generic UML Profile Discoverer from Java API library 3 1 7 1 Overview Most modern programming languages nowadays provide a mechanism to express attributes over program elements which lead to what is called attribute oriented programming Utilizing meta attributes is widely adopted in practice and supported in several programming languages through for example annotations in Java and Scala attributes in CH and decorators in Python The focus of the Profile Discoverer component is on Java annotations as Java already introduced the concept in 2004 and therefore many known libraries have embraced them such as the Java Persistence API JPA to denote strong and weak entities Enterprise Java Beans EJB to manage the state of session beans Spring to provide inversion of control and dependency injection and Guava to define non nullness for method parameters and return values The practical value of attributes has not only been recognized at the programming level but also at the modelling level Notably in UML stereotypes show similar representational capabilities as annotations in Java Therefore UML stereotypes be derived from established libraries and frameworks in order to produce corresponding UML Profiles cf example from Figure 9 The availability of UML Profiles ensures that annotatio
4. www artist project eu Page 29 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 3 2 1 6 Licensing information This component is provided as open source but requires Sparx Enterprise Architect cf general licensing information in Section 2 6 3 2 2 Component Generic UML Sequence Diagram Discoverer behavioural part of the code from C execution direct 3 2 2 1 Overview This new component is based on the Visual Execution Analyzer and is now part of the Sparx Enterprise Architect standard provided features which processes the structures and operations of the Sparx EA Model Driven Development Environment MDDE The MDDE provides tools to design build and debug an application all of them forming part of the Debugger facilities of Enterprise Architect One of the primary objectives of the Visual Execution Analysis feature is to enable working with the stack traces captured when debugging an application in order to generate a UML Sequence Diagram This is a practical way to have a good representation of what a C program is doing during its execution phase 3 2 2 2 Functional description Enterprise Architect will record arguments to functions and can optionally capture state transitions for a given State Machine Calls to functions are aggregated on the class by default but lifelines can also be created for each instance of an object This information ca
5. General information e Status Alpha e Release 0 1 3 1 5 4 Download and installation instructions Thus this component requires the following software to be installed e Eclipse Platform get the latest Eclipse Modeling bundle e Eclipse MoDisco SDK e Eclipse ATL SDK e Eclipse UML2 As for the other newly developed components the sources can be downloaded from the public repository cf section 2 5 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 23 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 3 1 5 5 User manual To use the component you can start from a Java code model as previously obtained from the Java Code Model Discoverer for instance cf section 3 1 1 and then e Right click on the Java code model e Select the following menus Discovery Discoverers Java2UMLDiscoverer Activity Diagram e Enter whether you want to serialize the output UML model and manually set its location e Validate your choices in the window and run the discovery process The resulting UML model will by default i e if not specified differently be saved at the same level than the Java code model Model Model root model packagedElement 12 Activity e Activity Activator start Activity e Activity Activator stop Activity Activity Activator getDefault Activity Activit
6. 8 2 Model Discovery Tool getLegacyArtifact get setModel getMetamaodel i getMzMTransfarmatian Java Discovery Tool E NET Discovery Tool obtainView Figure 1 Excerpt of the ARTIST Architecture the Model Discovery component Going out of the ARTIST project the Model Discovery toolbox has also value by itself Independently from the considered global approach or process it may be used in it can bring interesting benefits to all activities involving the simple observation or deeper analysis of existing software systems 2 3 Technical description From an implementation perspective the choice has been made very early to rely as much as possible on already existing technologies e Eclipse EMF 2 MoDisco 4 amp ATL 1 for the Java EE world e Sparx Enterprise Architect 12 for the NET world The objective is to be able to benefit from the well established tool support and related communities The plan is of course to reuse the various provided components as a base for the Model Discovery Toolbox developments but also to potentially upgrade extend them if needed or relevant within the context of the project e g for the sake of developing new model discoverers targeting types of legacy artifacts that are not supported yet As a model based solution the Model Discovery Toolbox is built upon a set of reference metamodels Notably the OMG UML standard metamodel 10 is used as the base for mo
7. Association Total decimal Count int Cartltems Collection lt Caertlteminfo gt 6 Pp Sm Um Common CurrentQusntityinStockdstring int GetltemsByProduct string IList lt lteminfo gt TakeStock LineltemlInfo void Getltem string Itemlnfo Pan amp Zoom dal lOrder PetShop DALFadt freadOnly CREDIT CARD ERROR MSG string Credit card pr Insert Orderinfo void ProcessCreditCard Orderlnfo void GetOrder int Orderlnfo ReceiveFromQueue int Orderlnfo LoadinsertStrategy PetShop IBLLStrategy lOrderStrategy m CD statPage 73 Petshopa TE BLL Figure 12 UML Class Diagram model opened in Enterprise Architect Project Title ARTIST Contract No FP7 317859 www artist project eu Page 28 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 In all cases the code is parsed based on a predefined grammar into an Abstract Syntax Tree AST Based on the established mapping conventions between UML Class Diagram and CH UML model is generated from the AST In case the same code has been already imported the existing UML Class Diagram is either synchronized or overwritten depending on the case this is a configurable option Note that the models originating from Enterprise Architect can also be exchanged with other environments includin
8. Package org Package dews online Package ccui Package gazetteer Package actions ClassUnit GazetteerSearchAction StorableUnit window StorableUnit inputDialog StorableUnit selectResultFromGazetteerDialog MethodUnit run w Signature run ParameterUnit ParameterUnit action BlockUnit TryUnit try BlockUnit ActionElement expression statement ActionElement ASSIGN ActionElement class instance creation ActionElement method invocation 4 Value string literal 4 Value string literal 4 Value string literal ActionElement null ActionElement if Figure 4 KDM Code model opened in the MoDisco Model Browser The component is provided by the Eclipse MoDisco project initiated and created within the context of the IST FP6 MODELPLEX EU project However it is practically reused in ARTIST as an individual component or to provide inputs to some newly developed components and so is considered as a base component from the ARTIST Model Discovery Toolbox As introduced before this particular component is actually made of a Java to KDM model transformation implemented in Java EMF 2 and is packaged as Eclipse plugins It is open source and available under the Eclipse Public License EPL 5 For more information reference documentation or download installation instructions please go to the MoDisco homepage 4 Project Title ARTIST Contract No FP7 317859 www artist
9. Text ColMame Format Indexed false o 000000 0 0 PrimaryKey false Figure 16 SharePoint Data model opened in the MoDisco Model Browser Give the output of step to as source models and a new SharePoint Data model should be set to be generated as target model as shown on Figure 16 3 2 4 6 Licensing information This component is provided as open source under the Eclipse Public License 5 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 35 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 3 3 Generic Support 3 3 1 Component Generic XML Model Discover and Aggregator from XML documents 3 3 1 1 Overview This component offers both a generic metamodel based on the XML Language Specification and the Generic XML Model Discoverer This latter allows obtaining complete XML models out of any XML document The XML model represents all the content of the initial XML document independently from the corresponding XML Schema or DTD The Generic XML Model Discoverer is provided by the Eclipse MoDisco project initiated and created within the context of the IST FP6 MODELPLEX EU project However it is practically reused in ARTIST as an individual component or to provide inputs to some newly developed components and so is considered as a base component from the ARTIST Model Discovery Toolbox Th
10. XML based cf also dedicated component below SharePoint data model in progress e From XML based artifacts o Generic XML document model complete XML model aggregator partial The coverage of the current support for Model Discovery in terms of which types of software artefacts are currently possible to discover models from can be analysed by using the Project Title ARTIST Contract No FP7 317859 www artist project eu Page 11 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 dimensions identified in the taxonomy of legacy artefacts as proposed in ARTIST cf D8 1 Regarding the main axis of the taxonomy the Technical Space TS dimension which identifies a specific technological context i e be defined as a working context with a set of associated concepts body of knowledge tools required skills and capabilities two main TSs are tackled 1 grammarware which includes those artefacts representing source code i e Java and NET source files and 2 xmlware which includes those artefacts defining XML data It is also quite easy to analyse the dimension regarding the environment as the two main technologies are Java and NET Concerning the other dimensions of the taxonomy the legacy artifacts covered until now by the ARTIST Model Discovery Toolbox have the following characteristics e Origin Most of the analyzed source code is manually p
11. MoDisco SDK As for the other newly developed components the sources can be downloaded from the public repository cf section 2 5 3 3 1 5 User manual To use the component you can start from a folder containing one or several XML files even nested in sub folders and then e Right click on this folder e Select the following menus Discovery Discoverers Multiple XML file discoverer e The same kind of window as the one shown in Figure 6 will open and ask whether you want to serialize the output XML model and set manually its location e Validate your choices in the window and run the discovery process The resulting XML model will by default i e if not specified differently be saved at the level of the initially selected folder The obtained XML model can finally be navigated using the MoDisco Model Browser for instance cf Figure 17 for seeing an example 3 3 1 6 Licensing information This component is provided as open source under the Eclipse Public License 5 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 37 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 4 Conclusion and Future Work The present deliverable is about introducing the initial version of the ARTIST Model Discovery Toolbox The main objective of this toolbox is to provide the migration engineers with the needed set of components s
12. Overview This new component packaged as a MoDisco discoverer is based on the chaining of the Java Code Model Discoverer with a newly developed Java to UML Activity Diagram model transformation implemented in ATL 1 It also relies on an Ecore implementation of the OMG UML metamodel 10 It allows producing an UML Activity Diagram model from initial Java source code only passing by an intermediate Java source code model Complementary to UML Class Diagram models produced by other components the obtained UML Activity Diagram model covers the behavioural aspects of the initial Java code by detailing the expressions and statements as expressed inside method bodies 3 1 5 2 Functional description This component currently considers e As input Java source code or eventually the Java model representing the Java source code if the Java Code Model Discoverer has already been applied separately before e As output a UML model containing UML activity diagrams corresponding to each one of the methods represented in the Java code model The intermediate Java code model being a direct representation of the content of the initial Java sources the actual conceptual mapping between Java and UML Activity Diagram is specified by the Java to UML model transformation as previously introduced An overview non exhaustive of this mapping between elements from these two metamodels is presented in Table 2 Project Title ARTIST Contract No FP7 3
13. Unported CC BY SA 3 0 http creativecommons org licenses by sa 3 0 The reported code is licensed under generally EPL Project Title ARTIST Contract No FP7 317859 cc n www artist project eu Page 2 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 open source for the Java EE support indicated otherwise for the NET support Document Description Document Revision History Modifications Introduced Version Date Modification Reason Modified by 29 07 13 First draft version Hugo Bruneliere Inria 30 08 13 Second draft version upgraded list of Hugo Bruneliere Inria v0 2 Model Discovery components and various corresponding editing 06 09 12 Master document polishing list of Hugo Bruneliere Inria mE Model Discovery components adding missing figures revising existing content 13 09 12 Version for internal review Integration Hugo integrating all the content from the Bruneliere Inria various component providers Contributions Javier Canovas Guillaume v0 4 Doux and Matthieu Allon Inria Konrad Wieland Sparx Alexander Bergmayr TUWien Bram Pellens Spikes 26 09 13 Complete version for submission to EC Hugo Bruneliere Inria V1 0 integrating comments from internal review Project Title ARTIST Contract No FP7 317859 www artist project eu Page 3 of 39 D8 2 1 Components for Mode
14. added in the toolbox when relevant This section is about giving some more details on each one of the included components 3 1 Java EE Support 3 1 4 Component Java Code Model Discoverer from Java source code This component offers both a full Java metamodel based on the Java Language Specification and the corresponding model discoverer The latter allows obtaining complete Java models out of any Java source code Depending on the entered parameters the Java model can represent every data available in the initial source code from its superstructure packages interfaces classes field and method declarations etc to the full details on the expressions and statements e g inside method bodies fg org dews online ccui gazetteer java xmi 53 Types 0 4 Instances Annotation 5 type filter text 9 AnnotationTypeDeclarat i BlockComment 5 9 ClassDeclaration 38 CompilationUnit 3 9 ConstructorDeclaration 25 FieldDeclaration 7 4 ImportDeclaration 35 InterfaceDeclaration 17 Javadoc 11 4 9 ClassDeclaration GazetteerSearchAction te eContainer name GazetteerSearchAction proxy false t comments 1 L originalCompilationUnit 1 t modifier 1 t bodyDeclarations 7 ft UineComment 2 FieldDeclaration private IWorkbenchWindow win MemberRef 4 BO mus FieldDeclaration private InputDialog inputDialog Dd 25 FieldDeclaration p
15. could be extended in next versions 2 2 Fitting into overall ARTIST solution This tooling support for the Model Discovery step ARTIST Task ID MODELDISCO is inserted at the heart of the ARTIST approach and underlying modernization methodology First it is required for the ARTIST pre migration phase it allows obtaining base models of the legacy systems that can be used to evaluate the modernization effort and so can potentially impact corresponding process planning Then if the result of the pre migration phase is positive Model Discovery is the very first step of any actual ARTIST migration process then followed by Model Understanding ARTIST Task ID MODELUNDER cf also D8 3 x Thus it is an important component for the Reverse Engineering step WP8 as preceding the Forward Engineering one WP9 Generally the objective of this toolbox is to allow provisioning the remainder of the process with the sufficient and complete enough set of models as discovered from the legacy artefacts composing the systems to be modernized The expected support for both the Java and NET worlds is shown in Figure 1 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 12 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 ARTIST Draft Architecture Migration Pre Migrations IModelUnderstanding Reverse Engineering get setMadel View Metric
16. of information that might further explain why a crash occurred Such a UML Sequence Diagram can convey more detail and provide greater understanding than reading unfamiliar code that might have been written by someone else It also makes it easier to document existing code when the model illustrates functions that are being called and the specific sequence of events that occur to produce a particular type of system behaviour Note that the models originating from Enterprise Architect can also be exchanged with other environments including the Eclipse EMF one cf Java Support as presented in section 3 1 3 2 2 3 Technical specifications To avoid too complex sequence diagrams it is possible to restrict the scope of the recorder by e Filter specify templates in the Analyzer Script to exclude methods being recorded For instance get will exclude all operations which start with get e Control Stack Depth when recording particularly high level points in an application the stack frame count can result in a lot of information being collected to achieve a quicker and clearer picture it is better to limit the stack depth 3 2 2 4 Download and installation instructions The download and installation instructions of this present component are similar to the ones of the previously introduced Generic UML Class Diagram Discoverer from CH source code cf section 3 2 1 4 3 2 2 5 User Manual Before using the MDDE check if you are us
17. recording start point the debugger immediately begins to trace all executed calls from that Project Title ARTIST Contract No FP7 317859 www artist project eu Page 31 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 point for the breaking thread Recording is stopped again when either the thread that is being captured terminates or the thread encounters a recording end point Select the appropriate package in the Project Browser in which to store the Sequence diagram To create the UML Sequence Diagram model from all recorded sequences right click on the body of the window and select the Generate Sequence Diagram context menu option 3 2 2 6 Licensing information This component is provided as open source but requires Sparx Enterprise Architect cf general licensing information in Section 2 6 3 2 3 Component Generic UML Class Diagram Discoverer from Microsoft library 3 2 3 1 Overview With this component built on top of Enterprise Architect and now part of its standard provided features it is possible to reverse engineer the structural part of Microsoft libraries i e DLL files including notably C ones as relevant in the context of ARTIST and to create UML class diagrams for it Similarly to the Generic UML Class Diagram Discoverer from CH source code cf section 3 2 1 this library DLL support comes with its own specific semantic constructs a
18. specific information Figure 17 XML Aggregated model opened in the MoDisco Model Browser Project Title ARTIST Contract No FP7 317859 cc www artist project eu Page 36 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 3 3 1 3 Technical specifications The Aggregator has been embedded in and packaged as a MobDisco Discoverer currently named fr inria artist modisco xml launcher When executed the aggregator component actually starts from a project or folder containing several XML documents files and then e Searches for XML files in the folder passed as input e an XML document has been found it launches the Generic XML Model Discoverer on it The obtained XML model is not serialized at this time and just kept in memory e The root element of the obtained XML model is stored a central XML model shared by the whole discovery process At the end of the process when all the XML files have been processed iteratively the obtained XML model is finally serialized at the same level as the directory As a summary Eclipse MoDisco 4 has been used and deployed in the context of this component for the XML metamodel and XML generic model discovery support 3 3 1 4 Download and installation instructions Thus this component requires the following software to be installed e Eclipse Platform get the latest Eclipse Modeling bundle e Eclipse
19. stereotype provides at least similar capabilities as the corresponding Java declaration the extension relationship references the UML class Type from the UML metamodel For accessing to more user information please go to the component s Eclipse Labs page as indicated in the previous subsection 3 1 7 6 Licensing information This component is provided as open source under the Eclipse Public License 5 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 27 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 3 2 NET Support 3 2 1 Component Generic UML Class Diagram Discoverer structural part of the code from C source code or assembly direct 3 2 1 1 Overview With this component built on top of Enterprise Architect and now part of its standard provided features it is possible to reverse engineer the structural part of different programming languages including notably CH as relevant in the context of ARTIST and to create UML class diagrams for it This CH support comes with its own specific semantic constructs and not all of them can be mapped directly to UML Class Diagram Hence a mapping convention exists between CH and UML In order to influence the way the UML class diagram is created from CH it is possible to write modify the grammar which is used to actually create the UML class diagram EA provides a framework
20. the update process starts Updated model repositories cannot be opened any more with the old version of EA Thus it is important to update all installed Enterprise Architect versions The download can be obtained directly from 13 There is a fully functional 30 days free trial version that is made available a valid license as well as a valid user key is then needed to get the full version cf section 2 6 for more licensing information Note that the sources are also available as mentioned in section 2 5 currently for project consortium only 3 2 1 5 User Manual Import of Source Code from a Source Code Folder Within an Enterprise Architect model the user has to select a package In the context menu of the package select Code Engineering Import Source Directory Within the opened window select the source code type here C and set a few further settings such as recursively parsing subfolders of the selected source code folder creating diagrams for the generated UML class models synchronizing existing classes or deleting UML classes not found in the source code Import of a Single Source Code File Within the Enterprise Architect s project browser a package should be selected In the context menu of the package select Code Engineering Import from source file s select the corresponding source code type here C and specify the settings see above Project Title ARTIST Contract No FP7 317859
21. 0 Final Date 26 09 2013 Terms and abbreviations Project Title ARTIST Contract No FP7 317859 www artist project eu Page 8 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 Executive Summary As ARTIST is dealing with the migration of legacy systems to the Cloud Reverse Engineering occupies a fundamental part of the developed methodology general process and supporting tooling In order to be able to efficiently realize both the migration feasibility analysis and actual migration itself the prerequisite is to be able to obtain relevant and sufficient representations of the legacy system to be migrated More precisely ARTIST is following a MDE based approach were models are considered and used as main representations of a given legacy system Thus a Model Driven Reverse Engineering MDRE tooling is needed in order to semi automatically produce these models out of the legacy artifacts composing the system MDRE mainly consists in two main phases Model Discovery and Model Understanding While Model Discovery is about obtaining base i e low level models from the various software artefacts composing the legacy system the main purpose of Model Understanding is to perform a deeper analysis interpretation of these discovered models to prepare and facilitate the next steps of the migration In the context of the ARTIST project Task 8 2 is dedicated t
22. 013 2 6 General Licensing Information Generally the objective is to propose the Model Discovery Toolbox as an open solution resulting from the ARTIST project However according to the nature of the two mainly targeted worlds markets i e Java and NET the overall approach is either fully open source or more mixed For all the Java Eclipse based components e g for the Java EE support mainly the selected license is the Eclipse Public License EPL 5 which is a known as a commercial friendly open source license This should facilitate the future potential reuse and integration of the toolbox or at least of some of its components by external partners For the Sparx Enterprise Architect based components e g for the NET support mainly the selected license for most of the new developments will also be open source However the corresponding components require Sparx EA to be installed which is released under a proprietary license according to the policy explained below e Free Trial Enterprise Architect offers a free trial version which provides full functionality for 30 days All results can be used with any other license type as well e Academic License Named User and Floating Enterprise Architect academic program offers students single user licenses educational classroom licenses up to a campus licenses EA Ultimate Edition The academic licensing course includes the same functionality as commercial products Under th
23. 17859 www artist project eu Page 22 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 Model containing the activities Package containing the classes needed to type the activities Activity containing the parameters body return expression and a result node ObjectFlow Block SructuredActivityNode containing an Initial and Final Nodes and the mapping of the Statements from the Block ReturnStatement StructuredActivityNode containing the mapping of the return expression and linking the output of this one to the result node of the Activity Table 2 Mapping excerpt used in the Java to UML Activity diagrams transformation 1 For the methods parameter representation 2 See the FUML specification 7 3 1 5 3 Technical specifications The technical aspects of this component are very similar to the ones of the previous UML Class Diagram Model Discoverer It relies on a main ATL transformation module and has been packaged as a MobDisco discoverer in a same way named fr inria artist modisco java uml discoverer java2uml activity diagram The Eclipse MoDisco 4 and Eclipse ATL 1 technologies have also been used as a base for implementing this component This discoverer allows the selection of a Java code model and automatically sets the configuration needed to launch the transformation execution and serialization of the produced UML model
24. 3 3 1 2 Component Code Model Discoverer from Java source code This component is based on the chaining of the previous Java Code Model Discoverer with a Java to KDM model transformation It also uses an Ecore implementation of the metamodel Basically this component allows producing a KDM Code model from initial Java source code passing by an intermediate Java source code model It is important to note that contrary to the Java source code model the obtained KDM Code model only covers the superstructure of the program and not the details of the expressions and statements method bodies In the ARTIST context and also more generally such a KDM support is interesting as keeping the opportunity for interoperability with other tools or solutions relying on OMG ADM standards 7 org dews onlineccui gazetteer KdmModel xmi 55 T um E 1 E 4 AbstractActionRelationship 127 type filter tet 4 AbstractCodeElement 692 AbstractCodeRelationship 117 gt AbstractinventoryElerent 3 ActionElement 232 Addresses 6 Annotation 6 2 Attribute 55 BlockUnit 28 BooleanType 1 el Calls 90 CatchUnit 2 LA CharType 1 9 ClassUnit 46 gt Codeltem 460 8 CodeModel 2 CommentUnit 18 ComputationalObject 246 ControlElement 78 Creates 17 DataElement 168 Datatype 176 DervedType 2 Element 2118 4 ExceptionFlow 2
25. D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 ARTIST FP7 317859 artist Advanced software based seRvice provisioning and migraTlon of legacy Software Deliverable D8 2 1 Components for Model Discovery from Legacy Technologies Responsible Partner Inria 26 09 2013 Status Version Final v1 0 Project Title ARTIST Contract No FP7 317859 cc n www artist project eu Page 1 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 Project Number FP7 317859 Project Title ARTIST Components for Model Discovery from Legacy Technologies Due Date of Delivery to the EC 30 09 2013 Workpackage responsible for WP8 Legacy Product Analysis by Reverse the Deliverable Engineering Title of Deliverable Contributor s Inria ATOS TUWien Sparx Spikes Approved by All Partners Recommended mandatory WP6 WP9 WP10 readers Concrete tool support allowing the generation of complete low level models out of Java amp CH legacy source artifacts following the global methodology and recommendations as provided in D8 1 or D8 2 for instance The produced models will be then used as inputs to Model Understanding technologies cf D8 3 x Keyword List MDRE Model Discovery Discoverers Licensing information This document itself is licensed under Creative Commons Attribution ShareAlike 3 0
26. Date 26 09 2013 the models originating from Enterprise Architect can also be exchanged with other environments including the Eclipse EMF one cf Java Support as presented in section 3 1 3 2 3 3 Technical specifications The technical specifications and requirements of this present component are similar to the ones of the previously introduced Generic UML Class Diagram Discoverer from C source code cf section 3 2 1 3 3 2 3 4 Download and installation instructions The download and installation instructions of this present component are similar to the ones of the previously introduced Generic UML Class Diagram Discoverer from C source code cf section 3 2 1 4 3 2 3 5 User Manual Within Enterprise Architects project browser a package should be selected In the context menu of the package select Code Engineering Import Binary Module select the corresponding file and specify the necessary settings such as Reflection Disassembly or Let EA decide Make sure to specify in case of NET the path to the correct PEVerify exe to make a proper reverse engineering possible This component provides facilities to model develop debug profile and manage an application within the modeling environment Outputs generated by the Visual Execution Analyzer supports the development process by e Giving you a better understanding of how your system works e Enabling to document system features automatically e Providing information on t
27. Ga Interface Realization IWorkbenchWindowActionDelegate Operation run action Action 0 1 void 0 1 Operation selectionChanged action Action 0 1 selection 15 Operation dispose void 0 1 5 Operation init window WorkbenchWindow 0 1 void 0 1 Dependency org dews_online ccui core control MapManager Dependency Activator Dependency SelectResultFromGazetteerDialog Dependency lAction 7 Dependency InputDialog Dependency MessageDialog Dependency ISelection Dependency IWorkbenchWindow MWoaerbkhenchWindewActianDslenate Figure 5 UML Class Diagram model opened the MoDisco Model Browser The component is provided by the Eclipse MoDisco project initiated and created within the context of the IST FP6 MODELPLEX EU project However it is practically reused in ARTIST as an individual component or to provide inputs to some newly developed components and so is considered as a base component from the ARTIST Model Discovery Toolbox As introduced before this particular component is actually made of a KDM to UML model transformation implemented in ATL 1 and is packaged as Eclipse plugins It is open source and available under the Eclipse Public License EPL 5 For more information reference documentation or download installation instructions please go to the MoDisco homepage 4 Project Ti
28. L OPENED IN THE MIODISCO MODEL BROWSER 25 FIGURE 9 UML PROFILE MODEL DISCOVERED FROM A JAVA LIBRARY JAR 26 FIGURE 10 CONCEPTUAL OVERVIEW OF THE UML PROFILE DISCOVERER 26 FIGURE 11 EXAMPLE BASED JAVA PETSTORE PERSISTENCE 2 FIGURE 12 UML CLASS DIAGRAM MODEL OPENED IN ENTERPRISE 28 FIGURE 13 UML SEQUENCE DIAGRAM MODEL OPENED IN ENTERPRISE ARCHITECT 30 FIGURE 14 OPTIONS FOR DISCOVERING A UML CLASS DIAGRAM MODEL FROM A MICROSOFT LIBRARY 32 FIGURE 15 SHAREPOINT DATA MODEL DISCOVERER ARCHITECTURE OVERVIEW 34 FIGURE 16 SHAREPOINT DATA MODEL OPENED IN THE MODISCO MODEL 35 FIGURE 17 XML AGGREGATED MODEL OPENED IN THE MODISCO MODEL 5 36 Table of Tables TABLE 1 MAPPING EXCERPT USED IN THE JAVA TO UML CLASS DIAGRAM 1 20 TABLE 2 MAPPING EXCERPT USED IN THE JAVA TO UML ACTIVITY DIAGRAMS TRANSFORMATION 23 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 7 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1
29. chnologies Version v1 0 Final Date 26 09 2013 3 1 7 4 Download and installation instructions This component requires the following software to be installed e Eclipse Platform get the latest Eclipse Modeling bundle e Eclipse MoDisco SDK e Eclipse ATL SDK e Eclipse UML2 e Java Profile As for all components the sources can be downloaded from the public repository cf section 2 5 Additionally they can also be obtained directly on the component s Eclipse Labs page from the following location https code google com a eclipselabs or uml profile store 3 1 7 5 User Manual The prototype is realized in terms of Eclipse plug ins They cover the implemented model transformation chain A jUnit test case demonstrates the execution of the model transformation chain by relying on the persistence layer of the Java Petstore In Figure 11 an excerpt of the JPA is depicted UML profile Package package javax persistence javax persistence Import i mdi metaclass import java lang annotation Documented 9 Target ElementType TYPE Retention RetentionPolicy RUNTIME Stereotyp public interface Entity Entity un String name default name String 0 1 j Figure 11 Example based Java Petstore persistence layer When executing the UML Profile discoverer the Entity annotation type declaration is transformed into the corresponding Entity stereotype To ensure that the Entity
30. class diagram structural part of the code complete direct or via e MoDisco version using the Java to to UML transformation chain implementation in Java ATL e Newly developed version already quite stable directly from the Java code model implementation ATL Generic UML activity diagram behavioural part of the code in progress e Newly developed version directly from the Java code model implementation in ATL Source model artifacts inventory e MoDisco base support reused as is in the project implementation in Java o From Java APIs libraries currently in Jars Generic UML profile in progress e Newly developed prototype implementation in Java e From artifacts o From CH source code Generic UML class diagram structural part of the code complete e Based on existing support it has been extended specialized implementation in C NET Generic UML sequence diagram at runtime execution in progress e Newly developed Enterprise Architecture extension implementation in CH NET o From Microsoft libraries currently DLL files Generic UML class diagram in progress e Newly developed Enterprise Architecture extension implementation in CH NET o From SharePoint files XML based cf also dedicated component below SharePoint data model in progress e Newly developed prototype implementation using the generic XML discovery support transformation
31. dels produced as outputs of the toolbox while the OMG KDM standard metamodel 9 is also considered as an alternative option for interoperability purposes For the Java world all metamodels are actually implemented in EMF Ecore the UML metamodel implementation is provided by the Eclipse UML2 project 6 whereas the Java and XML ones are offered by the Eclipse MoDisco project 4 For the NET world the UML2 metamodel implementation is the one fitted with Sparx Enterprise Architecture 12 Importantly an additional EA support for importing exporting EMF models from to Eclipse is being developed as part of ARTIST in order to allow model interchange between the two worlds According to the current list of features as presented in Section 2 1 here is some more information about the technical implementation of each one of them in italic the features already available but extended and or reused in the project in bold this first year newly developed features Project Title ARTIST Contract No FP7 317859 www artist project eu Page 13 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 e From Java EE artifacts o From Java source code Java code model complete e MoDisco base support reused as is in the project implementation in Java KDM code model partial e MoDisco base support reused as is in the project implementation in Java Generic UML
32. e Aggregator part has been newly developed in the context of ARTIST following the needs of some of the partners in the project in order to gather in one global XML model the information from several different XML configuration files that are actually related together For more information reference documentation or download installation instructions about the Generic XML Model Discoverer please go to the MoDisco homepage 4 For details on the Aggregator additional part please take a look to the next subsections 3 3 1 2 Functional description This component currently considers e As input several XML documents files that are grouped in a same project or directory for instance e output a complete XML model containing data extracted out of each one of the XML documents taken as inputs cf Figure 17 Es src xml xmi 23 Types ro amp Instances E 12 Attribute 1659 type filter text CDATA 0 0 Comment 173 4 DocumentTypeDeclaration 10 Element 2316 Namespace 0 Node 8154 72 Processinglnstruction 0 e Root 19 Text 3996 e Root application e Root project Root web app web app t children 27 t dtd 1 gt 1 DocumentTypeDeclaration web app Root j2ee ri specific information Root project name project children 16 Root application Root project Root web app Root ejb jar Root j2ee ri
33. e Sparx Systems academic program students can purchase individual Enterprise Architect licenses and EA add ins at academic pricing levels This program may be used exclusively for non commercial purposes and is only available for lecturers teachers pupils students or trainers e Commercial License Named User and Floating Enterprise Architect provides apart from the free trial and the academic licenses commercial licenses These can be obtained in different variants ranging from Desktop license to the Ultimate license Starting from the Corporate license unnamed licenses are available All working products originating from Enterprise Architect can be transformed to Eclipse Thus they are available either within Enterprise Architect or in other environments For more specific licensing details on each individual component please refer to the corresponding describing section as presented previously in this document Project Title ARTIST Contract No FP7 317859 www artist project eu Page 16 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 3 ARTIST Model Discovery Toolbox Components Details As introduced before in the overview section the toolbox is actually made of a set of components covering different legacy technologies In the context of ARTIST the two primarily addressed ones are Java EE and NET However other more general components can also be
34. e single model conforming to a dedicated metamodel 3 2 43 Technical specifications As a summary here are the concrete technologies that have been used and deployed in the context of this component e XML metamodel and XML model discovery Eclipse MoDisco 4 e ATLtransformations Eclipse ATL 1 General information e Status Alpha e Release O 1 3 2 4 4 Download and installation instructions This component requires the following software to be installed e Eclipse Platform get the latest Eclipse Modeling bundle e Eclipse MoDisco SDK e Eclipse ATL SDK As for the other newly developed components the sources can be downloaded from the public repository cf section 2 5 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 34 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 3 2 4 5 User Manual In order to setup the transformation pipeline it would be necessary to create a new ATL project File gt New gt ATL Project The files required can now be imported into your project within Eclipse File gt Import Select the different original input files and also import them into your project The first step of the transformation chain can be performed by executing the XML discoverer of MoDisco right click an XML file Discovery gt Discoverers gt Discover XML Model This has to be done for each of the t
35. for writing a grammar and importing it into the environment An example language source file and an example Grammar for that language are provided in the Code Samples directory which you can access from your installation directory the default location is C Program Files Sparx Systems EA Two other grammar files are also provided illustrating specific aspects of developing Grammars EA uses a variation of Backus Naur Form nBNF to include processing instructions the execution of which returns structured information from the parsed results in the form of an Abstract Syntax Tree AST which is used to generate the UML representation 3 2 1 2 Functional description In general it is possible to create a model from the source code contained in a folder structure or import a single source code file from the Net framework v X 09 Cass Diagram created 03 07 2013 11 15 22 modified 17 07 2013 10 08 06 100 791x 1043 YR c d 7 1 5 X 4 Default Style H Th Package Class Interface cartltems Dictionsary lt string CartltemInfo new Dictionary lt dal lCategory PetShop DALFact freadOnly Data Type SetQuantity string int void GetCategories IList lt Categoryinfo gt Add string void GetCstegory string CategoryInfo Add Cartlteminfo void Primitive Remove string void GetOrderLineltems Lineltemlnfo Table Clear void Enumeration Signal EE
36. g more insights on the delivery and concrete usage of the toolbox before the document is concluded and future works are proposed Project Title ARTIST Contract No FP7 317859 www artist project eu Page 10 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 2 ARTIST Model Discovery Toolbox Overview 2 1 Functional description The purpose of this first version of the ARTIST Model Discovery Toolbox is to provide modernization engineers with useful base support for performing the mandatory Model Discovery step of their MDRE processes The overall idea is from the different legacy artifacts composing the legacy systems to be migrated to obtain the required initial models for the next Model Understanding step to be performed efficiently cf deliverables D8 3 x Such a toolbox is fundamental in the ARTIST approach as the provision of reusable models out of the legacy system is a base prerequisite to the next steps of the model driven process first Model Understanding as also part of Reverse Engineering T8 3 then Forward Engineering WP9 Obtaining sufficiently accurate models even if not 10096 complete is also very important when dealing with the ARTIST pre migration phase notably with the modernization evaluation of effort and planning WP5 In a more general context the ARTIST Model Discovery toolbox can be practically useful in every activity implying the st
37. g the Eclipse EMF one cf Java Support as presented in section 3 1 3 2 1 3 Technical specifications Enterprise Architect is a Windows 32 client application and uses a database as backend The mainly used backend is a file base MSJet 3 5 or 4 0 Database For bigger projects and multiple users team environment it is recommended to use a DBMS e g MS SQL Server Oracle DB2 or MySql instead of the file based MSJet database In order to work in a team environment it is possible to use a central DB which is shared by all team members or a version control system which contains the models in a serialized form XMI SVN CVS TFS and all SCC compliant version control systems are supported for the obtained models To use version control you activate it by default at package level Nevertheless it is still possible to support finer grain merge e g at element level 3 2 1 4 Download and installation instructions This component is contained within the standard installation of Enterprise Architect EA is a Windows application which can be installed directly on the client s machine For the installation process admin permissions are necessary There is a single install file available Before installing Enterprise Architect the installer checks for an older version and uninstalls it automatically Results of older versions can be used with any newer version In few cases the model repository needs to be updated In this case you are warned before
38. he KDM Code model the obtained model is more high level and does not provide details on the insights of the described artefacts Project Title ARTIST Contract No FP7 317859 www artist project eu Page 24 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 org dews online ccui gazetteer KdmSourceMadel xmi 2 Types 0 4 T Instances 1 4 BinaryFile 6 type filter text Configuration 7 4 Directory 33 Image 2 InventoryMedel 1 Project 1 E Segment 1 SourceFile 18 BinaryFile wc db BinaryFile GazetteerSearchAction class BinaryFile Activator class BinaryFile SelectResultFromGazetteerDialog 1 class BinaryFile SelectResultFromGazetteerDialog class BinaryFile geonames 1 0 jar Figure 8 KDM Source model opened in the MoDisco Model Browser The component is provided by the Eclipse MoDisco project initiated and created within the context of the IST FP6 MODELPLEX EU project However it is practically reused in ARTIST as an individual component or to provide inputs to some newly developed components and so is considered as a base component from the ARTIST Model Discovery Toolbox This particular component is implemented as Eclipse plugins using Java JDT notably the parsing capabilities 3 and being based on EMF 2 It is open source and available under the Eclipse Public License EPL 5
39. he sequence of events that lead to erroneous events or unexpected system behavior 3 2 3 6 Licensing information This component is provided as open source but requires Sparx Enterprise Architect cf general licensing information in Section 2 6 3 2 4 Component SharePoint Data Model Discoverer from SharePoint database 3 2 4 1 Overview Customizations or extensions in Microsoft SharePoint 11 are typically installed by means of so called Features A feature could be used to define custom data structures such as Site Columns Content Types List Instances and so on The migration of a SharePoint based solution using these extensions towards a SaaS solution independent of SharePoint requires us to extract these features that are persisted in the SharePoint database and move them towards a stand alone database The purpose of this component is to provide such a transformation chain for the List Instance data structure The goal for this component is to implement the Part 1 of a 3 phase transformation chain i e produce input for another phase in which the SP data model is going to be transformed to a Database Model phase 2 Model Understanding independently from a targeted platform for it to be eventually forward engineered to an actual Database Schema phase 3 Model Understanding Project Title ARTIST Contract No FP7 317859 www artist project eu Page 33 of 39 D8 2 1 Components for Model Discovery fr
40. here all the transformation rules between the Java elements and the UML ones are defined e ATL library containing all the helpers i e reusable methods in the ATL jargon used by the different rules in the ATL module This transformation has been embedded in and packaged as a MoDisco Discoverer currently named fr inria artist modisco java uml discoverer java2uml This discoverer allows the selection of a Java code model and automatically sets the configuration needed to launch the transformation execution and serialization of the produced UML model As a summary here are the concrete technologies that have been used and deployed in the context of this component e Java metamodel and Java model discovery Eclipse MoDisco 4 e UML metamodel Eclipse UML2 6 e Java to UML model transformation Eclipse ATL 1 General information e Status Alpha e Release O 1 3 1 4 4 Download and installation instructions Thus this component requires the following software to be installed e Eclipse Platform get the latest Eclipse Modeling bundle e Eclipse MoDisco SDK e Eclipse ATL SDK e Eclipse UML2 As for the other newly developed components the sources can be downloaded from the public repository cf section 2 5 3 1 4 5 User manual To use the component you can start from a Java code model as previously obtained from the Java Code Model Discoverer for instance cf section 3 1 1 and then e Right click
41. hree input files used Step 2 of the transformation chain can be performed by running an ATL transformation Firstly the three XMI files produced in step 1 need to be transformed to models conforming to their own metamodel This can be done by defining a new Run Configuration Run gt Configurations and creating an ATL transformation configuration The XML metamodel together with one of Listinstance ecore ContentType ecore SiteColumn ecore metamodels should be set as the metamodels Next one of the XML models should be set as source model and a new XMI should be set as target model Step 3 involves a similar approach A new ATL transformation configuration has to be created specifying the three List nstance ecore ContentType ecore SiteColumn ecore metamodels together with the SPDataModel ecore metamodel Types 0 4 Instances gt Elements 1 type filter text 4 Entity 1 Property 5 lt gt Elements te eContainer t Entity 1 gt Entity EeContainer Description Id TemplateType 101 Title Spikes Together WRC Instances Url Lists SPTG Instances ContentTypeld 0x010100867EFSCOFSF E24FA28474B2CAS800ED ContentTypeMame Workflow Runtime Configuration Document Property 5 Property SPTGConfigurationld t leContainer ID 13a 26775 950a 413c 9375 9365e8fec694 SPTGConfigurationid DisplayName SPTGConfiqurationld Required false Type
42. ing the correct edition Enterprise Architect Professional Corporate or extended editions Relevant source code files need to be linked to UML classes in the model sufficient to be editable from the internal code editors either by using specific MDA Transforms to generate stub code files or by using the previously presented Generic UML Class Diagram Discoverer from C source code cf section 3 2 1 Required external frameworks or compilers must be installed and operable An Analyzer Script pointing to the external framework at least to the compiler and debugger needs to be configured to link to the external framework The Visual Execution Profiler enables you to quickly report on the most frequently called functions in a running application Tasks in an application that are taking more time than expected which functions are taking the most time in an application The Profiler only works with MS Native Windows applications but can be used under WINE Linux and Mac to debug standard Windows applications deployed in a WINE environment The Profiler can generate a report that shows how these functions are called in relation to the application Select the desired class and press F12 to open the source code to debug in the integrated source code editor Find the appropriate code line and right click in the left Breakpoint margin to bring up the breakpoint marker context menu select the required marker type If the marker is denoted as a
43. l Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 Table of Contents Table OL CODES ooo t dmt 4 E m c 7 1 VAD c 7 Tems and ROUES 8 Execute SUMMA y 9 mc 10 1 1 T 10 1 2 DOCUMEN gt NE T 10 2 ARTIST Model Discovery Toolbox Overview 11 2 1 2 E MISES 11 2 2 Fitting into overall ARTIST 12 2 3 glo 4 M T 13 2 4 Toolbox global architecture ccccccccsssccccessececeesecceeeesececeeseceeeeeeceeseusecesseecesseneeeeeas 15 2 5 General Delivery 15 2 6 General Licensing Intermiatloftsescesesskee unus Rud bu uaa 16 3 ARTIST Model Discovery Toolbox Components 5 17 3 1 17 3 1 1 Component Java Code Model Discoverer from Java source code 17 3 1 2 Component KDM Code Model Discoverer from Java source code 18 3 1 3 Component Generic UML Class Diagram Discoverer structural part of the code from Java source code via KDM
44. n be integrated with existing system knowledge and test data to optimize code execution reduce errors and determine why application failure and system crashes occur If an application crashes data corruption such as a stack overflow can prevent from diagnosing and rectifying the problem TTF oO or CTrain CNetwork CTrain 1 CityLoop CTrain 2 CTrain 3 _ rz ri Default Style x 3 55 Ca amp 1 CTrain CNetwork instance reference instance instance CTrain 1 CityLoop CTrain 2 CTrain 3 Execute CTrain DWORD 4 x Run DWORD Execute CTrain DWORD DI Run DWORD time int Execute CTrain DWORD Run DWORD OnArrival CStation DWORD Disembark DWORD Flinders Lonsdale GD start Page Using the Example Model Portable Audio Player Figure 13 UML Sequence Diagram model opened in Enterprise Architect Project Title ARTIST Contract No FP7 317859 www artist project eu Page 30 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 However the present component enables you to record a given execution sequence as a UML Sequence Diagram to provide a reliable source
45. nd not all of them can be mapped directly to UML Class Diagram Thus it is also possible to adapt if needed the mapping actually used to create the UML class diagram cf section 3 2 1 1 3 2 3 2 Functional description In general it is possible to create a model from an import of a binary module from the Net or Java framework In this case the binary is parsed based on two different methods either using reflection as provided by the NET framework or by performing a disassembly of the considered library DLL as shown on next Figure 14 Import Binary Module 59 File s C Program Files Sparx Systems EATOO EAS3 0 Source Net Portable Executable dil Generation Import Method 9 Synchronise existing classes Reflection Overwrte existing Classes Disassembyy Create Logical Diagram for Let EA decide each package Do not import private members Please be aware that creating diagrams for each package may signficantly increase the time required to import Figure 14 Options for discovering a UML Class Diagram model from a Microsoft library In case the same binary has been already imported the existing UML Class Diagram is either synchronized or overwritten depending on the case this is a configurable option Note that Project Title ARTIST Contract No FP7 317859 www artist project eu Page 32 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final
46. ns in the legacy software can also be represented at the modelling level In D8 3 1 the application of UML stereotypes throughout the reverse engineering of UML models from Java code is demonstrated From the perspective of the forward engineering UML stereotypes can be used to render UML models more specific Project Title ARTIST Contract No FP7 317859 www artist project eu Page 25 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 stereotype metaclass stereotype stereotype stereotype OnLoad H Operation 5 Entity Eg expirationSeconds int E name String stereotype stereotype Y e Translate Serialize early boolean g zip boolean compressionLevel int metaclass Type stereotype 1 ster AlsoLoad stereotype metaclass Embed H Parameter E value String E Property stereotype Index stereotype A Load _ stereotype 5 Unindex stereotype EntitySubclass stereotype stereotype stereotype Eg name String Parent IgnoreLoad Ignore E index boolean Eg alsoLoad String stereotype stereotype stereotype 5 Id IgnoreSave Mapify 1 value value
47. o that they can perform the very first step of their MDRE processes Taking as inputs the legacy artifacts composing the legacy systems to be migrated potentially coming from the Java EE or NET world the toolbox allows producing as outputs the base models that are sufficient and relevant for continuing the processes i e dealing with Model Understanding During this first year of the ARTIST project the foundations have been set in order to build this initial version of the ARTIST Model Discovery Toolbox As a summary the work performed until now has mainly consisted in 1 Identifying the already available support that is relevant and useful in the context of ARTIST and its use cases Thus two main platforms have been chosen in order to elaborate further on the two main families of support basically Eclipse MoDisco for Java EE and Sparx EA for NET 2 Selecting the interface or exchange format with the following Model Understanding step and corresponding toolbox cf D8 3 2 Generic UML models and or more low level models e g KDM Java CH are going to be shared from this Model Discovery toolbox to the Model Understanding one 3 Prototyping new discovery components according to the missing support or to the requirements expressed by use case providers or Model Understanding actors For instance new generic UML discoverers have been are being developed The current version of the toolbox is mainly resulting from the various expe
48. o the study design and implementation of the support to this initial Model Discovery phase The present document is focusing on the actual tooling support concretely implemented and provided within the context of ARTIST namely the ARTIST Model Discovery Toolbox The main objective of this toolbox is to provide to the migration engineers the set of generic components they require to build base models from the various legacy artifacts of a given legacy system As part of ARTIST and related to the project s use cases the support for both the Java EE and NET technical spaces is being addressed Thus two main families of discovery components are provided accordingly In addition to offering a big picture of the toolbox this deliverable is also giving more insights on each one of these individual components developed by different partners in the project As mentioned previously the models produced thanks to the ARTIST Model Discovery Toolbox are base models in the sense that they are direct systematic representations of the content of the legacy artifacts potentially conforming to different metamodels e g UML KDM or other more specific metamodels It is very important to notice that no further analysis or interpretation of this content have been realized up to this point the ARTIST Model Understanding Toolbox cf D8 3 1 is then in charge of performing these next operations Project Title ARTIST Contract No FP7 317859 www artist pr
49. oject eu Page 9 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 1 Introduction Within the context of ARTIST or more generally in any other software modernization project different kinds of legacy artifacts very often have to be considered They are usually heterogeneous in the sense of having different structures formats quality or relying on different technologies cf D8 1 Taxonomy of Legacy Artifacts for getting more details on these several aspects and their actual impact on Model Discovery The required first step of obtaining useful higher level representations of such legacy software is called Reverse Engineering RE which is applied before Forward Engineering FE activities can be performed to actually obtain the modernized system As promoted in the ARTIST approach a Model Driven Reverse Engineering MDRE process is commonly composed of two main consecutive phases e Model Discovery which consists semi automatically producing initial base i e low level and or systematic models from the various artifacts composing the software system e g source code configuration files data files etc e Model Understanding which allows computing from the previously discovered models a set of more specific models views describing the system in such a way that the next Forward Engineering phase can be performed efficiently The present document and accom
50. om Legacy Technologies Version v1 0 Final Date 26 09 2013 3 2 4 2 Functional description The component provides a transformation pipeline together with the supporting metamodels and transformations involving a number of steps to be able to convert a SharePoint feature particularly a List Instance towards a SharePoint Data Model This is achieved by means of a number of steps see figure below SP Metamodels SP Metamodel s XML2SPListATL lt sPLit2sp 5 0 Data Model ATL 2 AR Confarms to Conforms to 1 T 1 i Sp 1 1 er In n 14 c L lt a DataModel xmi Listinstance xml ListInstance xmi ContentTypes xml ContentTypes xmi SiteColumns xml SiteColumns xmi Figure 15 SharePoint Data Model Discoverer Architecture Overview In step 1 XML models are discovered from XML files conforming to the SharePoint schema definitions 11 This is done using the Generic XML Model Discoverer as introduced before Here three files are being produced which are direct mappings of the original input files In step 2 the output of step 1 is being transformed each via a dedicated ATL transformation to intermediate models each conforming to a dedicated metamodel For this a metamodel for the List Instance Content Type and Site Column have been provided Finally in step 3 a combined view is given via a single transformation of multiple models towards on
51. on the Java code model e Select the following menus Discovery Discoverers Java2UMLDiscoverer Class Diagram e Enter as shown on Figure 6 whether you want to serialize the output UML model and manually set its location e Validate your choices in the window and run the discovery process The resulting UML model will by default i e if not specified differently be saved at the same level than the Java code model Project Title ARTIST Contract No FP7 317859 www artist project eu Page 21 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 Launching discovery fr inria artist modisco java uml discoverer java2uml Please enter desired values for the following in inout discovery parameters Name Type REFRESH SOURCE BEFORE boolean TARGET MODEL org eclipse emf ecore resource Resource TARGET URI org eclipse emf commoan util URI SERIALIZE TARGET boolean marks a required parameter Open model in editor after discovery Figure 6 Parameter selection for the UML Class Diagram Model Discoverer The obtained UML model can finally be navigated using the MoDisco Model Browser for instance 3 1 4 6 Licensing information This component is provided as open source under the Eclipse Public License 5 3 1 5 Component Generic UML Activity Diagram Discoverer behavioural part of the code from Java source code direct 3 1 5 1
52. ool Available at http www eclipse or 4 Eclipse MoDisco tool Available at http www eclipse org MoDisco 5 Eclipse Public License terms Available at http www eclipse org legal epl v10 html 6 Eclipse metamodel Available at http www eclipse org uml2 7 OMG ADM Task Force Homepage http adm omg org 8 OMG fUML specification Available at http www omg org spec FUML 9 specification Available at http www omg org technology kdm 10 OMG UML specification Available at http www uml org 11 SharePoint schema definition Available at http msdn microsoft com en us library ms476062 aspx 12 Sparx Enterprise Architect toolset Available at http Www sparxsystems com products ea 13 Sparx Enterprise Architect trial version download Available at http Www sparxsystems com products ea trial html Project Title ARTIST Contract No FP7 317859 www artist project eu Page 39 of 39
53. ork As dedicated to MDRE activities and intensively reused enhanced in the context of ARTIST Reverse Engineering tasks it is a perfect candidate For the NET world a similar integration is performed via Sparx Enterprise Architect components are actually Sparx EA add ons as a tool suite developed by one of the partners of the project Next section presents with more details each one of the different components forming these two main families of support respectively for the Java EE and NET legacy technologies 2 5 General Delivery Information The sources of the different components newly developed during this first year of the ARTIST project have been grouped in a Zip file that has been put on the ARTIST Livelink repository at Deliverables M12 folder Concerning the other components that are used and sometimes improved in ARTIST but were already existing prior to the project e g from MoDisco 4 or Sparx EA 12 they generally remain available from their respective infrastructures and continue to follow their regular delivery cycles For more installation details or user manual information on each individual component please refer to the corresponding describing sections as presented after in Section 3 of this document Project Title ARTIST Contract No FP7 317859 www artist project eu Page 15 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2
54. panying software actually focuses on the initial version over three all along the project of the concrete tool support for this first Model Discovery phase This Model Discovery support will be conceptually detailed later on as part of upcoming D8 2 Methodologies and Techniques for Model Discovery For your information note that the corresponding Model Understanding support is described in D8 3 1 Mechanisms for Viewpoint Definition and View Extraction from Models of Legacy Artifacts The overall idea is not to provide a unique tool deeply integrating all the developed components notably because of the technical heterogeneity of the legacy platforms e g Java J2EE vs C NET in the context of ARTIST It is rather to offer an open Model Discovery Toolbox in which the migration engineer can pick up the components s he needs to deal with this first phase of her his MDRE process 1 1 Aboutthis deliverable This document is the complement to the delivered software components in the specified date and deliverable name at the head of the document 1 2 Document structure The document is structured as followed A first part is an overview of the ARTIST Model Discovery Toolbox providing general information and presenting its architecture main features and corresponding components A second part is giving more detailed data about each one of the individual components specific capabilities technical implementation etc A last part is offerin
55. project eu Page 18 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 3 1 3 Component Generic UML Class Diagram Discoverer structural part of the code from Java source code via This component is based on the chaining of the previous KDM Code Model Discoverer with a KDM to UML model transformation It also uses Ecore implementations of the OMG KDM and UML metamodels Basically this component allows producing a UML Class Diagram model from initial Java source code passing by intermediate Java source code and KDM Code models It is important to note that similarly to the Code model the obtained UML Class Diagram model only covers the structure of the program and not the details of the expressions and statements method bodies These behavioural aspects are to be actually covered by the Generic UML Activity Diagram Model Discoverer cf section 3 1 5 org dews online ccui gazetteer uml 53 platform resource artist discoveries org dews online ccui gazetteer uml 4 Model root model 4 Model org dews online ccui gazetteer Package org 4 B Package dews online 4 Package 4 Package gazetteer 4 B Package actions H Class GazetteerSearchAction Eg Property window IMorkbenchWindow 0 1 Ey Property inputDialog InputDialog 0 1 Ey Property selectResultFromGazetteerDialog SelectResultFrom
56. riments conducted during the first year of the project on both the commonly agreed PetStore example and some particular project s use cases As a consequence most of the newly developed components relying on previously existing components or built from scratch are still work in progress Thus the objective for the second year of the project and for the delivery of the second version of the ARTIST Model Discovery Toolbox is twofold e Consolidate the components prototyped during the first year and already provided as part of the initial version of the toolbox e Work on new components when relevant and possible according to the available resources corresponding to concrete deployments uses of the toolbox on project s use cases For example based on some feedback we already foresee the need for o A CH metamodel and corresponding base partial discoverer NET specific support o A more advanced support for the discovery of the behavioural aspects of the source code both for Java and CH o Potentially other components to be determined during the running of the project Project Title ARTIST Contract No FP7 317859 www artist project eu Page 38 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 5 Reference 1 Eclipse ATL tool Available at http www eclipse or 2 Eclipse EMF tool Available at http www eclipse org modeling emf 3 Eclipse JDT t
57. rivate SelectResultFromGazette a MethodDeclaration public run lAction action G2 9 MethodDeclaration public selectionChanged IAc Es MethodDeclaration public dispose MethodDeclaration public init WorkbenchWindc 8 Package 28 Le package 1 9 PrimitiveTypeBoolean 1 t eam d we drip i a 0 9 ClassDeclaration SelectResultFromGazetteerDialog 9 PrimitiveTypeChar 1 home 9 ClassDeclaration InputDialog n p n Figure 3 Java Code model opened in the MoDisco Model Browser The component is provided by the Eclipse MoDisco project initiated and created within the context of the IST FP6 MODELPLEX EU project However it is practically reused in ARTIST as an individual component or to provide inputs to some newly developed components and so is considered as a base component from the ARTIST Model Discovery Toolbox This particular component is implemented as Eclipse plugins using Java JDT notably the parsing capabilities 3 and being based on EMF 2 It is open source and available under the Eclipse Public License EPL 5 For more information reference documentation or download installation instructions please go to the MoDisco homepage 4 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 17 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 201
58. roduced some configuration files are automatically initiated but then also completed manually e Purpose All the treated artefacts are composing the actual source code of the legacy systems no other inputs considered up to now e Consumer The handled artefacts are generally intended to be processed by the system itself or its underlying infrastructure e Organization Only well structured artifacts i e there is formalism to define the artefact structure such as a grammar for source code or an XML schema for XML documents have been considered until now less structured artefacts may be studied in the future if required by use cases e Nature Purely static the discovery from more dynamic artefacts has not been needed and or experimented up to this point e Size This is quite heterogeneous the PetStore experiment the practical case study developed for performing first experiments in ARTIST is rather small and the tested use cases can be globally seen as having a medium large size e Opacity Only fully white box artefacts have been analyzed until now i e full access to the content of the legacy artefacts e Architectural layer Different experiments have been conducted but mainly the Data and Logic layers have been considered According to the future needs of the different ARTIST use cases the coverage of the Model Discovery Toolbox regarding the taxonomy dimension mainly Technical Space and Environment ones
59. s in ATL e From XML based artifacts o Generic XML document model complete XML model aggregator partial MoDisco base support reused and extended in the project implementation in Java Project Title ARTIST Contract No FP7 317859 www artist project eu Page 14 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 2 4 Toolbox global architecture From an architectural perspective the ARTIST Model Discovery Toolbox is globally composed of two main entities the Java support Eclipse based and the NET support Sparx EA based as shown on Figure 2 Source code e Java EE support P Databases J Base UML models support M Low level Other sources 7 ARTIST Model models Discovery Toolbox Configuration files Figure 2 ARTIST Model Discovery Toolbox Overall Architecture The Model Discovery toolbox is taking as inputs different kinds of legacy artifacts from both the Java EE and NET worlds and producing as outputs base models that can conform to UML or to more specific low level metamodels These models are so called Platform Specific Models or PSM according to the common MDE jargon and are then used as inputs of the ARTIST Model Understanding Toolbox cf D8 3 1 For the Java support the integration of the different components e g model discoverers is realized notably via the Eclipse MoDisco framew
60. ss cont 36 3 1 3 Tecnnical SOCCIICALIONS 37 3 3 1 4 Download and installation instructions 37 SE PIE er H 37 3 3 1 6 Licensing nennen nnns 37 4 Conclusion Future WOEK 38 MEME iue mem 39 Project Title ARTIST Contract No FP7 317859 cc www artist project eu Page 6 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 Table of Figures FIGURE 1 EXCERPT OF THE ARTIST ARCHITECTURE THE MODEL DISCOVERY 13 FIGURE 2 ARTIST MODEL DISCOVERY TOOLBOX OVERALL nnne 15 FIGURE JAVA CODE MODEL OPENED IN THE MIODISCO MODEL 17 FIGURE 4 CODE MODEL OPENED IN THE MODISCO MODEL BROWSER 18 FIGURE 5 UML CLASS DIAGRAM MODEL OPENED IN THE MODISCO MODEL BROWSER ne 19 FIGURE 6 PARAMETER SELECTION FOR THE UML CLASS DIAGRAM MODEL 1 22 FIGURE 7 UML ACTIVITY DIAGRAM MODEL OPENED IN THE MODISCO MODEL 24 FIGURE 8 SOURCE MODE
61. t Source Model Discoverer from Java project 24 3 1 7 Component Generic UML Profile Discoverer from Java API library 25 25 3 1 7 2 Functional Description 000200 26 317 26 3 1 7 4 Download and installation instructions 27 a rip c 27 31706 Licensing NRO AU sen 27 3 2 NETS UNO OIE RUBRUM EMEN NM Eq 28 3 2 1 Component Generic UML Class Diagram Discoverer structural part of the code from CH source code or assembly 28 VIC EE 28 0 2 1 2 PUNE TION Al Ul OM duce iio etae oia sls sap 28 3 2 1 3 Technical specifications cs sccacaseseseiaseatsccssahsandetaseancasaseieiaseatevessahbandeiatecasarastins 29 3 2 1 4 Download and installation instructions sese 29 SUMMER ur 29 3216 Licensing information auus CPP A 30 3 2 2 Component Generic UML Sequence Diagram Discoverer behavioural part of the code from CH execution direct 30 30 3 2 2 2 Functional description 30 3 2 2 5 Technical SPECICATION v Daun eo Dore bete wp 31 3 2 2 4 Download and installation instructions
62. t representation of the content of the initial Java sources the actual conceptual mapping between Java and UML Class Diagram is specified by the Java to UML model transformation as previously introduced An overview non exhaustive of this mapping between elements from these two metamodels is presented in Table 1 Table 1 Mapping excerpt used in the Java to UML Class diagram transformation Unresolveditem OR Interface UnresolvedTypeDeclaration OR InterfaceDeclaration 2 Generalization OR InterfaceRealization 3 Property OR Association 4 1 The use of NamedElement happens only when elements are unresolved in the Java code model 2 The two first types concern unresolved items in the Java code model which are not used in a class as a type or in class imports 3 This special case occurs when we have an interface inheriting from another 4 In the ATL transformation we need the FieldDeclaration type to indicate in the created association which fields are related by the association Project Title ARTIST Contract No FP7 317859 www artist project eu Page 20 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 3 1 4 3 Technical specifications The Java to UML model transformation has been developed and is being executed thanks to the ATL tooling 1 The implemented ATL artefacts are the following ones e An ATL module w
63. tle ARTIST Contract No FP7 317859 cc www artist project eu Page 19 of 39 D8 2 1 Components for Model Discovery from Legacy Technologies Version v1 0 Final Date 26 09 2013 3 1 4 Component Generic UML Class Diagram Discoverer structural part of the code from Java source code direct 3 1 4 1 Overview This new component packaged as a MoDisco discoverer is based on the chaining of the Java Code Model Discoverer with a newly developed Java to UML Class Diagram model transformation implemented in ATL 1 It also relies on an Ecore implementation of the OMG UML metamodel 10 Similarly to the previous component it allows producing an UML Class Diagram model from initial Java source code but this time only passing by an intermediate Java source code model The obtained UML Class Diagram model also only covers the superstructure of the program and not the details of the expressions and statements method bodies These behavioural aspects are to be actually covered by the Generic UML Activity Diagram Model Discoverer cf section 3 1 5 3 1 4 2 Functional description This component currently considers e As input Java source code or eventually the Java model representing the Java source code if the Java Code Model Discoverer has already been applied separately before e As output a UML model containing the UML class diagram generated out of the input The intermediate Java code model being a direc
64. udy or analysis of existing software systems in order to have a better vision of their current status The main innovation of the proposed toolbox is that it is open and extensible The base support currently offered relies on a set of well established IDEs and related capabilities Eclipse Modeling project for the Java world and Sparx Enterprise Architect for NET world They have been are being will be reused and extended in order to design and build the new components implementing the required functionalities In term of concrete Model Discovery support the features currently provided by this toolbox are the following in italic the features already available but extended and or reused in the project in bold this first year newly developed features e From Java EE artifacts o From Java source code Java code model complete Code model partial Generic UML class diagram structural part of the code complete direct or via Generic UML activity diagram behavioural part of the code in progress Source model artifacts inventory o From Java APIs libraries currently in Jars Generic UML profile in progress e From artifacts o From source code Generic UML class diagram structural part of the code complete Generic UML sequence diagram at runtime execution in progress o From Microsoft libraries currently DLL files Generic UML class diagram in progress o From SharePoint files
65. value metaclass value EJ Class x _ value Figure 9 UML Profile model discovered from a Java library jar file 3 1 7 2 Functional Description The entry point for the UML Profile discovery as depicted in Figure 10 is Java Code that is converted into a corresponding Code Model thanks to the previously presented Java Code Model Discoverer Code Models are the basis for discovering UML Profiles as depicted in 2a They serve as foundation for annotating UML models with the same meta information as Java code elements Before such UML stereotypes can be applied they need to be defined As shown in 2b such a definition produces what we call UML Profile Basically in this step an Ecore based metamodel is generated that allows an instantiation of the UML stereotypes in the same way as any other UML element is instantiated 1 Code UML Profile Metamodel Conversion Generation Extraction Convert Discover Define Java Code UML Profile UML Profile Figure 10 Conceptual Overview of the UML Profile Discoverer Model Profile Profile 3 1 7 3 Technical Specifications e Languages ATL forthe model transformations o UML for the Profile representation o Java Profile for Java specifics e Status Alpha e Release 0 1 Project Title ARTIST Contract No FP7 317859 www artist project eu Page 26 of 39 D8 2 1 Components for Model Discovery from Legacy Te
66. y Activator getPluginid Activity Activity GazetteerSearchAction run Activity Activity GazetteerSearchAction_selectionChanged ix Activity Activity SelectResultFromGazetteerDialog configqureShell Activity lt Activity gt SelectResultFromGazetteerDialog createDialogArea te eContainer f edge 36 4 t ownedNode 37 InitialMode Initial Node SelectResultFromGazetteerDialog createDialogArea ControlFlow 65 OpaqueAction Opaque Action sashForm 2 OpaqueAction Opaque Action tableComposite OpaqueAction Opaque Action tableCompositeGridData OpaqueAction Opaque Action tableCompositeGridLayout OpaqueAction Opaque Action table Figure 7 UML Activity Diagram model opened in the MoDisco Model Browser The obtained UML model can finally be navigated using the MoDisco Model Browser for instance as shown on Figure 7 3 1 5 6 Licensing information This component is provided as open source under the Eclipse Public License 5 3 1 6 Component Source Model Discoverer from Java project This component allows obtaining KDM Source model out of any Java project using an Ecore implementation of the metamodel Basically this Source model represents the different software entities composing the Java projects directories source files binary files configuration files etc It is important to note that contrary to t
Download Pdf Manuals
Related Search
Related Contents
電源コンセントは必ず接地極付を使用すること 87780Manual mantenimiento ventiladores Mach DA600 User`s Manual Air-Shields® Isolette® Infant Incubators Trust BlackStream Keyboard IT CONSEIL NATIONAL DE RECHERCHES DU CANADA CableWholesale 30CV-41100 cable tie Innominate mGuard 112 Fisioterapeuta - Saúde da Mulher Copyright © All rights reserved.
Failed to retrieve file