{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,12,5]],"date-time":"2025-12-05T11:58:58Z","timestamp":1764935938708,"version":"3.37.3"},"reference-count":46,"publisher":"Springer Science and Business Media LLC","issue":"4","license":[{"start":{"date-parts":[[2020,7,10]],"date-time":"2020-07-10T00:00:00Z","timestamp":1594339200000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2020,7,10]],"date-time":"2020-07-10T00:00:00Z","timestamp":1594339200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"funder":[{"DOI":"10.13039\/100010661","name":"Horizon 2020 Framework Programme","doi-asserted-by":"publisher","award":["779882"],"award-info":[{"award-number":["779882"]}],"id":[{"id":"10.13039\/100010661","id-type":"DOI","asserted-by":"publisher"}]},{"DOI":"10.13039\/501100000266","name":"Engineering and Physical Sciences Research Council","doi-asserted-by":"crossref","award":["EP\/P020631\/1"],"award-info":[{"award-number":["EP\/P020631\/1"]}],"id":[{"id":"10.13039\/501100000266","id-type":"DOI","asserted-by":"crossref"}]}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":["Int J Parallel Prog"],"published-print":{"date-parts":[[2020,8]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p>The Generic Reusable Parallel Pattern Interface (GrPPI) is a very useful abstraction over different parallel pattern libraries, allowing the programmer to write generic patterned parallel code that can easily be compiled to different backends such as FastFlow, OpenMP, Intel TBB and C++ threads. However, rewriting legacy code to use GrPPI still involves code transformations that can be highly non-trivial, especially for programmers who are not experts in parallelism. This paper describes <jats:italic>software refactorings<\/jats:italic> to semi-automatically introduce instances of GrPPI patterns into sequential C++ code, as well as <jats:italic>safety checking<\/jats:italic> static analysis mechanisms which verify that introducing patterns into the code does not introduce concurrency-related bugs such as race conditions. We demonstrate the refactorings and safety-checking mechanisms on four simple benchmark applications, showing that we are able to obtain, with little effort, GrPPI-based parallel versions that accomplish good speedups (comparable to those of manually-produced parallel versions) using different pattern backends.<\/jats:p>","DOI":"10.1007\/s10766-020-00667-x","type":"journal-article","created":{"date-parts":[[2020,7,10]],"date-time":"2020-07-10T05:53:51Z","timestamp":1594360431000},"page":"603-625","update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":7,"title":["Refactoring GrPPI: Generic Refactoring for Generic Parallelism in C++"],"prefix":"10.1007","volume":"48","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-6030-2885","authenticated-orcid":false,"given":"Christopher","family":"Brown","sequence":"first","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Vladimir","family":"Janjic","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Adam D.","family":"Barwell","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"J. Daniel","family":"Garcia","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Kenneth","family":"MacKenzie","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"297","published-online":{"date-parts":[[2020,7,10]]},"reference":[{"key":"667_CR1","doi-asserted-by":"crossref","unstructured":"Aldinucci, M., Danelutto, M., Kilpatrick, P., Torquati, M.: Fastflow: high-level and efficient streaming on multicore. In: Programming Multi-core and Many-core Computing Systems (2017)","DOI":"10.1002\/9781119332015.ch13"},{"key":"667_CR2","volume-title":"Optimizing Compilers for Modern Architectures: A Dependence-Based Approach","author":"R Allen","year":"2001","unstructured":"Allen, R., Kennedy, K.: Optimizing Compilers for Modern Architectures: A Dependence-Based Approach. Morgan Kaufmann, Burlington (2001)"},{"key":"667_CR3","doi-asserted-by":"crossref","unstructured":"Ancourt, C., Irigoin, F.: Scanning polyhedra with DO loops. In: PPOPP, pp. 39\u201350, ACM (1991)","DOI":"10.1145\/109626.109631"},{"issue":"10","key":"667_CR4","doi-asserted-by":"publisher","first-page":"56","DOI":"10.1145\/1562764.1562783","volume":"52","author":"K Asanovic","year":"2009","unstructured":"Asanovic, K., Bod\u00edk, R., Demmel, J., Keaveny, T., Keutzer, K., Kubiatowicz, J., Morgan, N., Patterson, D.A., Sen, K., Wawrzynek, J., Wessel, D., Yelick, K.A.: A view of the parallel computing landscape. Commun. ACM 52(10), 56\u201367 (2009)","journal-title":"Commun. ACM"},{"key":"667_CR5","doi-asserted-by":"crossref","unstructured":"Axelsson, E., Claessen, K., Sheeran, M., Svenningsson, J., Engdal, D., Persson, A.: The Design and implementation of Feldspar\u2014an embedded language for digital signal processing. In: IFL, Lecture Notes in Computer Science, vol 6647, pp 121\u2013136, Springer (2010)","DOI":"10.1007\/978-3-642-24276-2_8"},{"issue":"4","key":"667_CR6","first-page":"792","volume":"35","author":"AD Barwell","year":"2016","unstructured":"Barwell, A.D., Brown, C., Hammond, K., Turek, W., Byrski, A.: Using program shaping and algorithmic skeletons to parallelise an evolutionary multi-agent system in Erlang. Comput. Inform. 35(4), 792\u2013818 (2016)","journal-title":"Comput. Inform."},{"key":"667_CR7","unstructured":"Bastoul, C.: Code generation in the polyhedral model is easier than you think. In: IEEE PACT, IEEE Computer Society, pp. 7\u201316 (2004)"},{"key":"667_CR8","unstructured":"Boulet, P., Feautrier, P.: Scanning Polyhedra without do-Loops. In: IEEE PACT, IEEE Computer Society, pp. 4\u201311 (1998)"},{"issue":"4","key":"667_CR9","doi-asserted-by":"publisher","first-page":"564","DOI":"10.1007\/s10766-013-0266-5","volume":"42","author":"C Brown","year":"2014","unstructured":"Brown, C., Danelutto, M., Hammond, K., Kilpatrick, P., Elliott, A.: Cost-directed refactoring for parallel Erlang programs. Int. J. Parallel Program. 42(4), 564\u2013582 (2014)","journal-title":"Int. J. Parallel Program."},{"key":"667_CR10","doi-asserted-by":"crossref","unstructured":"Brown, C., Janjic, V., Barwell, A., Thomson, J., Castaneda Lozano, R., Cole, M., Franke, B., Garcia-Sanchez, J., Del Rio Astorga, D., MacKenzie, K.: A hybrid approach to parallel pattern discovery in C++. In: Proceedings of the 28th Euromicro International Conference on Parallel, Distributed and Network-base Processing (2019)","DOI":"10.1109\/PDP50117.2020.00035"},{"key":"667_CR11","doi-asserted-by":"crossref","unstructured":"Brown, C., Janjic, V., Hammond, K., Sch\u00f6ner, H., Idrees, K., Glass, C.W.: Agricultural reform: more efficient farming using advanced parallel refactoring tools. In: PDP, IEEE Computer Society, pp. 36\u201343 (2014)","DOI":"10.1109\/PDP.2014.94"},{"key":"667_CR12","doi-asserted-by":"crossref","unstructured":"Burke, M.G., Cytron, R.: Interprocedural dependence analysis and parallelization (with Retrospective). In: Best of PLDI, ACM, pp. 139\u2013154 (1986)","DOI":"10.1145\/989393.989411"},{"issue":"1","key":"667_CR13","doi-asserted-by":"publisher","first-page":"44","DOI":"10.1145\/321992.321996","volume":"24","author":"RM Burstall","year":"1977","unstructured":"Burstall, R.M., Darlington, J.: A transformation system for developing recursive programs. J. ACM 24(1), 44\u201367 (1977). https:\/\/doi.org\/10.1145\/321992.321996","journal-title":"J. ACM"},{"key":"667_CR14","volume-title":"A parallel programming with Microsoft Visual C++: design patterns for decomposition and coordination on multicore architectures","author":"C Campbell","year":"2011","unstructured":"Campbell, C., Miller, A.: A parallel programming with Microsoft Visual C++: design patterns for decomposition and coordination on multicore architectures, 1st edn. Microsoft Press, Redmond (2011)","edition":"1"},{"issue":"3","key":"667_CR15","doi-asserted-by":"publisher","first-page":"161","DOI":"10.1109\/32.489078","volume":"22","author":"JC Corbett","year":"1996","unstructured":"Corbett, J.C.: Evaluating deadlock detection methods for concurrent software. IEEE Trans. Softw. Eng. 22(3), 161\u2013180 (1996)","journal-title":"IEEE Trans. Softw. Eng."},{"issue":"24","key":"667_CR16","doi-asserted-by":"publisher","first-page":"e4175","DOI":"10.1002\/cpe.4175","volume":"29","author":"D del Rio Astorga","year":"2017","unstructured":"del Rio Astorga, D., Dolz, M.F., Fern\u00e1ndez, J., Garc\u00eda, J.D.: A generic parallel pattern interface for stream and data processing. Concurr. Comput. Pract. Exp. 29(24), e4175 (2017)","journal-title":"Concurr. Comput. Pract. Exp."},{"issue":"6","key":"667_CR17","first-page":"779","volume":"32","author":"D del Rio Astorga","year":"2018","unstructured":"del Rio Astorga, D., Dolz, M.F., S\u00e1nchez, L.M., Garc\u00eda, J.D., Danelutto, M., Torquati, M.: Finding parallel patterns through static analysis in C++ applications. IJHPCA 32(6), 779\u2013788 (2018)","journal-title":"IJHPCA"},{"issue":"1","key":"667_CR18","doi-asserted-by":"publisher","first-page":"17","DOI":"10.1109\/MS.2011.1","volume":"28","author":"D Dig","year":"2011","unstructured":"Dig, D.: A refactoring approach to parallelism. IEEE Softw. 28(1), 17\u201322 (2011)","journal-title":"IEEE Softw."},{"key":"667_CR19","doi-asserted-by":"publisher","first-page":"39944","DOI":"10.1109\/ACCESS.2018.2855064","volume":"6","author":"MF Dolz","year":"2018","unstructured":"Dolz, M.F., del Rio Astorga, D., Fern\u00e1ndez, J., Garc\u00eda, J.D., Carretero, J.: Towards automatic parallelization of stream processing applications. IEEE Access 6, 39944\u201339961 (2018)","journal-title":"IEEE Access"},{"key":"667_CR20","doi-asserted-by":"publisher","DOI":"10.7551\/mitpress\/1290.001.0001","volume-title":"Ant Colony Optimization","author":"M Dorigo","year":"2004","unstructured":"Dorigo, M., St\u00fctzle, T.: Ant Colony Optimization. MIT Press, Cambridge (2004)"},{"issue":"1","key":"667_CR21","doi-asserted-by":"publisher","first-page":"62","DOI":"10.1007\/s10766-017-0490-5","volume":"46","author":"A Ernstsson","year":"2017","unstructured":"Ernstsson, A., Li, L., Kessler, C.: SkePU 2: flexible and type-safe skeleton programming for heterogeneous parallel systems. Int. J. Parallel Program. 46(1), 62\u201380 (2017)","journal-title":"Int. J. Parallel Program."},{"key":"667_CR22","unstructured":"Foundation, E.: Eclipse\u2014an open development platform (2009). http:\/\/www.eclipse.org"},{"key":"667_CR23","doi-asserted-by":"publisher","DOI":"10.1007\/s11227-019-02826-5","author":"JD Garcia","year":"2019","unstructured":"Garcia, J.D., del Rio, D., Aldinucci, M., Tordini, F., Danelutto, M., Mencagli, G., Torquati, M.: Challenging the abstraction penalty in parallel patterns libraries. J. Supercomput. (2019). https:\/\/doi.org\/10.1007\/s11227-019-02826-5","journal-title":"J. Supercomput."},{"issue":"12","key":"667_CR24","doi-asserted-by":"publisher","first-page":"1135","DOI":"10.1002\/spe.1026","volume":"40","author":"H Gonz\u00e1lez-V\u00e9lez","year":"2010","unstructured":"Gonz\u00e1lez-V\u00e9lez, H., Leyton, M.: A survey of algorithmic skeleton frameworks: high-level structured parallel programming enablers. Softw. Pract. Exper. 40(12), 1135\u20131160 (2010)","journal-title":"Softw. Pract. Exper."},{"key":"667_CR25","series-title":"Lecture Notes in Computer Science","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-25935-0_16","volume-title":"Domain-Specific Program Generation","author":"S Gorlatch","year":"2004","unstructured":"Gorlatch, S.: Domain-specific optimizations of composed parallel components. In: Lengauer, C., Batory, D., Consel, C., Odersky, M. (eds.) Domain-Specific Program Generation. Lecture Notes in Computer Science, vol. 3016. Springer, Berlin (2004)"},{"key":"667_CR26","unstructured":"Gorlatch, S., Wedler, C., Lengauer, C.: Optimization rules for programming with collective operations. In: IPPS\/SPDP, IEEE Computer Society, pp. 492\u2013499 (1999)"},{"key":"667_CR27","doi-asserted-by":"crossref","unstructured":"Guo, J., Thiyagalingam, J., Scholz, S.: Breaking the GPU programming barrier with the auto-parallelising SAC compiler. In: DAMP, ACM, pp. 15\u201324 (2011)","DOI":"10.1145\/1926354.1926359"},{"key":"667_CR28","doi-asserted-by":"crossref","unstructured":"Hagedorn, B., Stoltzfus, L., Steuwer, M., Gorlatch, S., Dubach, C.: High performance stencil code generation with lift. In: CGO, ACM, pp. 100\u2013112 (2018)","DOI":"10.1145\/3168824"},{"key":"667_CR29","doi-asserted-by":"crossref","unstructured":"Janjic, V., Brown, C., Mackenzie, K., Hammond, K., Danelutto, M., Aldinucci, M., Garc\u00eda, J.D.: RPL: a domain-specific language for designing and implementing parallel C++ applications. In: PDP, IEEE Computer Society, pp. 288\u2013295 (2016)","DOI":"10.1109\/PDP.2016.122"},{"issue":"2","key":"667_CR30","doi-asserted-by":"publisher","first-page":"83","DOI":"10.1145\/360827.360844","volume":"17","author":"L Lamport","year":"1974","unstructured":"Lamport, L.: The parallel execution of DO loops. Commun. ACM 17(2), 83\u201393 (1974)","journal-title":"Commun. ACM"},{"key":"667_CR31","doi-asserted-by":"crossref","unstructured":"Leung, A., Lhot\u00e1k, O., Lashari, G.: Automatic parallelization for graphics processing units. In: PPPJ, ACM, pp. 91\u2013100 (2009)","DOI":"10.1145\/1596655.1596670"},{"key":"667_CR32","doi-asserted-by":"crossref","unstructured":"Li, H., Thompson, S.J.: Safe Concurrency Introduction through Slicing. In: PEPM, ACM, pp 103\u2013113 (2015)","DOI":"10.1145\/2678015.2682533"},{"key":"667_CR33","doi-asserted-by":"crossref","unstructured":"Lim, A.W., Lam, M.S.: Maximizing parallelism and minimizing synchronization with affine transforms. In: POPL, ACM Press, pp. 201\u2013214 (1997)","DOI":"10.1145\/263699.263719"},{"key":"667_CR34","series-title":"Lecture notes in computer science","volume-title":"Euro-Par","author":"K Matsuzaki","year":"2004","unstructured":"Matsuzaki, K., Kakehi, K., Iwasaki, H., Hu, Z., Akashi, Y.: A fusion-embedded skeleton library. In: Danelutto, M., Vanneschi, M., Laforenza, D. (eds.) Euro-Par. Lecture notes in computer science, vol. 3149. Springer, Berlin (2004)"},{"issue":"2","key":"667_CR35","doi-asserted-by":"publisher","first-page":"126","DOI":"10.1109\/TSE.2004.1265817","volume":"30","author":"T Mens","year":"2004","unstructured":"Mens, T., Tourw\u00e9, T.: A survey of software refactoring. IEEE Trans. Softw. Eng. 30(2), 126\u2013139 (2004)","journal-title":"IEEE Trans. Softw. Eng."},{"key":"667_CR36","unstructured":"Microsoft: Visual Studio IDE (2019). https:\/\/visualstudio.microsoft.com\/vs\/"},{"key":"667_CR37","volume-title":"Advanced Compiler Design and Implementation","author":"SS Muchnick","year":"1997","unstructured":"Muchnick, S.S.: Advanced Compiler Design and Implementation. Morgan Kaufmann, Burlington (1997)"},{"key":"667_CR38","unstructured":"Opdyke, W.F.: Refactoring object-oriented frameworks. In: Ph.D. Thesis, University of Illinois at Urbana-Champaign, Champaign (1992)"},{"key":"667_CR39","doi-asserted-by":"crossref","unstructured":"Pugh, W.: The omega test: a fast and practical integer programming algorithm for dependence analysis. In: SC, ACM, pp. 4\u201313 (1991)","DOI":"10.1145\/125826.125848"},{"issue":"4","key":"667_CR40","doi-asserted-by":"publisher","first-page":"24:1","DOI":"10.1145\/2729975","volume":"24","author":"C Radoi","year":"2015","unstructured":"Radoi, C., Dig, D.: Effective techniques for static race detection in java parallel loops. ACM Trans. Softw. Eng. Methodol. 24(4), 24:1\u201324:30 (2015)","journal-title":"ACM Trans. Softw. Eng. Methodol."},{"key":"667_CR41","unstructured":"Reyes, R., Lom\u00fcller, V.: SYCL: single-source C++ accelerator programming. In: PARCO, Advances in Parallel Computing, IOS Press, vol\u00a027, pp 673\u2013682 (2015)"},{"key":"667_CR42","doi-asserted-by":"crossref","unstructured":"Robinson, A.: TBB (Intel Threading Building Blocks). In: Encyclopedia of Parallel Computing, p. 2029. Springer (2011)","DOI":"10.1007\/978-0-387-09766-4_2080"},{"key":"667_CR43","doi-asserted-by":"crossref","unstructured":"Rul, S., Vandierendonck, H., Bosschere, K.D.: Extracting coarse-grain parallelism in general-purpose programs. In: PPOPP, ACM, pp. 281\u2013282 (2008)","DOI":"10.1145\/1345206.1345256"},{"key":"667_CR44","series-title":"Lecture notes in computer science","volume-title":"Euro-Par","author":"D Stefanovic","year":"2000","unstructured":"Stefanovic, D., Martonosi, M.: Limits and graph structure of available instruction-level parallelism. In: Bode, A., Ludwig, T., Karl, W. (eds.) Euro-Par. Lecture notes in computer science, vol. 1900. Springer, Berlin (2000)"},{"key":"667_CR45","doi-asserted-by":"crossref","unstructured":"Tournavitis, G., Franke, B.: Semi-automatic extraction and exploitation of hierarchical pipeline parallelism using profiling information. In: PACT, ACM, pp. 377\u2013388 (2010)","DOI":"10.1145\/1854273.1854321"},{"issue":"1","key":"667_CR46","first-page":"2:1","volume":"11","author":"Z Wang","year":"2014","unstructured":"Wang, Z., Tournavitis, G., Franke, B., O\u2019Boyle, M.F.P.: Integrating profile-driven parallelism detection and machine-learning-based mapping. TACO 11(1), 2:1\u20132:26 (2014)","journal-title":"TACO"}],"container-title":["International Journal of Parallel Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/s10766-020-00667-x.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/article\/10.1007\/s10766-020-00667-x\/fulltext.html","content-type":"text\/html","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/s10766-020-00667-x.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2021,7,9]],"date-time":"2021-07-09T23:52:55Z","timestamp":1625874775000},"score":1,"resource":{"primary":{"URL":"https:\/\/link.springer.com\/10.1007\/s10766-020-00667-x"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2020,7,10]]},"references-count":46,"journal-issue":{"issue":"4","published-print":{"date-parts":[[2020,8]]}},"alternative-id":["667"],"URL":"https:\/\/doi.org\/10.1007\/s10766-020-00667-x","relation":{},"ISSN":["0885-7458","1573-7640"],"issn-type":[{"type":"print","value":"0885-7458"},{"type":"electronic","value":"1573-7640"}],"subject":[],"published":{"date-parts":[[2020,7,10]]},"assertion":[{"value":"16 October 2019","order":1,"name":"received","label":"Received","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"13 June 2020","order":2,"name":"accepted","label":"Accepted","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"10 July 2020","order":3,"name":"first_online","label":"First Online","group":{"name":"ArticleHistory","label":"Article History"}}]}}