The ability to make modifications simultaneously is a necessity in modern software development. Multiple actors must be able to work on the same parts of the software without causing conflicts. Revision control and merge tools can be used to achieve this, but conventionally they function on the file level without deeper understanding of the underlying structure.
In this thesis we consider the case of an application, where flowchart structures are stored as XML files. Although the merging of XML and other hierarchical structures has been researched quite extensively, we cannot apply it directly to our research. As of yet there has not been comprehensive research on how to merge flowchart structures. Thus, we design an algorithm based on the existing research and extend it with our own findings. Additionally, we implement a merge tool that is to be used in a real-world application, where the flowchart structures are developed by multiple actors in parallel.
In our research we focus on the dual nature of the problem; the flowcharts are distinct structures from the XML format they are stored in. Both must be taken into account in the merging process. Although there are major differences between the flowchart and XML structures, we observe that by incorporating the appropriate pre- and post-processing steps the merge is possible with a simple tree merging algorithm. More specifically, the references between the nodes of the flowchart must be processed accordingly, so that the necessary information is available for the merge algorithm.
Our results show that the algorithm functions correctly in both basic test cases as well as more complex situations resembling real-world scenarios. Furthermore, the implemented merge tool performs adequately. Based on our research, merge algorithms could be developed for other flowchart applications. Additionally, future research could be conducted on supporting more complex edit operations or general merging algorithms for flowcharts.Mahdollisuus tehdä samanaikaisia muutoksia on välttämättömyys nykyaikaisessa ohjelmistokehityksessä. Useiden toimijoiden tulee voida työskennellä saman ohjelman osan parissa aiheuttamatta konflikteja. Versionhallintaa ja merge-työkaluja voidaan käyttää tämän saavuttamiseksi, mutta tavanomaisesti ne toimivat vain tiedostotasolla ilman syvempää ymmärrystä sen alla olevasta rakenteesta.
Tässä diplomityössä tarkastelemme sovellusta, jossa vuokaaviorakenteita säilytetään XML tiedostoina. Vaikka XML:n ja muiden hierarkisten rakenteiden yhdistämistä ollaan tutkittu melko laajasti, emme voi soveltaa sitä suoraan omaan tutkimukseemme. Tähän mennessä kattavaa tutkimusta vuokaaviorakenteiden yhdistämisestä ei ole ollut. Näin ollen suunnittelemme algoritmin pohjautuen olemassa olevaan tutkimukseen ja laajennamme sitä omilla löydöksillämme. Lisäksi toteutamme merge-työkalun, jota tullaan käyttämään käytännön sovelluksessa, jossa useat toimijat kehittävät vuokaaviorakenteita samanaikaisesti.
Tutkimuksessamme keskitymme ongelman kaksijakoisuuteen; vuokaaviot ovat erillisiä rakenteita XML formaatista, jossa niitä säilötään. Molemmat tulee ottaa huomioon yhdistämisprosessissa. Havaitsemme, että sisällyttämällä prosessiin sopivat esi- ja jälkiprosessointivaiheet, voidaan yhdistäminen suorittaa yksinkertaisella puurakenteiden merge-algoritmilla, vaikka vuokaavio- ja XML-rakenteiden välillä on suuria eroja. Vuokaavion solmujen väliset viittaukset tulee prosessoida sopivasti niin, että merge-algoritmilla on saatavilla tarvittava informaatio.
Tuloksemme osoittavat, että algoritmin toiminta on oikea sekä yksinkertaisissa testitapauksissa, että monimutkaisimmissa käytäntöä vastaavissa tilanteissa. Sen lisäksi toteutettu merge-työkalu on suorituskyvyltään riittävä. Tutkimuksemme perusteella merge-algoritmeja voidaan kehittää muille vuokaaviosovelluksille. Lisäksi tulevaisuudessa on mahdollista tutkia monimutkaisempien muokkausten tukemista, sekä yleisiä merge-algoritmeja vuokaavioille.