Advertisement

Refactoring for Separation of Concurrent Concerns

  • Yang Zhang
  • Dongwen Zhang
  • Weixing Ji
  • Yizhuo Wang
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9530)

Abstract

Concurrent concerns commonly scatter among multithreaded software and tangle with core functionalities, which will make the concurrent software difficult to be maintained. Separation of concurrent concerns will benefit to improve the design of concurrent software and to manage the concurrency uniformly. This paper presents a refactoring framework to separate concurrent concerns from core functionalities using aspect-oriented approach. The refactoring framework illustrates in detail how to transform thread-related operations including threads, synchronization, barriers, and thread communications, into aspects that are designed to be reused. The refactoring framework is evaluated on SPECjbb2005 benchmark and several benchmarks in JGF benchmark suite by presenting the detailed refactoring process. Experimental results show that the framework is effective to refactoring these benchmarks.

Keywords

Refactoring Aspect-oriented programming Concurrency Separation of concerns Thread-related operations 

Notes

Acknowledgments

This work is partially supported by National Nature Science Foundation of China under grant No. 61440012 and No. 61300120, the top-notch young talent Foundation of Hebei Province of China under Grant No. BJ2014023, and Nature Science Foundation of Hebei Province under Grant No. F2012208016. The authors also gratefully acknowledge the insightful comments and suggestions of the reviewers, which have improved the presentation.

References

  1. 1.
    Rashid, A.: Metalevel Architectures and Separation of Crosscutting Concerns, pp. 231–249. Springer, Berlin, Heidelberg (2001)CrossRefGoogle Scholar
  2. 2.
    Ossher, H., Tarr, P.: Using multidimensional separation of concerns to (re)shape evolving software. Commun. ACM 44(10), 43–50 (2001)CrossRefGoogle Scholar
  3. 3.
    Vidala, S.A., Marcosa, C.A.: Toward automated refactoring of crosscutting concerns into aspects. J. Syst. Softw. 86, 1482–1497 (2013)CrossRefGoogle Scholar
  4. 4.
    Santosa, A.E., Ramirez, R.: A framework for separation of concerns in concurrent programming. In: International Computer Software and Applications Conference, pp. 619–628. IEEE Computer Society (2007)Google Scholar
  5. 5.
    Netinant, P.: Separation of concerns for multithreads object-oriented programming. In: 6th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology, pp. 718–721 (2009)Google Scholar
  6. 6.
    Sobral, J.L.: Incrementally developing parallel applications with AspectJ. In: International Parallel and Distributed Processing Symposium, p. 95. IEEE Computer Society (2006)Google Scholar
  7. 7.
    Kiczales, G., Lamping, J., Mendhekar, A., et al.: Aspect-oriented programming. In: Ecoop97 — Object Oriented Programming (1997)Google Scholar
  8. 8.
    Smith, L.A., Bull, J.M., Obdrizalek, J.: A parallel Java grande benchmark suite. In: ACM/IEEE Conference of Supercomputing, p. 6. IEEE (2001)Google Scholar
  9. 9.
    Adamson, A., Dagastine, D., Sarne, S.: SPECjbb2005—ayear in the life of a benchmark. In: Proceedings of 2007 SPEC Benchmark Workshop, pp. 151–160. Austin, USA (2007)Google Scholar
  10. 10.
    Dig, D., Marrero, J., Ernst, M.D.: Refactoring sequential Java code for concurrency via concurrent libraries. In: Proceedings of IEEE 31st International Conference on Software Engineering, pp. 397–407 (2009)Google Scholar
  11. 11.
    Dig, D.: A refactoring approach to parallelism. Softw. IEEE 28(1), 17–22 (2011)CrossRefGoogle Scholar
  12. 12.
    Schafer, M., Dolby, J., Sridharan, M., Torlak, E., Tip, F.: Correct refactoring of concurrent Java code. In: Proceedings of 24th European Conference of Object-Oriented Programming, pp. 225–249. Maribor, Slovenia (2010)Google Scholar
  13. 13.
    Brown, C., Hammond, K., Danelutto, M., Kilpatrick, P., Schöner, H., Breddin, T.: Paraphrasing: generating parallel programs using refactoring. In: Boer, F.S., Bonsangue, M.M., Beckert, B., Damiani, F. (eds.) FMCO 2011. LNCS, vol. 7542, pp. 237–256. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  14. 14.
    Larsen, P., Ladelsky, R., Lidman, J., McKee, S.A., Karlsson, S., Zaks, A.: Parallelizing more loops with compiler guided refactoring. In: Proceedings of 42nd International Conference on Parallel Processing, pp. 410–419 (2012)Google Scholar
  15. 15.
    Tao, B.X., Qian, J.: Refactoring Java concurrent programs based on synchronization requirement analysis. In: IEEE International Conference on Software Maintenance and Evaluation, pp. 361–370. IEEE Computer Society (2014)Google Scholar
  16. 16.
    Chen, N., Johnson, R.E.: JFlow: Practical refactorings for flow-based parallelism. In: IEEE/ACM 28th International Conference on Automated Software Engineering (ASE), pp. 202–212, 11–15 November 2013Google Scholar
  17. 17.
    Tran, T., Steffen, M.: Design issues in concurrent object-oriented languages and observability. In: 2011 Third International Conference on Knowledge and Systems Engineering (2011)Google Scholar
  18. 18.
    Zhang, Y.: Java Parallel Programming. Tsinghua University Press, Beijing (2015)Google Scholar
  19. 19.
    Zhang, Y., Ji, W.: A scalable method-level parallel library and its improvement. J. Supercomputing 61(3), 1154–1167 (2012)CrossRefGoogle Scholar
  20. 20.
    Soares, S., Borba, P., Lima, R.: Concurrency control modularization with aspect-oriented programming. In: International Computer Software and Applications Conference, pp. 295–300. IEEE Computer Society (2007)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Yang Zhang
    • 1
  • Dongwen Zhang
    • 1
  • Weixing Ji
    • 2
  • Yizhuo Wang
    • 2
  1. 1.School of Information Science and EngineeringHebei University of Science and TechnologyShijiazhuangChina
  2. 2.School of ComputerBeijing Institute of TechnologyBeijingChina

Personalised recommendations