English  |  正體中文  |  简体中文  |  全文笔数/总笔数 : 54134/88902 (61%)
造访人次 : 10552592      在线人数 : 24
RC Version 7.0 © Powered By DSPACE, MIT. Enhanced by NTU Library & TKU Library IR team.
搜寻范围 查询小技巧:
  • 您可在西文检索词汇前后加上"双引号",以获取较精准的检索结果
  • 若欲以作者姓名搜寻,建议至进阶搜寻限定作者字段,可获得较完整数据
  • 进阶搜寻


    jsp.display-item.identifier=請使用永久網址來引用或連結此文件: http://tkuir.lib.tku.edu.tw:8080/dspace/handle/987654321/68639


    题名: Java的語法樹直譯器
    其它题名: A Syntax-Tree-Based Interpreter for Java
    作者: 周敬斐;郭肇安;廖賀田
    贡献者: 淡江大學資訊管理學系
    关键词: Java;語法樹;直譯器;Java;Syntax Tree;Interpreter
    日期: 2008-06
    上传时间: 2011-10-23 13:21:12 (UTC+8)
    出版者: 淡江大學資訊管理研究所
    摘要: The Java programming language, with advantages such as object-orientation,
    portability and multi-threading, is one of the most popular programming languages. In
    current time, the Java source code has to be compiled into an intermediate language, the
    bytecode, before it can be interpreted by the Java virtual machine. However, there is no
    intrinsic relationship between bytecode and its source code, and there is no special benefit
    in interpreting the bytecode either.
    In this paper, we recommend adoption of the syntax tree to be the intermediate
    language for Java, and we propose techniques for interpreting it. The syntax tree is an
    essential data structure when parsing the source code. Furthermore, it bears strongest
    relation with the source code. By appending suitable methods into various types of nodes in
    the syntax tree, the interpreter can be implemented through recursive call and dynamic
    binding. We also utilize the exception mechanism to quit from the control flow of deep
    method calls. In order to cooperate with the popular bytecode, we propose a bridge
    mechanism to interconnect the interpretations of both bytecode and the syntax tree.
    It is very easy to build an interpreter based on the syntax tree. Our syntax-tree-based
    interpreter for Java has been successfully implemented, and it works well on interpreting
    practical Java software. Since the correspondence between the syntax tree and the source
    code is direct and natural, it will be easier to implement a debugging mechanism in the
    future. Furthermore, we can equip graphical rendering functions into the syntax tree, so that
    the interpreter can provide instinctive assistance in teaching the Java programming
    language and data structures.
    Java 程式語言具有物件導向(object-oriented)、可攜(portable)與多執行緒
    (multi-threading)等優點,是當今最風行的程式語言之一。目前所有的 Java 原始檔都必
    須被編譯成稱為位元組碼(bytecode)的中間語言(intermediate language),再交由 Java 虛
    擬機(java virtual machine)進行直譯。但位元組碼與 Java 的原始碼之間並沒有本質上的
    關聯,位元組碼在直譯上也沒有特別便利之處。
    本論文主張以 Java 語法樹(syntax tree)當成中間語言,並提出對它進行直譯
    (interpreting)的技術。語法樹是製作剖析器(parser)時就必須用到的資料結構,它在先天
    上就和原始碼有最密切的關連。我們直接在語法樹的各種節點上配置適當的方法
    (method),運用遞迴呼叫(recursive call)與動態繫結(dynamic binding)來製作直譯器。我
    們也利用例外機制(exception mechanism)來脫離進入多層呼叫後的控制流程(control
    flow)。為配合目前被廣泛使用的位元組碼,我們還提出語法樹與位元組碼之間的銜接
    機制,讓這兩種不同的直譯機制可以互相呼叫。
    本論文所提出的直譯機制非常容易製作,是開發直譯器的優良途徑。我們所實作
    的直譯器在大型程式上的真實運作已有良好的表現。由於語法樹與原始程式之間的對
    應既直接又自然,未來在製作除錯(debug)機制時也會比較容易。此外,還可以進一步
    在語法樹上配置圖形展示的能力,讓直譯器在程式語言與資料結構的教學上對學生提
    供直覺性的幫助。
    關聯: 資訊管理展望 10(1), p.111-135
    DOI: 10.29715/JIMCSA.200806.0006
    显示于类别:[資訊管理學系暨研究所] 期刊論文

    文件中的档案:

    档案 描述 大小格式浏览次数
    index.html0KbHTML7检视/开启
    Java的語法樹直譯器.pdf1772KbAdobe PDF0检视/开启

    在機構典藏中所有的数据项都受到原著作权保护.

    TAIR相关文章

    DSpace Software Copyright © 2002-2004  MIT &  Hewlett-Packard  /   Enhanced by   NTU Library & TKU Library IR teams. Copyright ©   - 回馈