Skip to main content

Origin Tracking \(+\) Text Differencing \(=\) Textual Model Differencing

  • Conference paper
  • First Online:
Theory and Practice of Model Transformations (ICMT 2015)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 9152))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 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. 2.

    See: http://bramcohen.livejournal.com/73318.html.

  3. 3.

    https://github.com/cwi-swat/textual-model-diff.

  4. 4.

    https://github.com/jvdb/derric-eval.

  5. 5.

    The actual command: git diff --patience --ignore-blank-lines --ignore-all-space \(R_1\) \(R_2\) path.

References

  1. 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)

    Chapter  Google Scholar 

  2. Brun, C., Pierantonio, A.: Model differences in the eclipse modeling framework. UPGRADE Eur. J. Inform. Prof. 9(2), 29–34 (2008)

    Google Scholar 

  3. Eclipse Foundation: EMF Compare Project. https://www.eclipse.org/emf/compare/

  4. 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)

    Chapter  Google Scholar 

  5. 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)

    Google Scholar 

  6. 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)

    Chapter  Google Scholar 

  7. 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)

    Google Scholar 

  8. 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)

    Google Scholar 

  9. 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)

    Google Scholar 

  10. 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)

    Chapter  Google Scholar 

  11. Miller, W., Myers, E.W.: A file comparison program. Softw. Pract. Exper. 15(11), 1025–1040 (1985)

    Article  Google Scholar 

  12. Myers, E.W.: An \(O(ND)\) difference algorithm and its variations. Algorithmica 1(1–4), 251–266 (1986)

    Article  MathSciNet  MATH  Google Scholar 

  13. 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)

    Chapter  Google Scholar 

  14. Stephan, M., Cordy, J.R.: A survey of model comparison approaches and applications. In: MODELSWARD, pp. 265–277 (2013)

    Google Scholar 

  15. Tichy, W.F.: The string-to-string correction problem with block moves. ACM Trans. Comput. Syst. 2(4), 309–321 (1984)

    Article  MathSciNet  Google Scholar 

  16. van den Bos, J., van der Storm, T.: Bringing domain-specific languages to digital forensics. In: ICSE 2011, ACM (2011). Software Engineering in Practice

    Google Scholar 

  17. 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)

    Chapter  Google Scholar 

  18. 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)

    Article  Google Scholar 

  19. van Deursen, A., Klint, P., Tip, F.: Origin tracking. Symbolic Comput. 15, 523–545 (1993)

    Article  MATH  Google Scholar 

  20. Yang, W.: Identifying syntactic differences between two programs. Softw. Pract. Exper. 21(7), 739–755 (1991)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Riemer van Rozen .

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics