RUS  ENG
Full version
JOURNALS // Program Systems: Theory and Applications // Archive

Program Systems: Theory and Applications, 2020 Volume 11, Issue 1, Pages 3–29 (Mi ps360)

This article is cited in 3 papers

Hardware and Software for Supercomputers

The JaSpe specializer: an algorithm of intra-procedural binding time analysis for programs in Java language subset

I. A. Adamovicha, Yu. A. Klimovb

a Ailamazyan Program Systems Institute of Russian Academy of Sciences
b Keldysh Institute of Applied Mathematics of RAS

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.

UDC: 519.681.3
BBK: Э973.2

MSC: Primary 97P30; Secondary 97P20, 97P40

Received: 17.01.2020
Accepted: 20.02.2020

DOI: 10.25209/2079-3316-2020-11-1-3-29



© Steklov Math. Inst. of RAS, 2024