Object Specialization to Partially Reduce Polymorphism of Attributes
Open Access
- 8 December 2023
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 106-115
Abstract
In object-oriented programming languages, objects with polymorphic attributes can negatively impact performance and hinder static analysis. These attributes require dynamic dispatch, which is slower than static binding, and complicate the analysis process. We propose a novel algorithm for object specialization that addresses this issue by replacing polymorphic attributes with monomorphic ones, resulting in improved performance and simplified static analysis. Our algorithm is a new approach compared to existing function specialization algorithms. We provide a proof of the algorithm’s soundness and correctness, and present an implementation of the algorithm as a software tool. Empirical evaluation shows that our approach achieves significant improvements in performance and simplifies the static analysis process. Our algorithm can be applied to a variety of object-oriented languages such as Java and Python.Keywords
This publication has 16 references indexed in Scilit:
- Dynamic function specialization2017
- Challenges for Static Analysis of Java Reflection - Literature Review and Empirical Study2017
- Object-oriented analysis and design with applications, third editionACM SIGSOFT Software Engineering Notes, 2008
- Fundamental Concepts in Programming LanguagesHigher-Order and Symbolic Computation, 2000
- Polymorphic versus Monomorphic Flow-Insensitive Points-To Analysis for C2000
- Fast static analysis of C++ virtual function calls1996
- Signatures: A language extension for improving type abstraction and subtype polymorphism in C++Software: Practice and Experience, 1995
- Type inference with polymorphic recursionACM Transactions on Programming Languages and Systems, 1993
- Type reconstruction in the presence of polymorphic recursionACM Transactions on Programming Languages and Systems, 1993
- Polymorphism, persistence and software re-use in a strongly typed object-oriented environmentSoftware Engineering Journal, 1987