Searcharxiv⌕ Search

arXiv subjects

Henrique C. T. Santos

Publications and source records attributed to Henrique C. T. Santos.

5 recordsLinked to original sources

Automatic Identification of Parallelizable Loops Using Transformer-Based Source Code Representations

Automatic parallelization remains a challenging problem in software engineering, particularly in identifying code regions where loops can be safely executed in parallel on modern multi-core architectures. Traditional static analysis techniques, such as dependence analysis and polyhedral models, often struggle with irregular or dynamically structured code. In this work, we propose a Transformer-based approach to classify the parallelization potential of source code, focusing on distinguishing independent (parallelizable) loops from undefined ones. We adopt DistilBERT to process source code sequences using subword tokenization, enabling the model to capture contextual syntactic and semantic patterns without handcrafted features. The approach is evaluated on a balanced dataset combining synthetically generated loops and manually annotated real-world code, using 10-fold cross-validation and multiple performance metrics. Results show consistently high performance, with mean accuracy above 99\% and low false positive rates, demonstrating robustness and reliability. Compared to prior token-based methods, the proposed approach simplifies preprocessing while improving generalization and maintaining computational efficiency. These findings highlight the potential of lightweight Transformer models for practical identification of parallelization opportunities at the loop level.

cs.SE↗

Discovering Software Parallelization Points Using Deep Neural Networks

This study proposes a deep learning-based approach for discovering loops in programming code according to their potential for parallelization. Two genetic algorithm-based code generators were developed to produce two distinct types of code: (i) independent loops, which are parallelizable, and (ii) ambiguous loops, whose dependencies are unclear, making them impossible to define if the loop is parallelizable or not. The generated code snippets were tokenized and preprocessed to ensure a robust dataset. Two deep learning models - a Deep Neural Network (DNN) and a Convolutional Neural Network (CNN) - were implemented to perform the classification. Based on 30 independent runs, a robust statistical analysis was employed to verify the expected performance of both models, DNN and CNN. The CNN showed a slightly higher mean performance, but the two models had a similar variability. Experiments with varying dataset sizes highlighted the importance of data diversity for model performance. These results demonstrate the feasibility of using deep learning to automate the identification of parallelizable structures in code, offering a promising tool for software optimization and performance improvement.

cs.LG↗

Multi-self-loop Lackadaisical Quantum Walk with Partial Phase Inversion

The lackadaisical quantum walk, a quantum analog of the lazy random walk, is obtained by adding a weighted self-loop transition to each state. Impacts of the self-loop weight $l$ on the final success probability in finding a solution make it a key parameter for the search process. The number of self-loops can also be critical for search tasks. This article proposes the quantum search algorithm Multi-self-loop Lackadaisical Quantum Walk with Partial Phase Inversion, which can be defined as a lackadaisical quantum walk with multiple self-loops, where the target state phase is partially inverted. In the proposed algorithm, each vertex has $m$ self-loops, with weights $l' = l/m$, where $l$ is a real parameter. The phase inversion is based on Grover's algorithm and acts partially, modifying the phase of a given quantity $s < m$ of self-loops. On a hypercube structure, we analyzed the situation where $1 \leqslant m \leqslant 30$. We also propose two new weight values based on two ideal weights $l$ used in the literature. We investigated the effects of partial phase inversion in the search for $1$ to $12$ marked vertices. As a result, this proposal improved the maximum success probabilities to values close to $1$ in $O (\sqrt{(n+m)\cdot N})$, where $n$ is the hypercube degree. This article contributes with a new perspective on the use of quantum interferences in constructing new quantum search algorithms.

quant-ph↗

Search for Multiple Adjacent Marked Vertices on the Hypercube by a Quantum Walk with Partial Phase Inversion

In this paper, we analyze the application of the Multi-self-loop Lackadaisical Quantum Walk on the hypercube that uses partial phase inversion to search for multiple adjacent marked vertices. We evaluate the influence of the relative position of non-adjacent marked vertices. The use of self-loops and the composition of their weights are an essential part of the construction process of new quantum search algorithms based on lackadaisical quantum walks, however, other aspects have been considered, such as, for example, the type of marked vertices. Part of the energy of a quantum system is retained in states adjacent to the target state. This behavior causes the probability amplitudes of these states to be amplified to values equivalent to those of the target state, reducing their chances of being observed. Here we show experimentally that with the use of partial phase inversion, it is possible to amplify their probability amplitudes to values close to 1 even in scenarios with adjacent marked vertices. We also show that the relative position of the non-adjacent marked vertices did not significantly influence the results. The lackadaisical quantum walk generalization to only a single self-loop and the ideal composition of a weight value was sufficient to obtain advances to quantum search algorithms based on quantum walks. However, the results show that many other aspects need to be taken into account for the construction of new quantum algorithms. It was possible to add gains in the maximum probabilities of success compared to other results found in the literature. In one of the most significant cases, the probability of success increased from $p \approx 0.38$ to $p > 0.99$. Therefore, the use of partial phase inversion brings new contributions to the development of new quantum search algorithms based on quantum walks and the use of multiple self-loops.

quant-ph↗

PESC -- Parallel Experiment for Sequential Code

The need for computational resources grows as computational algorithms gain popularity in different sectors of the scientific community. This search has stimulated the development of several cloud platforms that abstract the complexity of computational infrastructure. Unfortunately, the cost of accessing these resources could leave out various studies that could be carried by a simpler infrastructure. In this article, we present a platform for distributing computer simulations on resources available on a network using containers that abstracts the complexity needed to configure these execution environments and allows any user can benefit from this infrastructure. Simulations could be developed in any programming language (like Python, Java, C, R) and with specific execution needs within reach of the scientific community in a general way. We will present results obtained in running simulations that required more than 1000 runs with different initial parameters and various other experiments that benefited from using the platform.

cs.DC↗