Abstract
In textual modeling, models are created through an intermediate parsing step which maps textual representations to abstract model structures. Therefore, the identify of elements is not stable across different versions of the same model. Existing model differencing algorithms, therefore, cannot be applied directly because they need to identify model elements across versions. In this paper we present Textual Model Diff (tmdiff), a technique to support model differencing for textual languages. tmdiff requires origin tracking during text-to-model mapping to trace model elements back to the symbolic names that define them in the textual representation. Based on textual alignment of those names, tmdiff can then determine which elements are the same across revisions, and which are added or removed. As a result, tmdiff brings the benefits of model differencing to textual languages.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
For the sake of presentation, we use the abstract labels \(d_i\) for the rest of the paper, but keep in mind that they represent source locations.
- 2.
- 3.
- 4.
- 5.
The actual command: git diff --patience --ignore-blank-lines --ignore-all-space \(R_1\) \(R_2\) path.
References
Alanen, M., Porres, I.: Difference and union of models. In: Stevens, P., Whittle, J., Booch, G. (eds.) UML 2003. LNCS, vol. 2863, pp. 2–17. Springer, Heidelberg (2003)
Brun, C., Pierantonio, A.: Model differences in the eclipse modeling framework. UPGRADE Eur. J. Inform. Prof. 9(2), 29–34 (2008)
Eclipse Foundation: EMF Compare Project. https://www.eclipse.org/emf/compare/
Erdweg, S., et al.: The state of the art in language workbenches. In: Erwig, M., Paige, R.F., Van Wyk, E. (eds.) SLE 2013. LNCS, vol. 8225, pp. 197–217. Springer, Heidelberg (2013)
Eysholdt, M., Behrens, H.: Xtext: implement your language faster than the quick and dirty way. In: Proceedings of the ACM International Conference Companion on Object Oriented Programming Systems Languages and Applications Companion, OOPSLA 2010, pp. 307–309. ACM, New York (2010)
Goldschmidt, T., Becker, S., Uhl, A.: Classification of concrete textual syntax mapping approaches. In: Schieferdecker, I., Hartman, A. (eds.) ECMDA-FA 2008. LNCS, vol. 5095, pp. 169–184. Springer, Heidelberg (2008)
Inostroza, P., van der Storm, T., Erdweg, S.: Tracing program transformations with string origins. In: Di Ruscio, D., Varró, D. (eds.) ICMT 2014. LNCS, vol. 8568, pp. 154–169. Springer, Heidelberg (2014)
Klint, P., van der Storm, T., Vinju, J.: Rascal: a domain-specific language for source code analysis and manipulation. In: SCAM, pp. 168–177 (2009)
Kolovos, D.S., Di Ruscio, D., Pierantonio, A., Paige, R.F.: Different models for model matching: an analysis of approaches to support model differencing. In: ICSE Workshop on Comparison and Versioning of Software Models (CVSM 2009), pp. 1–6. IEEE (2009)
Kolovos, D.S., Paige, R.F., Polack, F.A.C.: The epsilon transformation language. In: Vallecillo, A., Gray, J., Pierantonio, A. (eds.) ICMT 2008. LNCS, vol. 5063, pp. 46–60. Springer, Heidelberg (2008)
Miller, W., Myers, E.W.: A file comparison program. Softw. Pract. Exper. 15(11), 1025–1040 (1985)
Myers, E.W.: An \(O(ND)\) difference algorithm and its variations. Algorithmica 1(1–4), 251–266 (1986)
Rose, L.M., Paige, R.F., Kolovos, D.S., Polack, F.A.C.: Constructing models with the human-usable textual notation. In: Czarnecki, K., Ober, I., Bruel, J.-M., Uhl, A., Völter, M. (eds.) MODELS 2008. LNCS, vol. 5301, pp. 249–263. Springer, Heidelberg (2008)
Stephan, M., Cordy, J.R.: A survey of model comparison approaches and applications. In: MODELSWARD, pp. 265–277 (2013)
Tichy, W.F.: The string-to-string correction problem with block moves. ACM Trans. Comput. Syst. 2(4), 309–321 (1984)
van den Bos, J., van der Storm, T.: Bringing domain-specific languages to digital forensics. In: ICSE 2011, ACM (2011). Software Engineering in Practice
van den Bos, J., van der Storm, T.: A case study in evidence-based DSL evolution. In: Van Gorp, P., Ritter, T., Rose, L.M. (eds.) ECMFA 2013. LNCS, vol. 7949, pp. 207–219. Springer, Heidelberg (2013)
van der Storm, T., Cook, W.R., Loh, A.: The design and implementation of object grammars. Sci. Comput. Program. 96(4), 460–487 (2014). Selected Papers from the Fifth International Conference on Software Language Engineering (SLE 2012)
van Deursen, A., Klint, P., Tip, F.: Origin tracking. Symbolic Comput. 15, 523–545 (1993)
Yang, W.: Identifying syntactic differences between two programs. Softw. Pract. Exper. 21(7), 739–755 (1991)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
van Rozen, R., van der Storm, T. (2015). Origin Tracking \(+\) Text Differencing \(=\) Textual Model Differencing. In: Kolovos, D., Wimmer, M. (eds) Theory and Practice of Model Transformations. ICMT 2015. Lecture Notes in Computer Science(), vol 9152. Springer, Cham. https://doi.org/10.1007/978-3-319-21155-8_2
Download citation
DOI: https://doi.org/10.1007/978-3-319-21155-8_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-21154-1
Online ISBN: 978-3-319-21155-8
eBook Packages: Computer ScienceComputer Science (R0)