Home

CASE tool for embedded systems

image

Contents

1. i i i on i GEI Figure 1 3 Interaction Diagram To see our modeled system in action we would need a dashboard At the dashboard of our car wiper system in figure 1 4 ignition switch a wiper and rain are visualized By simulating the system the wipers will activate if there is rain and the ignition switch is on Introduction gee m Ignition Switch p CRM da Rain Wiper sensor Figure 1 4 Dashboard 1 2 Structure of this report The overview of the report is as follows In chapter 4 we explain how Eclipse EMF and GMF works In chapter 2 the practical information of the project is listed Chapter 3 describes the current situation of the progress of the different parts of the project Analysis of what is made and what still needs to be done is clarified here The implementation of the project in chapter 5 and finally the conclusion of this project CHAPTER 2 Brief Overview of the project In this chapter we present you a brief overview of the project 2 1 Name date and place The CASE tool project is described and developed by Lintalo Suehiro with guid ance of Associate Professor Ekkart Kindler at Technical University of Denmark as a B Eng thesis in the period of February 4th to June 30th 2008 2 2 Current situation The CASE tool which is intended to model analyze simulate and visualize embedded systems consists currently of four separate systems The systems contains som
2. 12 dk dtuimmse2e07 casetool inte nein try editor getSimulation getController setSleep Ho an ey dkdtuimm se2e07 casetool sim akon Exceptidn exp t 3 va if scSpeed getSelection 1 Ibl peed Label lblSpeed setText scSpeed getSelection 3ieteciFor Dashboard boolean FN a selectedCompRT Componenti e 451 lblSoeed setTexti scSueed aetSelectionii dM SimulationContro i lt Bil lt gt 2 Problems Javadoc Declaration I Properties 23 gt Console ulik STEN mi Property Value lu el m Figure 4 1 Screen of Eclipse Eclipse has a plug in system so there exist many kinds of plug in you can use this IDE for not necessarily only for Java for example there exist plug ins for software development with C or C As explained in the beginning of this chapter the main reason we use Eclipse is the because of the model driven development facilities of Eclipse Modeling Framework The details of EMF is explained in the next section lIntegrated Development Environment an IDE supported by Sun Microsystems 4 2 Eclipse Modeling Framework 15 4 2 Eclipse Modeling Framework This section is a guide for what different EMF projects in Eclipse do and how they are different from standard Java projects To be able to navigate around the different projects and understand what they do we need to introduce the few elements of EMF We will start b
3. ABK 07 Group has been working the dashboard LJ T 07 Group 4 has been working on the component definition editor AACT07 3 2 Understanding the current project The main topic of the current project is integration of the tools To integrate the tools we need to understand the requirements of the individual parts The tools have different unwanted behavior and it is our task to find them 3 2 1 Finding the problems For finding the current problems with the different parts of the tool we need to follow the use cases written in the report provided by the different groups Each part is installed in different workspaces to avoid potential new bug created from the integration 3 2 Understanding the current project 9 At the point of making the projects run we already faced into problems Due to a classpath file missing Eclipse could not recognize the structure of the folders for the EMF project Some other problems was due to missing library files so most of the projects was unable to run out of the box 3 2 2 Known problems with the tools After clearing the errors due to missing files and library files we have discovered the problems with the tool by trying it out e Inconsistency with numbering for the Dashboard as the different parts get mixed up e Images of the dashboard is not all visible e Integration of interaction and dashboard simulator e Simulator window must be open before running the interaction sim
4. J Simulation3Controlle 2 Simulation3 java S 5 Task List 23 com 7 29 ejm 3 9 ig dk dtuimm se2e07 casetool int E EI dkdtuimmse2e07 casetool 1 1 dkdtuimmse2e07 casetool 3 public void mouseUp MouseEvent e 0 x Uncategorized Gi dk dtu imm se2e07 casetool 4 public void mouseDoubleClick MouseEvent e amp 32 dk dtuimmse2e07 casetool autc 32 dkdtuimmse2e07 casetoolcom amp ag dkdluimm se2e07 casetooldasl publio void widgetDisposed DisposeEvent e dkdtuimm se2e07 casetool dasl dispose J BE Outline 23 8 J dk dtuimmse2e07 casetooldasl Cal Ho dk dtuimm se2e07 casetooldasl 5 dkdtuimmse2e07 casetool dasl Boverride 5 I du immse2e07 casetooldasl publio void disposet t eg uod SUN ENS 8 d dkdtuimm se2e07 casetooldep super dispose bIDeseription Label E bbiDescription Label Gy dedtuimmse2e07 casetool dise 2 binCreateSimulation Button 5 12 dkdtuimmse2e07 casetcoledit btnStart Button amp 122 dkdtuimmse2e07 casetooledit 1 Mi dedisse ceci Listener for speed control btnPause Button 3 DL ded 207 asetoolaraul public void widgetDefaultSelected SelectionEvent e ES nd public void vidgetSelected SelectionEvent e btnStep Button 59 122 dkdtuimm se207 casetool ero o blCuState Label amp dkdtuimmse2e07 casetool ero t binhesien E dk dtu imm se2e07 casetool inte e getSource equals scSpeed m cmbOomponent Combo
5. 2 n v2 6t anaa ez Aetd proa orpqnd see ioni Suruunger zz Es oB proa orrqnd e ge Juna proa paztuomyouds ortmd 02 se s 6T BE a51T022U09EuoTIETHUTS Aq Ppsadnaasaur st Traun Suruung s ee TT f 8743 005 2 379779395 Aetdstq ze 20 te ST asTeJ paenogst uts JT oc proa peztuoryouds 862 furs UOTIETNUTS er ez 4 QUI urs guopaepnuts pearyLeuoryernuts ortamd ez AUTS UTS STUF Le uts PESIULCUOTIETNUTE orrqnd 292 Duruunger ueoTooq fure pesayLguorsetnung 52 asTeF asned ueoTooq 5 bz fesTey setadsagass weoTooq 8 PESIUL spuajxo sTnpsyassy SSETO agear d scz fasTey seInds s ueoTooq L zz 20001 ntead ts QUE 9 2 EUOTIETNUTE s f uoraernurS sTnpsuossy SI oz de UOTIETNUTE UOTIBTIUTE STUY st pesayL spusaxs pesayLeuorsernurg sseTo orTqnd c fuoraernure OTTIMA sot 2 fsa a ly Tdur UOTIETRUTS 10032592 2 02225 fUOTABTHUITS 9t 3 Fa te 02 efpeanyguonenuig uespuspuecqusep j vasuapieogusep exipecesunurmipp fd 5 esefualloguooguonemuis 7 QO T E BI 51 mop
6. Development Computer Aided Software Engineering 2 Introduction coding is needed to simulate the model The technology we will use is EMF Eclipse Modeling Framework With EMF we are able to generate Java code from class diagrams and it is a framework that can be used to easily create a Eclipse like applications 1 1 The CASE Tool Section Not corrected yet The CASE tool which is the development subject of this bachelor project deals with complete to make a simulation running sequence interaction diagrams deployment diagrams and component diagrams It has additionally a dashboard which models a car wiper system that can is visualized on screen Embedded systems consists of different parts which we call components We can see in our specific case in figure 1 1 that our system consists of five components An ignition switch a rain sensor a wiper control and two wipers We can also see that the ignition switch and rain sensors and the wipers are connected to the wiper control The boxes represents the components and the lines with small boxes represents the ports The lines represent connectors The ports are used to send and receive messages Ignition switch sara I Wiper prae mate Wiper control AAT Wiper npo gere Rain sensor Figure 1 1 Deployment Diagram With the deployment diagram we see which compone
7. Java dk dtu imm se2e07 casetool model CASETool ecore Eclipse Platform m E3 Eile Edit Navigate Search Project Run Sample Ecore Editor Window Help TE 3 0 QqQ 08 6 os x or E amp Java SimulationControl ja 10 Simulation3Controlle E CASETool ecd CASEToolecore 23 s es id B platform resource dk dtu imm se2e07 casetool model CASEToolecore i casetool E componentdefinition ComponentDefinition 2 port PortDefinition 7 name EString 9 messageDefinitions MessageDefinitions automaton Automaton PortDefinition Automaton amp amp state State amp transition Transition gt initial State component ComponentDefinition E State E Transition SWComponent gt ComponentDefinition Sensor gt ComponentDefinition E Actuator gt Component Definition MsePortPair m Mai DE fee 8 00 E ComponentDefinitions deployment E amp simulation messagedefinitions E Properties 53 E i Property Value el Changeable true Container E false Containment E true 3 Default Value i Default Value Literal Derived E false 3 EOontainine Class Automaton EKeys EOpposite EReference Type Transition EType Transition Lower Bound i10 lt BD m The Changeable of the EStructural Feature to B E Figure 4 2 Ecore editor ecore model However by right clicking on
8. REFERENCED BELOW BY USING THE Graphical Modeling Framewc GL EODM Chcubation 031 v201 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY Q EODM SDK Incubation 09 AND OR THE TERMS AND CONDITIONS OF ANY APPLICABLE L 00 TICES INDICATED OR REFERENC OW IF YOU dioe Constraint Y NOTICES INDICATED OR REFERENCED BELOW IF YOU DO m 1 do not accept the terms in the license agreements Click Finish A 2 Installation of Subclipse 33 5 3 Install z Dw Installation The following features will be installed You can select a feature and change the location where r the feature will be installed lt Features to install Feature Name Feature Version Feature Installation Directory el Eclipse Modeling F 232 200802051830 Unknown E Executable Files eclipse ec gi Eclipse Modeling 2325200802051830 Unknown E Executable Files eclipse ec Eclipse Modeling F 112x200710151610 Unknown E Executable Files eclipse ec Q gt Eclipse Modeling F 112 200710151610 Unknown E Executable Files eclipse ec G Eclipse Plug in De 333r33x r20080129 Unknown E Executable Files eclipse ec Service Data 2325200802051830 Unknown E Executable Files eclipse ec Q EMF Service Data 231 w200802051830 Unknown E Executable Files eclipse ec GLEODM Incubation 091 v200710090302 Unknown E Executable Files eclipse ec
9. CASE tool for embedded systems Lintalo Suehiro Kongens Lyngby 2008 IMM BEng 2008 9 Technical University of Denmark Informatics and Mathematical Modeling Building 321 DK 2800 Kongens Lyngby Denmark Phone 45 45253351 Fax 45 45882673 reception imm dtu dk www imm dtu dk IMM BEng ISSN Abstract In the course on Software Engineering 2 in autumn 2007 different groups developed different parts of a simple CASE tool for modeling simulating and visualising the behavior of embedded systems In this bachelor thesis different parts of the tool which the groups developed was integrated into a single Tool Moreover the features for modeling the behavior of the components of a system is improved in this project Preface This bachelor thesis was written at the Computer Science and Engineering sec tion Institute of Informatics and Mathematical Modeling at the Technical Uni versity of Denmark from February 4th 2008 to June 27th 2008 Acknowledgments I would like to thank my supervisor Associate Professor Ekkart Kindler for guid ing and helping me through my bachelor project Also many thanks to my friend and former classmate Erling Madsen for ex changing information and keeping company to the late hours during the final period of the project Kgs Lyngby June 2008 T Lintalo Suehiro Contents Abstract i Preface iii 1 Introduction 1 1 1 The CASE Tool Section Not corrected yet 2 1 2
10. DK and JRE prior to Eclipse To make GMF and GEF work with Eclipse we would need to run Eclipse and under help menu choose Software Updates find and install 30 Installation guide Eile Edit Navigate Search Project Run Window Welcome 8 Help Contents 97 Search Dynamic Help Key Assist OtrkShift L Tips and Tricks Cheat Sheets Updates 0 Ci About Eclipse Platform Choose search for new features to install and press next s Install Update amx Feature Updates Choose the way you want to search for features to install Search for updates of the currently installed features Select this option if you want to search for updates of the features you already have installed S Search for new features to install Select this option if you want to install new features from existing or new update sites Some sites may already be available You can add new update site URLs to the search Back Next gt N Einish Check Europa Discovery Site and click finish A 1 Clean installation of Eclipse 31 Sites to include in search Update sites to visit Select update sites to visit while looking for new features D Eclipse Modeling Framework EMF Updates al Eclipse Modeling Framework Technologies EMFT Updates zl E Europa Discovery Site D Graphical Editing Framework GEF Update Site O Model Develope
11. EODM SDK Incub 091 200710090302 Unknown E Executable Files eclipse ec G gt Graphical Modeling 20 2 v20071124 0000 Unknown E Executable Files eclipse ec Java Emitter Temp 08 220071206 17E2 Unknown E Executable Files eclipse ec GI Invio Tamm deben TEEN EEE PEDES Install Location EXExecutable Files eclipse eclipse Change Location Required space Unknown Free space 533 GB Eclipse is now ready to use the GMF and GEF we only need one thing to be able to use the tool A 2 Installation of Subclipse We need to install the sublipse plugin to be able to check out the projects from the SVN server There is an intuitive installation guide on the website of Subclipse Go to http subclipse tigris org install html to be guided on the installation All the plug ins are installed now and we now need to connect to the SVN server For security reasons of the SVN server we do not show the ip address on this thesis After connecting to the server with subclipse you are now ready to use Eclipse A 3 Installation from the CD The easiest way to run the Eclipse is installing from the provided CD There are actually no installation processes you just move the files from the CD to a 34 Installation guide local folder Remember to install java prior to running Eclipse as otherwise it would not run At the root directory of the CD Rom drive there ar
12. Structure of this report aoaaa 4 2 Brief Overview of the project 5 2 1 Name date and place a 5 2 2 Current situation ge iii Pa RIE 5 2 9 Need amp Sigur 22 esa BR 6 2 4 SCOPO 2 SS Sd dd 6 2 5 Spalla Saf gate ee ern RAR HS 6 2 6 5ynDODSls a u iii ee dd 6 2 7 Assumptions and dependencies oo ooa Analysis 3 1 The project given in the course of SE2 3 2 Understanding the current project 3 2 1 Finding the problems llle 3 2 2 Known problems with the tools Used Technology TI ua e een 4 2 Eclipse Modeling Framework a 4 2 1 EMEF Projects iii oo Rs aaa 3 4 4 232 EME Models 0 200 068 Sb RR eg 4 2 2 1 Ecore model md 4 2 2 Get e 2 2222 UAE xus 4 23 Generation of projects ess 4 3 Graphical Modeling Framework 2 4 3 1 Models leen 4 3 2 Generation of projects onen implementation 5 1 Making the toolset to work 2 lens 5 2 Integration of the projects ees 13 14 15 15 15 15 15 16 17 17 18 19 B Conclusion Step 1 Integration of components definition editor and deployment editor 02 Step 2 Integration of interaction editor Step Integration of the dashboard 5 2 3 1 Threading problems 6 1 Problems occured during the project 6 2 U
13. and deployment editor The integration of components definition editor and deployment editor went without major obstacles The dk dtu imm se2e07 casetool of from the both projects was carefully compared to adapt for both projects to be working simul taneously 5 2 2 Step 2 Integration of interaction editor The integration of interaction editor and deployment editor went also with out major obstacles The dk dtu imm se2e07 casetool was compared to the original to adapt for both projects to be working simultaneously When we want to create a new diagram on the running application we click file new Other The problem was that each groups had different place to store the diagram file creation By default it is put under the Examples folder We found out how to move the diagram file creation of the different folders but this is by manually editing the plugin xml file so when we make changes to the GMF file the settings would be lost We found no solution to this problem as there were no sufficient documentation about this 5 2 Integration of the projects 21 5 2 3 Step 3 Integration of the dashboard The final step of the integration was the dashboard There were several problems we encountered while we were integrating the dashboard As we made changes to the GMFgen file and auto generated code again all the figures was wrongly mapped This was due to the numbering of the GMFgen of the dashboard was not the same i e not the la
14. aton box in it then put states in it the states are labeled false which is not the case with sensors and actuator e problems with state names which length is 1 like a b to open with tree editor 6 3 Conclusion The different parts of the project is now integrated into a single Tool so we do not have the need to switch between four instances of eclipse to run our application From the point of view of integration of the different parts of the CASE Tool the minimal requirements was met as the CASE tool is now integrated into a 28 Conclusion single tool The threading problem of dashboard simulator is also solved but the interaction recorder problems still remains However due to many obstacles and difficulties the progress of the project did not advance as wanted There are still many improvements to be made but major obstacles we met which were not written of the previous reports is now clarified and this would ease up to the next developers that takes over the project APPENDIX A Installation guide A 1 Clean installation of Eclipse This chapter instructs how to install eclipse and which package that is needed Eclipse is an IDE which is developed constantly so new versions come out frequently The Eclipse version that was used in this project was Eclipse 3 2 Europa There are several versions that are available for download and the one we used was the java version Please remember to install Java S
15. casetool interaction diagram e dk imm se2e07 casetool interaction edit e dk imm se2e07 casetool simulation We will explain the projects one by one dk imm se2e07 casetool This is the main project which contains the emf model The other projects depend on the source code in this project and therefore when the source code is edited the change would affect all on the other projects As Group 2 has choosed to use dk imm se2e07 casetool interaction to contain the GMF generator file the GMF generator file of this project is not used dk imm se2e07 casetool_1 This project contains GMF model of deployment editor and the GMFgen of this projects creates the deployment diagram It is used to make changes in the deployment diagram and compare the differences with the main project dk imm se2e07 casetool 3 This project is used to make changes in the deployment diagram and compare the differences with the main project Group 3 has made a separate GMF model which is located in dk imm se2e07 casetool dashboard dk imm se2e07 casetool 4 This project contains GMF model of components editor and the GMFgen of this projects creates the components diagram It is used to make changes in the deployment diagram and compare the differences with the main project 41 dk imm se2e07 casetool components diagram This project was auto generated from GMFGen of dk imm se2e07 casetool 4 It contains code regarding the graphical parts of the component defin
16. d a frustrating task as there were myriads of code we had to look through 6 2 Unsolved problems The unsolved problems is as follows e Integration of interaction and dashboard simulator 6 3 Conclusion 27 e Simulator window must be open before running the interaction simulation e Recorded simulation does not appear before saving and reopening the CASEtool e Example in the Dashboard is not complete e arrow from state of one component over to a state of an another component e Category needs to be in one place e Simulator button from deployment editor should be removed e Load new dashboard diagram would be nice e Automaton can be removed out of components when moved to left up because the component box will not expand If it is moved so much up or to the left that automaton box does not overlap with the component box it is not possible to pick it up later with the mouse e Once a state has been chosen as initial it appears not to be possible to change others to initial It is updated if we click on the automaton box e The transition does not change when the source or target is changed in the property window e Graphical repair of initial state The name of the first created state is changed to a if the name of the state was a In the property window there is still a state named a even though there are no states named a anymore on the editor e If you select a software component and put an autom
17. e three folders Eclipse EclipseWorkspaces and BEngThesis Move Eclipse and EclipseWorkspaces to a local folder of your choice Start Eclipse up by double clicking on it and select the path you have moved the EclipseWorkspaces onto Choose EclipseWorkspaces CASEToolIntegratedClean which contains only the new projects or EclipseWorkspaces CASEToolIntegrated which contains all of the projects from the SVN server and the new projects Select Workspace Directory Select the workspace directory to use TA amp 4 FXaxvk y 1 2701 9 8 we WindowsXP C amp See Windows Vista D lt Data RECYOLE BIN amp O Assignment CASEToolInteerated amp CASEToolintegratedCleag presentation amp runtime Eclipse Application amp O Executable Files amp 9 Music amp O Program Files RECYCLER 74 8 EclipseWorkspaces ESTED Click OK and OK again Eclipse should now run and load the projects A 3 Installation from the CD 35 In the EclipseWorkspaces folder a folder named presentation is there This folder contains all the icons for the dashboard On the dashboard window right click to open the property window Paste the path where you have moved the presentation to S Java SEZ ExampleProject detault dashboard diagram Eclipse Platform maxi Eie Edit Dieeram Nevio Seach Project Bin Wid
18. e unsolved bugs and there are still features that are not imple mented The list of problems is described in section 3 2 2 1Computer Aided Software Engineering 6 Brief Overview of the project 2 3 Need Integration of the four parts is needed to create the complete CASE tool The bugs of the systems needs to be fixed after the integration process The missing features of the systems must be clarified and implemented as time allows 2 4 Scope The Scope of this project would be to fully implement all the parts of tool 2 5 Span The span would be the subset of the complete model which deals with de ployment sequence and component diagrams and a dashboard to model an embedded system 2 6 Synopsis The project is to develop a CASE tool for embedded systems which helps the developers by generating code from different UML diagrams 2 7 Assumptions and dependencies The technology that is used is Eclipse For this project three plug ins are used EMF GMF and GEF CHAPTER 3 Analysis In this chapter we will analyse the project description Let us start with what the project in the course of Software Engineering 2 at Technical University of Denmark was about 3 1 The project given in the course of SE2 At the course of Software Engineering 2 in the fall semester of 2007 a project description for a CASE tool for modeling analysing simulating and visualizing embedded systems was assigned to the participating stud
19. ents A presentation on what the tool is going to be capable of was given in the beginning of the course but at that point there were no clear requirements on the tool To find out what the requirements of the CASE Tool would be was also a part of the assignment The course participants were split up into four groups as the CASE tool con sisted of four different parts and a simulator The four parts of the CASE tool were as follows e The component definition editor where the automata of the individual 8 Analysis components are defined e The deployment editor where the behavior across diffent components were to be defined e The interaction recorder to see if component definition and the deployment behaves as expected e The dashboard to visualize the simulation of the model Additionally each group had to develop a simulator for their part of the tool The definition of the CASE tool was given with a class diagram which shows how the components are connected to each other This is visible in figure 3 1 The letters on the figure is very small so look at this report as a pdf file on the provided CD ROM As this report would act as an overview to the reports made by the groups we do not choose to go into the technical details of the different tools We refer to the reports of the different groups e Group 1 has been working on the deployment diagram editor AHH 07 Group 2 has been working on the interaction recorder
20. er to locate GMF models is in the same place we locate the EMF models To be able to generate a diagram model from GMF models we need to define the gmfgraph gmftool gmfmap and gmfgen gmfgraph is used to defining how figures in the graphical editor looks like and we use gmftool for defining what kind of tool we need naming of the figures and a like The gmfmap links the figures and tools which were defined by 18 Used Technology gmfgraph and gmftool with the EMF model When this is done gmfgen can be created 4 3 2 Generation of projects Just like genmodels we can generate code by right clicking on the models By choosing generate diagram code a new project with diagram is auto generated The project would be visible under the Package Explorer A screen capture of it is visible on figure 4 4 Java dk dtu imm se2e07 casetool dashboard File Edit Source Refactor Navigate Search Project rd B 0 8 C HE Package Explorer 52 te Hierarchy 8 125 dk dtu immse2e07 casetool amp dk dtu imm se2e07 casetool dashboard editor 9 25 dk dtu immse2e07 casetool edit Figure 4 4 Diagram project generated by gmfgen We have briefly gone through the EMF and GMF and we now understand which projects contain EMF models and which projects are auto generated We have a We are now prepared to go to the next chapter where we present the implementation part CHAPTER 5 implementation BSM 07 5 1 Making the too
21. he installation would be a trivial task but it was rather winding Installing the EMF and GMF packages to Eclipse to make the projects work would seems to be the natural step however this was not the case Due to some of the files for the project of the groups was missing the project did not work out of the box This was due to bugs in subclipse so not all files was submitted to the svn server Because there were missing packages to the projects we checked out a we man ually added the missing library files As we were used to Netbeans we looked at the properties of the projects and added the missing library files to the build path This made the error notifications on the code due to missing library files disap pear and it seemed that the projects was working fine However this led to the running application behave very strange The application was running but after after a line in the code where the library to use the main thread of Eclipse the Display thread was called there were no obvious reason why it did not work as no exception was thrown to the console But Another major obstacle was that the accessible GMF models of the groups on the svn server was not the latest versions When there were needs to change the GMF models we had to carefully compare the auto generated code with the code from the originally submitted project and there after make changes to the GMF generation file again This was also a very time consuming an
22. ition editor dk imm se2e07 casetool dashboard This project contains the GMF model for the dashboard and dashboard diagram will be created from this project dk imm se2e07 casetool dashboard diagram This project contains code regarding the graphical parts of the dashboard dk imm se2e07 casetool deployment diagram This project contains code regarding the graphical parts of the deployment editor dk imm se2e07 casetool edit This project was auto generated by the genmodel of the main project The project is needed to be able to edit on the editors dk imm se2e07 casetool interaction This project contains the GMF model for the interaction recorder and interac tion diagram will be created from this project 42 List of Projects dk imm se2e07 casetool interaction diagram This project contains code regarding the graphical parts of the interaction editor dk imm se2e07 casetool interaction edit This project was auto generated by the genmodel of the interaction recorder The project is needed to be able to edit on the interaction recorder dk imm se2e07 casetool simulation This project contains the simulator code for the interaction recorder Bibliography AAC 07 ABK 07 AHH 07 BSM 07 LIT 07 K Ahrensberg O Ahtirschi L Christensen P T Christensen E G kten X Moreels and S Valberg Software requirement spec ification case tool application Components definition editor and simu
23. l set to work As mentioned in the previous chapter none of the projects was unable to run out of the box This is due to a bug in subclipse so not all the files in a project was submitted For Group 1 the Deployment Editor junit library was missing For the Group 2 the interaction recorder classpath file was missing so Eclipse could not see the structure of project This was an error which would be hard to discover when you just started to use Eclipse and EMF For the group 3 the dashboard group ecore xmi and junit was missing Regarding group 4 there were problems with the TransitionItemProvider which we never solved This is due to the the redefinition of the ecore model where InOutMessages was removed by the most of the groups As no easy solution was found the code which caused syntax errors was lined out After the tool were running we were looking for problems of the tools After 20 implementation the problems were found integration of the tools started 5 2 Integration of the projects The common project of the CASE tool is dk dtu imm se2e07 casetool and there are small differences with the versions each group used We chose to use of main case tool project of group 2 as it was the closest to the original project The main project of Group 4 had an small piece of code which added an to the component name so the code was added to our main project 5 2 1 Step 1 Integration of components definition editor
24. lation Technical report Informatics and Mathematical Model ing Technical University of Denmark 2007 A Amini P M Back J Kristensen H Mynderup S H Peder sen and D Schiemer System specification case tool for developing embedded systems with main focus on interaction editor recorder Technical report Informatics and Mathematical Modeling Technical University of Denmark 2007 M H Andersen J Hansen B P Hansen M A Miiller A Pedersen Sorensen L Vestergaard and P Wind System specification revised Technical report Informatics and Mathematical Modeling Technical University of Denmark 2007 Frank Budinsky David Steinberg Ed Merks Raymond Ellersick and Timothy J Grose Eclipse Modeling Framework Addison Wes ley 2007 D V Lebech A S Jensen M Thomassen M Andersen K An dersen M D Anyaogu and R O Galve Case tool editor dash board documentation Technical report Informatics and Mathemat ical Modeling Technical University of Denmark 2007
25. main thread of eclipse has the exclusive rights Due to this problem the interaction diagram is not working correctly and the dashboard is throwing an interrupted exception which is not visible to the user By using methods of the Display class it is possible to make the main thread of Eclipse to execute code By doing this changing rights between threads is not neccesary anymore and the problems of interrupting the simulation thread would be excess We have applied this to the simulator of the dashboard Sim ulator3Thread and Simulator3Controller The Simulator3Thread is now not threaded anymore and the play method of Simulator3Controller call the Dis play thread to execute a same code as original simulator code Originally The simulator threw a Interruptexception when the simulation was stopped but now it simply exits the thread When play method is called again the Display thread is once again called The code of the classes can be seen on figure 5 2 Unfortunately because of lack of time the problems with the interaction recorder was not fixed 23 5 2 Integration of the projects i 23 27 pos yews ANGRI 85 10 Tdupuorsernurgaa uorgernurg 20 4 LS Pssnegst UOTIETNUTS 22 sened 95 deas proa orpqnd LIL esnedup proa OTTIMA sss DL BS t 69 55 i uoraeTnurs sT
26. ment Tools MDT Updates O O 9 Mylyn Extras Edit O 9 Eclipse Project Updates DD S Web Tools Platform WTP Updates Export sites Ignore features not applicable to this environment v Automatically select mirrors If Eclipse ask for choosing a mirror check Aautomatically select mirrors and click ok Expand Europa Discovery Site and check Model and Model Development Search Results Graphical Modeling Framework Europa Edition 20 2 v20071124 0000 7X7 IEIn hz g9qNu8HVXrBZXfv requires plug in ore eclipse pde ui 330 or compatible Select the features to install Bm A 7000 and C Developement 7 000 Charting and Reporting 000 Communications Pr 000 Database Development 000 Enabling Features 000 Graphical Editors and Frameworks 000 Java Development lt 100 Models and Model Development Mylyn 77000 Other Tools operties This Europa Discovery Site contains a number of Eclipse based projects released simultaneously June 2007 18 of 104 selected v Show the latest version of a feature only Filter features included in other features on the list Finish 32 Installation guide A warning comes out and click on Select Required and then next la Updates A Search Results Select features to install from the search result list 8 Selec
27. npsyossy mau SI 89 tana asned zs ATeAdastsuorsernurs UOTIBTOUTE UOTIBTAUTE PEaIyLEUOTIeTHUITS UOTABTHUTS us sned proa orrqnd ets 1 assaz TdupuorgerTnurgss uorgernurs 99 05 1 asneg uoTaetnats 59 m 6b 20 v9 iBuruunger 3 doas proa Buruungser ueaTooq orrqnd eL 29 9 t 19 sb 20 ssned uorsernurs og fesned bb ssned proa orrqnd sss pasnegst OTTIMI scr 85 zb es t ss oF ss sf se 1 uip337025 Aerderq uTaurad 3no were g vs t ge e2 o0s sexgasuri AeTdetrp es astez Le I 25 2 a2828 uoraernars 15 dn BuruesT2 aq Atgegoad prnoys 0404 se Apesate 10u ST JT areas ATUO os uoraernurs ya doas adnazsaur n se iNOLLVTIDHIS ONILIYLSu UTQUTId 320 were g 55 a uoradssxgpsadnaasaul 49302 se 8 i anTeadaats daaTs peaayL z Aerderp Lb 208 u DurdssTg UTI ano usge g IM BUTUUNYST UOTIETMUTSI ob B oe sb t jatea 2 b BARS snorznds Jo m saye aTtua asned 2 eb sened prnous uotaetnats IT sA LZ 1 asnedug uotaetnats 2 pasnegst uotaetnats f eaernurre
28. nsolved problems les 0 3 Conclusioni c4 x5 AAAEYYGGISG DA Installation guide A 1 Clean installation of Eclipse 2 llle A 2 Installation of Subclipse LL Installation from the CD LL User guide C List of Projects 25 25 26 27 29 29 33 33 37 39 CHAPTER 1 Introduction Developing embedded software systems is a complicated matter There are numerous developing methods to support projects and one of the way of doing that is the MDD Our software system is intended to be able to model simulate and visualizing behaviors of an embedded system which we call a CASE tool For software development the Unified Modeling Language is quite often used When a software system is going to be designed we make use of some of the dia grams of UML like class diagrams and sequence diagrams with help of graphical diagramming software like Visio and then manually write the code that corre sponds to the diagrams This process is time consuming as time is needed to write the diagrams and thereafter make the diagrams into working code By removing the step of manually writing the code from the UML diagrams errors would be minimized and time would be saved This is also the case with development of embedded systems We will use MDD for the development of the CASE tool so we have to code less manually And the model that is made by the CASE tool use MDD so no 1 Model Driven
29. nts that are present and how the components are connected to each other However if we needs to model the behavior of the components we would need to use the component defini tion editor Here we would define the state machines of the components The state changes after a received message sent through the ports that connects the components This is visible in figure 1 2 The state where there is an arrow which points from nowhere is the initial state In this figure Engine Off is the initial state when ignition is turned on or wiper turned off the current 1 1 The CASE Tool Section Not corrected yet 3 state is moved to Wiper off The state changes in the direction of the arrows to external event ignition on wiper off ignition offwiper oft x ignition off rd dry wiper of wiperoff td rain wiper on Figure 1 2 Component Definition With the component editor we define the behavior of a component but when we need to get overview of the system we would need the interaction recorder With the interaction recorder shown in figure 1 3 the interaction of the components can be recorded by a simulation to see if the behavior is correct If the system behaves in a way that was not intended we have to go back and change the components definitions and the deployment Igniton Rain Wiper Wiper switch sensor control Turn key i i on i i i i gt i i i lt rain
30. oduce the technology that is used in this project We use a IDE called Eclipse one of the most used environment for use with software development with Java The main reason we chose to use Eclipse is the model driven development capability of Eclipse Modeling Framework This chapter is an introduction to Eclipse and EMF so by reading this we will be ready to read the next chapter where we discuss about the implementation of the integration of the project To make the tool graphical we use Graphical Modeling Framework and in addi tion Graphical Editing Framework GMF simplifies the steps to make a visual editor compared to GEF and this is the reason we choose to mainly use this framework In the next sections we go through the mentioned technologies in details 14 Used Technology 4 1 Eclipse Eclipse is one of the most known IDEs for development with Java The facilities of eclipse reminds very much of Netbeans so there are many convinces for the developer like overview of the projects classes methods and variables syntax highlighting searching facilities debugging and many more A screen of eclipse is shown in figure 4 1 2 Java dk dtu imm se2e07 casetool dashboard diagram src dashboard diagram views SimulationGontrol java Eclipse Platform UO Eile Edit Source Refactor Navigate Search Project Run Window Help m 0 4 BEO BGE ES sava ij I Package Explorer 22 f SimulationControlja 22
31. oject where some were hard to solve due to lack of documentation most of them is still unsolved 11 3 2 Understanding the current project M u wem souejsujguopoeuu yno emos uopauuos ua seu Iii Supsa 2 suonuyaktobesseu suonjugegebessew F suonjugepeBesseui d h lii Bug dh 2 1171 Sunsa sq uone nujs i 711 weu uopuyeguod F 7 a El uod rn targa suma amp 1 F i wouoduios duouoduioo vonuep fre ouasa edt 3s Lr A Uwe easioyng S Tii iura sezisioung i eouejsunuod H sm uogoauuoo t sng pod souesupueuodwooms H wwouoduns U V opou n Tri Bunsa 2 11 0863 ds woo Quopepusgyu Weulorap 1701 Buga di quewAojdeq E l yu w ojd p i71 busa sour amp vopyuyaqwauodwog uopiujepiueuoduioo i Figure 3 1 Definition of CASETool 12 Analysis CHAPTER 4 Used Technology To be able to understand how we dealt with this project we need to intr
32. om Help ri 0 Q SHG Be ES amp Javea 7 Er detsultdsshbcard 2 TE Palette IN Select IE k JB Dashboardnterac i Stats Valus Provider A Bustina jenem E E saw ano Een E Properties 2 BES Dashboard E EclipseWorkspaces runtime EclipseApplication presentation Vake Path 15 EVEclipostWprkapaceotnuntineEalios Aoplicstinvpresentation L7 Simulation i 36 Installation guide APPENDIX B User guide As this thesis is For the user guide of the interaction editor please look at ABK 07 the user manual of the component editor please look at AACT07 the user manual of the deployment editor please look at AHH 07 and for the user guide for the please look at LJT 07 38 User guide APPENDIX C List of Projects A overview of the projects is shown in this chapter There are following projects in the CASE Tool e dk imm se2e07 casetool e dk imm se2e07 casetool 1 e dk imm se2e07 casetool 2 e dk imm se2e07 casetool_3 e dk imm se2e07 casetool components diagram e dk imm se2e07 casetool dashboard e dk imm se2e07 casetool dashboard diagram e dk imm se2e07 casetool deployment diagram e dk imm se2e07 casetool edit e dk imm se2e07 casetool editor e dk imm se2e07 casetool interaction 40 List of Projects e dk imm se2e07
33. t the features to install E A Europa Discovery Site 1 _ Deselect All 000 and Developement 7000 Charting and Reporting Nocera 7000 Communications 4 Properties 000 Database Development 7 amp 7000 Enabling Features 000 Graphical Editors and Frameworks If Error D 89 W100 Java Development v HU Models and Model Development amp 000 Mylyn 000 Other Tools This Europa Discovery Site contains a number of Eclipse based projects released simultaneously June 2007 19 of 104 selected Show the latest version of a feature only U Filter features included in other features on the list Feature License Some of the features have license agreements that you need to accept before proceeding with the installation Eclipse Plug in Developmen ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT Q Eclipse Modeling Framework March 17 2005 Eclipse Modeling Framework Usage Of Content GAEMF Service Data Objects THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE Service Data Objects _ DOCUMENTATION INFORMATION AND OR XML Schema Infoset Model AH ERAS SOURCE PROJECTS Ss d USE OF THE CONTENT GOVERNED BY THE TERMS AND Clipse Modeling Framewor Java Emitter Templates JE AGREEMENT AND OR THE TERMS AND CONDITIONS OF LICENSE Emitter Templates JE NOTICES INDICATED OR
34. test one The numbering was edited back so the Dashboard figures is correctly mapped again This is done in the gmfgen 5 1 CASEToolemteen 4 dk dtu immse2e07 casetool E dashboard gmfgen 2 dashboardemigen pa EL Resource Set e 9 platform resource dk dtu imm se2e07 casetool dashboard model dashboard gmfgen E Gen Editor Generator dashboard diagram Gen Diagram DashboardEditPart Metamodel Type Undefined Figure Viewmap org eclipse draw2d FreeformLayer Gen Child Node integerValueProviderEditPart H 4 Gen Child Node StateValueProviderEditPart Gen Child Node StateValueProvider2EditPart amp 4 Gen Top Level Node BusVisualEditPart lt gt Gen Top Level Node DashboardInteractionVisualEditPart 4 Gen Top Level Node DashboardVisualEditPart 4 Gen Compartment BusVisuallntegerProviderCompartmentEditPart E Gen Compartment DashboardInteractionVisualStateProviderCompartmentEditPart 4 Gen Compartment DashboardVisualStateProviderCompartmentEditPart Palette dashboard diaerampart 4 Gen Standard Preference Page Dashboard Diagram Gen Plugin Dashboard Plugin Gen Editor View dashboard diagram part Gen Navigator DashboardNavigatorContentProvider Gen Diagram Updater DashboardDiagramUpdater gt Property Sheet dashboard diagram sheet platform resource dk dtu imm se2e07 casetool dashboard model dashboard genmodel platform resource dk dtu imm se2e07 casetool dashboard model dashboard ecore platform resource dk dt
35. the model we now have the option to generate model edit editor code and test code 4 2 3 Generation of projects When we generate the model code all of the files including the source folder in the working project now represent the definition in the ecore model When we by default generate the edit and editor code new projects are added to the current workspace which is named edit and editor respectively The editor code is actually not necessary in this projects as none of the editor need the 4 3 Graphical Modeling Framework 17 XML tree editor The project would be visible under the Package Explorer It is shown on figure 4 3 Java dk dtu imm se2e07 casetool dashboard File Edit Source Refactor Navigate Search Project ri uu amp e 0 Qq wcg C HE Package Explorer 52 fg Hierarchy dk dtu immse2e07 casetool 122 dk dtu imm se2e07 casetool dashboard dk dtu immse2e ase ashboard diagram dk dtu imm se2e07 casetool dashboard edi EE Figure 4 3 Edit and Editor project generated by genmodel To have a graphical editor we need to use Graphical Modeling Framework which is explained in the next section 4 3 Graphical Modeling Framework To make an editor made with our EMF project we need to make it graphical by using GMF There are many settings in the GMF models we can adjust so the editor which we are developing is able to behave in a certain way 4 3 1 GMF Models The default fold
36. u imm se2e07 casetool model GASEToolgenmodel platform resource dk dtu imm se2e07 casetool model GASEToolecore platform plugin ore eclipse emf runtime notation model notation genmodel platform plugin ore eclipse gmf runtime notation model notation ecore Bern Selection Parent List Tree Table Tree with Columns Bg Console A Search Ri Problems Javadoc B Declaration E Properties H Property Value Diagram Containment Child Nodes Compartments Containers Gen Compartment Bus VisuallntegerProviderCompartmentEditPart Diagram Element Diagram Run Time Class Node gt View Edit Part Class Name E2 IntegerValueProviderEditPart Graphical Node Edit Policy Glass Name IntegerValueProviderGraphicalNode EditPolicy Item Semantic Edit Policy Class Name Integer ValueProviderltemSemanticEditPolicy Notation View Factory Class Name E2 IntegerValueProviderViewFactory Visual ID E 3001 Edit Policies R Canonical Edit Policy Class Name Integer ValueProviderCanonicalEditPolicy amp Misc Figure 5 1 Wrong numbering Even after integrating the dashboard some of the picture were not visible This was actually caused by the little code which added a to the component 22 implementation names and therefore the Dashboard was not able to locate the correct picture 5 2 3 1 Threading problems Eclipse does not allow multiple threads to modify the same model as the
37. u ung aog USS aema emos wp IT Simulator code Figure 5 2 24 implementation CHAPTER 6 Conclusion We would like to state the problems which occurred during the project list up the problems which still needs to be resolved and at last conclude this thesis in this chapter 6 1 Problems occurred during the project There were numerous problems and difficulties we faced during the development of the project The first thing was to understand what the project was about and how much the individual groups had progressed with their tool during the Software Engineering 2 course in the fall semester of 2007 The next step was understand how to use Eclipse and and how EMF and GMF works The existing tutorials and documents regarding how to get started was difficult to understand and there existed no other easily obtainable alternatives The limited documentation on the EMF and GMF was also an problem for the practical use of the technology Many hours was spent for looking on the net to 26 Conclusion how to solve a specific problem which in it self was not a complex problem but since there were no documentation for how to do it there were nothing to do For the installation of Eclipse we faced some difficulties as there were no in structions to install which packages to make the projects work The installation process was not documented in the reports of the different groups so it would seem that t
38. ulation e Recorded simulation does not appear before saving and reopening the CASEtool e Example in the Dashboard is not complete e arrow from state of one component over to a state of an another component e Category needs to be in one place e Simulator button from deployment editor should be removed e Load new dashboard diagram would be nice e Automaton can be removed out of components when moved to left up because the component box will not expand If it is moved so much up or to the left that automaton box does not overlap with the component box it is not possible to pick it up later with the mouse e Once a state has been chosen as initial it appears not to be possible to change others to initial It is updated if we click on the automaton box e The transition does not change when the source or target is changed in the property window e Graphical repair of initial state The name of the first created state is changed to a if the name of the state was a In the property window there is still a state named a even though there are no states named a anymore on the editor 10 Analysis e If you select a software component and put an automaton box in it then put states in it the states are labeled false which is not the case with sensors and actuator e problems with state names which length is 1 like a b to open with tree editor Due to the many obstacles that appeared during the pr
39. y explaining what EMF projects contains 4 2 1 EMF Projects EMF projects contains more different files and folders compared to standard Java projects in Eclipse Where standard Java projects have a source folder and a Source Library The EMF projects contains additionally Plug in Dependencies which major part is consisted of eclipse relevant library files a few configuration files and a model folder where we find Ecore models and Gen models Ecore models and Gen models is explained in the next subsection To create an EMF project we firstly need a ecore model file which is required under the wizard of creating a new EMF project A genmodel is there after created 4 2 2 EMF Models 4 2 2 1 Ecore model To make a model in EMF we need a ecore model to describe how a model is constructed The ecore model is similar to class diagrams where we describe how each class is associated to an another Eclipse provides a default tree editor to write the ecore model You can also use the ecore diagram editor which is more convenient to use as the relations between the objects are represented visually In figure 4 2 we can see how a Ecore file looks like A graphical representation of the ecore model will be briefly presented in the chapter 3 4 2 2 2 Gen Model The role of the genmodel is to auto generate code from the ecore model we have specified From the editor of a Genmodel what we see is exactly same as the 16 Used Technology

Download Pdf Manuals

image

Related Search

Related Contents

Sanyo PDG-DWT50L  Manuel technique  DS-500 USER's MANUAL  Samsung Galaxy Tab 7.0 Plus  PDF en français  Fujitsu FS-102ATL User's Manual  REVISTA 2008 final  “過熱水蒸気” でヘルシー調理。  

Copyright © All rights reserved.
Failed to retrieve file