Intelligent Run-Time Reliability Engineering for Python Software
Salvato in:
| Pubblicato in: | PQDT - Global (2024) |
|---|---|
| Autore principale: | |
| Pubblicazione: |
ProQuest Dissertations & Theses
|
| Soggetti: | |
| Accesso online: | Citation/Abstract Full Text - PDF |
| Tags: |
Nessun Tag, puoi essere il primo ad aggiungerne!!
|
| Abstract: | Python has emerged as a widely favored dynamic programming language, as demonstrated by its rank as the second most utilized language on GitHub since 2019. Developers working with Python derive substantial advantages from its dynamic features. Among these, the dynamic type system and the dynamic run-time environment stand out as particularly significant. The dynamic type system eliminates the need for explicit type declarations, thereby simplifying the development of generic functions. The dynamic run-time environment removes the necessity for compilation during the development phase, facilitating the integration of the latest third-party packages. These features collectively enhance fast prototyping capabilities, reducing the effort required to develop Python soft- ware. This streamlined development process significantly contributes to Python's popularity in software engineering.However, the flexibility afforded by Python's dynamic features is not without drawbacks, as it may compromise the reliability of the software. The absence of strict requirements like type declarations and compilation increases the susceptibility of Python software to reliability issues such as type errors and run-time environment conflicts. In this thesis, we propose methods to detect and mitigate the reliability issues arising from the dynamic type system and the dynamic runtime environment inherent to Python. Our approach aims to bolster the reliability of Python software, addressing key vulnerabilities introduced by its dynamic natureFirstly, we introduce a hybrid type inference method termed HITYPER which synergizes static type inference with neural predictions. Type inference statically assigns types to variables in the code, enabling the detection of type errors by checking potential type conflicts via type checking tools. Our approach merges the precision of static type inference with the extensive coverage and effectiveness of neural predictions. To facilitate this integration, we document type dependencies among variables within each function and represent these relationships through Type Dependency Graphs (TDGs). Utilizing TDGs allows for the seamless incorporation of type inference rules at the nodes to perform static inference, alongside type rejection rules to filter out incorrect neural pro dictions. HITYPER iteratively executes static inference and neural prediction until the TDG is fully resolved, thereby determining the types for all variables in the code. This method enhances the type reliability of Python software by preventing potential type errors.Secondly, we propose a generative type inference approach named TYPEGEN to further improve the performance of HITYPER. Recognizing that the performance upper bound of HITYPER is contingent upon the performance of the underlying deep learning models, we design a more advanced generative approach based on powerful large language models. This approach generates chain-of- thought (COT) prompts by converting the procedural steps of static type analysis into structured prompts derived from Type Dependency Graphs (TDGs). This format allows the language models to internalize the methodologies employed by static analysis for type inference. TYPEGEN enhances this learning process by incorporating code snippets and type hints alongside the COT prompts, cresting comprehensive example prompts based on human annotations. These example prompts facilitate in-context learning, enabling the language models to generate similar COT prompts that include the final type predictions. This innovative approach not only improves the performance of neural type predictions but also expands the capabilities of HITYPER in handling complex type inference scenar-105, |
|---|---|
| ISBN: | 9798304977050 |
| Fonte: | ProQuest Dissertations & Theses Global |