dynamic programming languages, such as Python, are widely used for their flexibility and support for rapid development. However, the absence of explicit parameter type declarations poses significant challenges in gene...
详细信息
dynamic programming languages, such as Python, are widely used for their flexibility and support for rapid development. However, the absence of explicit parameter type declarations poses significant challenges in generating automated test cases. This often leads to random assignment of parameter types, increasing the search space and reducing testing efficiency. Current evolutionary algorithms, which rely heavily on random mutations, struggle to handle specific data types and frequently fall into local optima, making it difficult to generate high-quality test cases. Moreover, the resulting test suites often contain errors, preventing immediate usage in real-world applications. To address these challenges, this paper proposes the use of large language models to enhance test case generation for dynamic programming languages. Our method involves three key steps: analyzing parameter types to narrow the search space, introducing meaningful data during mutations to increase test case relevance, and using large language models to automatically repair errors in the generated test suites. Experimental results demonstrate a 16% improvement in test coverage, faster evolutionary cycles, and an increase in the number of executable test suites. These findings highlight the potential of large language models in improving both the efficiency and reliability of test case generation for dynamic programming languages.
Django on Python does well in agile web development. Python is dynamic programming language, as is known, its runtime efficiency is low, the question is how it will affect Django's efficiency. This Paper answered ...
详细信息
ISBN:
(纸本)9780769551340
Django on Python does well in agile web development. Python is dynamic programming language, as is known, its runtime efficiency is low, the question is how it will affect Django's efficiency. This Paper answered the question from the angle of memory optimization, by improving the efficiency of Python in memory use;we will see how it will affect django. Python manages non-container objects with the technology of memory pool, after a consequence of allocate and free operations, it will produce memory fragment, and the garbage collection module can hardly handle it. This paper proposed a new non-container object management greedy algorithm;it can minimize the probability of generating fragments, thus the garbage collection module can collect garbage non-container objects in time. We conduct our experiment on the benchmark of an open-source project named Unladen-Swallow. When Django renders a template, it will save about 10% memory, with almost the same time consuming.
Python is a popular dynamic programming language. In recent years, many frameworks implemented in Python have been widely used for data science and web development. Similar to frameworks in other languages, the APIs p...
详细信息
ISBN:
(纸本)9781728151434
Python is a popular dynamic programming language. In recent years, many frameworks implemented in Python have been widely used for data science and web development. Similar to frameworks in other languages, the APIs provided by Python frameworks often evolve, which would inevitably induce compatibility issues in client applications. While existing work has studied the evolution of frameworks in static programminglanguages such as Java, little is known on how Python framework APIs evolve and the characteristics of the compatibility issues induced by such evolution. To bridge this gap, we take a first look at the evolution of Python framework APIs and the resulting compatibility issues in client applications. We analyzed 288 releases of six popular Python frameworks from three different domains and 5,538 open-source projects built on these frameworks. We investigated the evolution patterns of Python framework APIs and found that they largely differ from those of Java framework APIs. We also investigated the compatibility issues in client applications and identified common strategies that developers adopt to fix these issues. Based on the empirical findings, we designed and implemented a tool, PYCOMPAT, to automatically detect compatibility issues caused by misusing evolved framework APIs in Python applications. Experiments on 10 real-world projects show that our tool can effectively detect compatibility issues of developers' concern.
Python is a popular programminglanguage whose performance is known to be uncompetitive in comparison to static languages such as C. Although significant efforts have already accelerated implementations of the languag...
详细信息
ISBN:
(纸本)9798400703966
Python is a popular programminglanguage whose performance is known to be uncompetitive in comparison to static languages such as C. Although significant efforts have already accelerated implementations of the language, more efficient ones are still required. The development of such optimized implementations is nevertheless hampered by its complex semantics and the lack of an official formal semantics. We address this issue by presenting an approach to define an executable semantics targeting the development of optimizing compilers. This executable semantics is written in a format that highlights type checks, primitive values boxing and unboxing, and function calls, which are all known sources of overhead. We also present semPy, a partial evaluator of our executable semantics that can be used to remove redundant operations when evaluating arithmetic operators. Finally, we present Zipi, a Python optimizing compiler prototype developed with the aid of semPy. On some tasks, Zipi displays performance competitive with that of state-of-the-art Python implementations.
Modern programs are increasingly multilanguage, to benefit from each programminglanguage's advantages and to reuse libraries. For example, developers may want to combine high-level Python code with low-level, per...
详细信息
ISBN:
(数字)9783030888060
ISBN:
(纸本)9783030888060;9783030888053
Modern programs are increasingly multilanguage, to benefit from each programminglanguage's advantages and to reuse libraries. For example, developers may want to combine high-level Python code with low-level, performance-oriented C code. In fact, one in five of the 200 most downloaded Python libraries available on GitHub contains C code. Static analyzers tend to focus on a single language and may use stubs to model the behavior of foreign function calls. However, stubs are costly to implement and undermine the soundness of analyzers. In this work, we design a static analyzer by abstract interpretation that can handle Python programs calling C extensions. It analyses directly and fully automatically both the Python and the C source codes. It reports runtime errors that may happen in Python, in C, and at the interface. We implemented our analysis in a modular fashion: it reuses off-the-shelf C and Python analyses written in the same analyzer. This approach allows sharing between abstract domains of different languages. Our analyzer can tackle tests of real-world libraries a few thousand lines of C and Python long in a few minutes.
Práce se zabývá návrhem a popisem dynamického reflektivního jazyka, založeného na prototypování. Nejprve jsou vysvětleny principy typické pro tuto skupinu jazyků a js...
详细信息
Práce se zabývá návrhem a popisem dynamického reflektivního jazyka, založeného na prototypování. Nejprve jsou vysvětleny principy typické pro tuto skupinu jazyků a jsou stručně popsáni známí představitelé. Dále je krátce pojednáno o jazycích pro matematické výpočty. Poté práce podrobně popisuje navržený programovací jazyk, jeho gramatiku a sémantiku. Jsou vysvětleny principy typové kontroly a dědičnosti. Je také ukázáno, jakým způsobem jsou implementovány základní řídící konstrukce známé z jiných jazyků. V další části je představen návrh virtuálního stroje pro vytvořený jazyk. Je vysvětlen použitý výpočetní model, organizace objektové paměti a interní reprezentace význačných struktur navrženého jazyka. Nakonec je rozebrána dynamická typová kontrola, překladač a způsob překladu typických konstrukcí do vnitřního kódu virtuálního stroje.
暂无评论