引用本文:廖湖声,童兆丰,王众.面向对象程序设计语言的绑定时间分析技术.软件学报,2003,14(3):415-421
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览 4677次   下载 6373 本文二维码信息
码上扫一扫!
分享到: 微信 更多
面向对象程序设计语言的绑定时间分析技术
廖湖声1, 童兆丰1, 王众1
北京工业大学计算机学院,北京,100022
摘要:
为了实现面向对象语言的部分求值,提出了一种绑定时间分析技术.该技术通过针对引用类型变量和指针变量的上下文敏感分析,能够比较精确地分析面向对象语言中诸如对象元素、数组元素等复杂数据结构元素的绑定时间,进而扩大了部分求值的作用范围.这种方法采用两层BTA环境来保存静态变量和局部变量的BTA状态,设置一种专用句柄来表示不同程序点创建的对象,进而采用这种句柄的集合表示引用类型变量的BTA状态.在为面向对象语言程序标注绑定时间信息的过程中,采用一个正向分析和一个反向分析过程,借助于BTA环境来跟踪和设定各种变量、对象和引用变量的绑定时间.该技术已经用于实现Java程序的绑定时间分析,能够有效地分析大多数单线程的Java程序,为实现高性能Java程序部分求值提供了必要的手段.
关键词:  绑定时间分析  部分求值  面向对象程序设计语言  Java语言
DOI:
分类号:
基金项目:Supported by the National Natural Science Foundation of China under Grant No.60173013 (国家自然科学基金); the Natural Science Foundation of Beijing City of China under Grant No.4982002 (北京市自然科学基金); the Assisting Project of Ministry of Education of China for Backbone Teachers of University and College(国家教育部高等学校骨干教师资助计划)
A Technology of Binding Time Analysis for Object-Oriented Programming Languages
LIAO Hu-Sheng,TONG Zhao-Feng,WANG Zhong
Abstract:
A technology of binding time analysis for implementing partial evaluation of object-oriented programming languages is proposed in this paper. By tracing context-sensitivity of reference variables and pointer variables, the new approach can deal with elements of partly static data structure, such as attributes of each object and elements of each array. The new approach uses a two-level BTA environment to hold BTA states for static variables and local variables. The objects created at different program points are represented by a kind of specific handle. The BTA state of a reference variable is represented by a set of such handles. The algorithm of a forward analysis and backward analysis are presented. They are used to annotate source program, with BTA environment to trace binding time of various kind of variables including identifier of array, object and reference. The binding time analysis has been implemented for Java. It is able to analyse most single thread Java programs and support partial evaluation for Java with higher performance.
Key words:  binding time analysis  partial evaluation  object-oriented programming language  Java language