Universidade do MinhoO repositório captura, armazena, indexa, preserva e distribui publicações científicas da universidade em formato digital.http://repositorium.sdum.uminho.pt:802024-03-29T09:45:44Z2024-03-29T09:45:44ZEnergy efficiency of Python machine learning frameworksAjel, SalwaRibeiro, FranciscoEjbali, RidhaSaraiva, Joãohttps://hdl.handle.net/1822/902932024-03-28T20:00:28Z2024-03-28T20:00:26ZTítulo: Energy efficiency of Python machine learning frameworks
Autor: Ajel, Salwa; Ribeiro, Francisco; Ejbali, Ridha; Saraiva, João
Resumo: Although machine learning (ML) is a field that has been the subject of research for decades, a large number of applications with high computational power have recently emerged. Usually, we only focus on solving machine learning problems without considering how much energy has been consumed by the different frameworks used for such applications. This study aims to provide a comparison among four widely used frameworks such as Tensorflow, Keras, Pytorch, and Scikit-learn in terms of many aspects, including energy efficiency, memory usage, execution time, and accuracy. We monitor the performance of such frameworks using different well-known machine learning benchmark problems. Our results show interesting findings, such as slower and faster frameworks consuming less or more energy, higher or lower memory usage, etc. We show how to use our results to provide machine learning developers with information to decide which framework to use for their applications when energy efficiency is a concern.
<b>Tipo</b>: conferencePaper2024-03-28T20:00:26ZFraming program repair as code completionRibeiro, FranciscoAbreu, RuiSaraiva, Joãohttps://hdl.handle.net/1822/902922024-03-28T20:43:48Z2024-03-28T19:56:28ZTítulo: Framing program repair as code completion
Autor: Ribeiro, Francisco; Abreu, Rui; Saraiva, João
Resumo: Many techniques have contributed to the advancement of automated program repair, such as: generate and validate approaches, constraint-based solvers and even neural machine translation. Simultaneously, artificial intelligence has allowed the creation of general-purpose pre-trained models that support several downstream tasks. In this paper, we describe a technique that takes advantage of a generative model - CodeGPT - to automatically repair buggy programs by making use of its code completion capabilities. We also elaborate on where to perform code completion in a buggy line and how we circumvent the open-ended nature of code generation to appropriately fit the new code in the original program. Furthermore, we validate our approach on the ManySStuBs4j dataset containing real-world open-source projects and show that our tool is able to fix 1739 programs out of 6415 - a 27% repair rate. The repaired programs range from single-line changes to multiple line modifications. In fact, our technique is able to fix programs which were missing relatively complex expressions prior to being analyzed. In the end, we present case studies that showcase different scenarios our technique was able to handle.
<b>Tipo</b>: conferencePaper2024-03-28T19:56:28ZWebAssembly versus JavaScript: Energy and runtime performanceMacedo, João deAbreu, RuiPereira, RuiSaraiva, Joãohttps://hdl.handle.net/1822/902912024-03-28T20:44:01Z2024-03-28T19:51:50ZTítulo: WebAssembly versus JavaScript: Energy and runtime performance
Autor: Macedo, João de; Abreu, Rui; Pereira, Rui; Saraiva, João
Resumo: The worldwide Web has dramatically evolved in recent years. Web pages are dynamic, expressed by programs written in common programming languages given rise to sophisticated Web applications. Thus, Web browsers are almost operating systems, having to interpret/compile such programs and execute them. Although JavaScript is widely used to express dynamic Web pages, it has several shortcomings and performance inefficiencies. To overcome such limitations, major IT powerhouses are developing a new portable and size/load efficient language: WebAssembly.In this paper, we conduct the first systematic study on the energy and run-time performance of WebAssembly and JavaScript on the Web. We used micro-benchmarks and also real applications in order to have more realistic results. Preliminary results show that WebAssembly, while still in its infancy, is starting to already outperform JavaScript, with much more room to grow. A statistical analysis indicates that WebAssembly produces significant performance differences compared to JavaScript. However, these differences differ between micro-benchmarks and real-world benchmarks. Our results also show that WebAssembly improved energy efficiency by 30%, on average, and showed how different WebAssembly behaviour is among three popular Web Browsers: Google Chrome, Microsoft Edge, and Mozilla Firefox. Our findings indicate that WebAssembly is faster than JavaScript and even more energy-efficient. Additionally, our benchmarking framework is also available to allow further research and replication.
<b>Tipo</b>: conferencePaper2024-03-28T19:51:50ZResidents’ attitudes toward place marketing and pro-environmental behaviors at UNESCO World Heritage SitesFerreira, SandraSousa, Bruno BarbosaCarvalho, AidaBroega, A. C.https://hdl.handle.net/1822/902902024-03-28T20:44:03ZTítulo: Residents’ attitudes toward place marketing and pro-environmental behaviors at UNESCO World Heritage Sites
Autor: Ferreira, Sandra; Sousa, Bruno Barbosa; Carvalho, Aida; Broega, A. C.
Resumo: In recent years, discussion on residents’ place attachment connection with World Heritage Sites (WHSs) has started to increase in tourism research. Besides tourists’ recognition and attraction of UNESCO World Heritage Sites, local people are important stakeholders that generate self-attachment to the place of living, thereby greater tendency to engage in pro-environmental behavior. In this vein, understanding place attachment is essential in planning for sustainable tourism development to conserve the physical environments as well as the meanings of places with cultural significance. However, a small number of studies have been discussing the important phenomenon of local residents’ place attachment in relation to pro-environmental attitudes and behaviors in cultural heritage tourism contexts. Therefore, this study discusses residents’ place attachment and pro-environmental behaviors toward specific UNESCO WHSs in Portugal. It develops and proposes a conceptual framework that integrates residents’ place attachment to WHS and their general and site-specific sustainable heritage behavior and presents their interrelationships in the form of hypotheses. Final considerations and future research paths are discussed.
<b>Tipo</b>: conferencePaperZipping strategies and attribute grammarsMacedo, José NunoViera, MarcosSaraiva, Joãohttps://hdl.handle.net/1822/902892024-03-28T19:29:00Z2024-03-28T19:26:53ZTítulo: Zipping strategies and attribute grammars
Autor: Macedo, José Nuno; Viera, Marcos; Saraiva, João
Resumo: Strategic term rewriting and attribute grammars are two powerful programming techniques widely used in language engineering. The former relies on strategies (recursion schemes) to apply term rewrite rules in defining transformations, while the latter is suitable for expressing context-dependent language processing algorithms. Each of these techniques, however, is usually implemented by its own powerful and large processor system. As a result, it makes such systems harder to extend and to combine. We present the embedding of both strategic tree rewriting and attribute grammars in a zipper-based, purely functional setting. The embedding of the two techniques in the same setting has several advantages: First, we easily combine/zip attribute grammars and strategies, thus providing language engineers the best of the two worlds. Second, the combined embedding is easier to maintain and extend since it is written in a concise and uniform setting. We show the expressive power of our library in optimizing Haskell let expressions, expressing several Haskell refactorings and solving several language processing tasks for an Oberon-0 compiler.
<b>Tipo</b>: conferencePaper2024-03-28T19:26:53Z