Abstract:
A binding-time analysis in partial evaluation aimed at optimizing
programs divides software constructs into static and dynamic. A specializer
executes static constructs, and transfer dynamic ones into the resulting code.
Currently, partial evaluation is mainly used for the non-trivial compilation of
programs without a compiler, with only an interpreter and a specializer. As
previous studies have shown, the effectiveness of such an application of the partial
evaluation method significantly depends on the quality of the program annotation
obtained by performing the binding-time analysis.
The paper is devoted to the features of the binding-time analysis algorithm.
The features that arose during algorithm implementation for the widespread
object-oriented Java language within the JaSpe specializer developed by the
authors of this publication. The paper describes the basic concepts of the
binding-time analysis implemented and the intra-procedural version of the
algorithm. The article also discusses the algorithm details related to the program
constructs that use reference data types.
Apart from previous counterparts for object-oriented languages, this
algorithm non-trivially handles some language constructs: branches (if, switch),
loops (for, while, do), and block instructions that contain a sequence of other
instructions. Unlike the similar algorithms that work with imperative and
functional languages, the considered algorithm uses the BT-objects, which allow
specializer to obtain more accurate annotation (with a higher fraction of static
constructs) when processing object-oriented programs. Another feature of this
algorithm is the focus on interactivity and readability of results.
Key words and phrases:
modern programming languages, static program analysis, program transformation, metaprogramming, mixed computation, interactive specialization.
Citation:
I. A. Adamovich, Yu. A. Klimov, “The JaSpe specializer: an algorithm of intra-procedural binding time analysis for programs in Java language subset”, Program Systems: Theory and Applications, 11:1 (2020), 3–29
\Bibitem{AdaKli20}
\by I.~A.~Adamovich, Yu.~A.~Klimov
\paper The JaSpe specializer: an algorithm of intra-procedural binding time analysis for programs in Java language subset
\jour Program Systems: Theory and Applications
\yr 2020
\vol 11
\issue 1
\pages 3--29
\mathnet{http://mi.mathnet.ru/ps360}
\crossref{https://doi.org/10.25209/2079-3316-2020-11-1-3-29}
Linking options:
https://www.mathnet.ru/eng/ps360
https://www.mathnet.ru/eng/ps/v11/i1/p3
This publication is cited in the following 3 articles:
I. A. Adamovich, Yu. A. Klimov, “Issledovanie effektivnosti spetsializatsii interpretatorov na ob'ektno-orientirovannom yazyke Java metodami chastichnykh vychislenii s BT-ob'ektami”, Programmnye sistemy: teoriya i prilozheniya, 13:4 (2022), 111–137
Igor Alexeevich Adamovich, Yuri Andreevich Klimov, Proceedings of 24th Scientific Conference “Scientific Services & Internet – 2022”, Proceedings of 24th Scientific Conference “Scientific Services & Internet – 2022”, 2022, 3
I. A. Adamovich, “Spetsializator JaSpe: BT-ob'ekty i mezhprotsedurnyi aspekt algoritma analiza vremen svyazyvaniya”, Programmnye sistemy: teoriya i prilozheniya, 12:4 (2021), 3–32