An Automatic Transformer from Sequential to Parallel Java Code

Sequential programs can benefit from parallel execution to improve their performance. When developing a parallel application, several techniques are employed to achieve the desired behavior: identifying parts that can run in parallel, synchronizing access to shared data, tuning performance, etc. Adm...

Full description

Bibliographic Details
Main Authors: Alessandro Midolo, Emiliano Tramontana
Format: Article
Language:English
Published: MDPI AG 2023-09-01
Series:Future Internet
Subjects:
Online Access:https://www.mdpi.com/1999-5903/15/9/306
_version_ 1797579960798412800
author Alessandro Midolo
Emiliano Tramontana
author_facet Alessandro Midolo
Emiliano Tramontana
author_sort Alessandro Midolo
collection DOAJ
description Sequential programs can benefit from parallel execution to improve their performance. When developing a parallel application, several techniques are employed to achieve the desired behavior: identifying parts that can run in parallel, synchronizing access to shared data, tuning performance, etc. Admittedly, manually transforming a sequential application to make it parallel can be tedious due to the large number of lines of code to inspect, the possibility of errors arising from inaccurate data dependence analysis leading to unpredictable behavior, and inefficiencies when the workload between parallel threads is unbalanced. This paper proposes an automatic approach that analyzes Java source code to identify method calls that are suitable for parallel execution and transforms them so that they run in another thread. The approach is based on data dependence and control dependence analyses to determine the execution flow and data accessed. Based on the proposed method, a tool has been developed to enhance applications by incorporating parallelism, i.e., transforming suitable method calls to execute on parallel threads, and synchronizing data access where needed. The developed tool has been extensively tested to verify the accuracy of its analysis in finding parallel execution opportunities, the correctness of the source code alterations, and the resultant performance gain.
first_indexed 2024-03-10T22:44:28Z
format Article
id doaj.art-8a29fc16fc8e4692b19448bd3395a73a
institution Directory Open Access Journal
issn 1999-5903
language English
last_indexed 2024-03-10T22:44:28Z
publishDate 2023-09-01
publisher MDPI AG
record_format Article
series Future Internet
spelling doaj.art-8a29fc16fc8e4692b19448bd3395a73a2023-11-19T10:49:22ZengMDPI AGFuture Internet1999-59032023-09-0115930610.3390/fi15090306An Automatic Transformer from Sequential to Parallel Java CodeAlessandro Midolo0Emiliano Tramontana1Dipartimento di Matematica e Informatica, University of Catania, 95125 Catania, ItalyDipartimento di Matematica e Informatica, University of Catania, 95125 Catania, ItalySequential programs can benefit from parallel execution to improve their performance. When developing a parallel application, several techniques are employed to achieve the desired behavior: identifying parts that can run in parallel, synchronizing access to shared data, tuning performance, etc. Admittedly, manually transforming a sequential application to make it parallel can be tedious due to the large number of lines of code to inspect, the possibility of errors arising from inaccurate data dependence analysis leading to unpredictable behavior, and inefficiencies when the workload between parallel threads is unbalanced. This paper proposes an automatic approach that analyzes Java source code to identify method calls that are suitable for parallel execution and transforms them so that they run in another thread. The approach is based on data dependence and control dependence analyses to determine the execution flow and data accessed. Based on the proposed method, a tool has been developed to enhance applications by incorporating parallelism, i.e., transforming suitable method calls to execute on parallel threads, and synchronizing data access where needed. The developed tool has been extensively tested to verify the accuracy of its analysis in finding parallel execution opportunities, the correctness of the source code alterations, and the resultant performance gain.https://www.mdpi.com/1999-5903/15/9/306software architecturedesigncode generationparallelismrefactoring
spellingShingle Alessandro Midolo
Emiliano Tramontana
An Automatic Transformer from Sequential to Parallel Java Code
Future Internet
software architecture
design
code generation
parallelism
refactoring
title An Automatic Transformer from Sequential to Parallel Java Code
title_full An Automatic Transformer from Sequential to Parallel Java Code
title_fullStr An Automatic Transformer from Sequential to Parallel Java Code
title_full_unstemmed An Automatic Transformer from Sequential to Parallel Java Code
title_short An Automatic Transformer from Sequential to Parallel Java Code
title_sort automatic transformer from sequential to parallel java code
topic software architecture
design
code generation
parallelism
refactoring
url https://www.mdpi.com/1999-5903/15/9/306
work_keys_str_mv AT alessandromidolo anautomatictransformerfromsequentialtoparalleljavacode
AT emilianotramontana anautomatictransformerfromsequentialtoparalleljavacode
AT alessandromidolo automatictransformerfromsequentialtoparalleljavacode
AT emilianotramontana automatictransformerfromsequentialtoparalleljavacode