Skip navigation

DSpace

機構典藏 DSpace 系統致力於保存各式數位資料(如:文字、圖片、PDF)並使其易於取用。

點此認識 DSpace
DSpace logo
English
中文
  • 瀏覽論文
    • 校院系所
    • 出版年
    • 作者
    • 標題
    • 關鍵字
    • 指導教授
  • 搜尋 TDR
  • 授權 Q&A
    • 我的頁面
    • 接受 E-mail 通知
    • 編輯個人資料
  1. NTU Theses and Dissertations Repository
  2. 電機資訊學院
  3. 資訊工程學系
請用此 Handle URI 來引用此文件: http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/29213
完整後設資料紀錄
DC 欄位值語言
dc.contributor.advisor陳俊良(Chuen-Liang Chen)
dc.contributor.authorShang-Ru Guanen
dc.contributor.author關尚儒zh_TW
dc.date.accessioned2021-06-13T01:02:53Z-
dc.date.issued2007
dc.date.submitted2007-07-25
dc.identifier.citation1. Sun Microsystems, Inc. JSR 41: A Simple Assertion Facility. Expert Group: Borland Software Corporation, Gomes, Benedict, Hart-Davis, Damon, Lea, Doug.
2.M.D. Mcllroy, Mass Produced Software Components, in P. Naur and B. Randell (Eds), “Software Engineering, Report on a conference sponsored by the NATO Science Committee, Garmisch, Germany, 7th to 11th October 1968”,Scientific Affairs Division, NATO, Brussels, 1969, 138-155. http://cm.bell-labs.com/cm/cs/who/doug/components.txt
3.Sun Microsystems The Java Virtual Machine Specification.
http://www.Javasoft.com/docs/books/vmspec/html/VMSpecTOC.doc.html Generics in the Java Programming Language
4.Andrew Kennedy and Don Syme. Design and implementation of generics for the .Net Common Language Runtime.
In Cindy Norris and James B. Fenwick, Jr., editors, Proceedings of the ACM SIGPLAN 01 Conference on Programming Languages Design and Implementation (PLDI-01), pages 1-12, New York, New York, June 2001. ACM Press. Appears as volume 35, number 5 of SIGPLAN Notices.
5.Close, S., Using Java Generics.Java Developers Journal. Novermber 2003, 32-37, 60.
6.Stroustrup, B. Parameterized Types for C++, USENIX C++ Conference Proceedings, 1988.
7.Microsoft .Net FrameWork Developer Center. http://www.microsoft.com/taiwan/netframework/default.mspx
8.Cartwright, R. and Steele Jr., G.L. Compatible Genericity with Run-time Types for the Java Programming Language.
Proceedings of the OOPSLA 1998, 201-218.
9.Meyers, A.C., Bank, J.A. and Liskov, B. Parameterized Types for Java. Proceedings of the 24th ACM Symposium on Principles of Programming Languages (Pairs, France, January 1997), 132-145.
10.Odersky, M. and Wadler, P. Pizza into Java: Translating theory into practice. Proceedings of the 24th ACM Symposium on Principles of Programming Languages (Pairs, France, January 1997), 146-159.
11.Viroli, M. and Natali, A. Parametric Polymorphism in Java: an Approach to Translation Based on Reflective Features. Proceedings of OOPSLA 2000, 146-160.
12.Joseph A. Bank, Barbara Liskov, and Andrew C. Myers. Parameterized Types and Java.
13.Bracha, G. and the Expert Group. Java Specification Request 14: Add Generic Types to the JavaTM Programming Language. http://jcp.org/jsr/detail/14.prt
dc.identifier.urihttp://tdr.lib.ntu.edu.tw/jspui/handle/123456789/29213-
dc.description.abstractJava語言是個典型的物件導向程式語言。Java語言從出現時所帶來的可攜性、動態載入等等特性就受到強烈的注目。在其使用者與日俱增的同時,其語言特性也在以不影響其相容性、可攜性的原則之下快速的成長。Java語言在1.5(5.0)版開始正式在SDK中加入了泛型語法。其目的在於讓程式員在使用或是自定義容器類別時達到程式碼覆用以及編譯時期型別檢察等優點。
然而,Java語言在兼顧相容性和程式執行負擔的考量下使用了”一般化方法(Generalization)”來實現其泛型語法。此方法相較於C++語言使用的”特別化方法(Specialization)”,在執行時期無法達到真正的參數化多型。一個泛型類別的Java程式碼會產生一個泛型類別檔,而執行時期此類別之執行時期結構將會是唯一一份的存在,並不會因為其型別參數被給予引數的不同而產生多份結構。如此將會帶來許多限制以及危險性。
針對此現象,有相關研究提出了相當徹底的解決辦法,就是將Java的泛型語法實現方式想辦法改變為特別化方法,以避免掉所有一般化方法產生的問題。然而此解法必須修改Java虛擬機器才能實現,犧牲了相容性,也違背了泛型爪哇(Generic Java)的基本原則。這篇論文針對Java泛型語法所帶來的型別安全之缺陷,在不違背一般化方法實現以及泛型爪哇的原則之下,提出一個兼顧相容性的解法。藉由編譯器以及類別檔的修改。將執行時期泛型類別所產生的物件保有自己的型別引數(或稱之為泛型類別的Actual Type)資訊。藉此資訊可以提供Java反射機制的補完以及型別安全性的檢查
zh_TW
dc.description.abstractJava language is a typical object-oriented computer language. Programmers have gotten convenience in container declaration and usage since generics was supported by JDK5.0. As a result of using generalization to implement the generics support of new Java compiler. There could be difference between the source code and the real semantic in its class file. Java core reflection is also incomplete. The primal reason is that Java Virtual Machine doesn’t support parameterized type. In this thesis we bring up a light weight solution for parameterized type checking at runtime. It can also support runtime parameterized type reflection. This solution can work without modifying Java Virtual Machine.en
dc.description.provenanceMade available in DSpace on 2021-06-13T01:02:53Z (GMT). No. of bitstreams: 1
ntu-96-R94922088-1.pdf: 5328202 bytes, checksum: ab0c69f539b4c6009dcccb62d245548f (MD5)
Previous issue date: 2007
en
dc.description.tableofcontents中文摘要 i
ABSTRACT iii
致謝 v
Index vii
Index of Tables ix
Index of Figures xi
Chapter 1 - INTRODUCTION 1
1-1 The origin of generics 1
1-2 Concept of generics 1
1-3 Development of JAVA language 2
1-4 Motivation 4
1-5 Related Work 4
1-6 Thesis Organization 4
Chapter 2 - Parametric Polymorphism in Java 7
2-1 Scenario 7
2-2 Terminologies 8
2-3 Comparison with non-generic programs 9
2-4 Specialization and Generalization 12
2-4-1 Generalization 12
2-4-2 Specialization 13
2-5 Type Erasure 14
2-6 Delay Checking Problem 16
2-7 Goals 18
Chapter 3 - Strategy 19
3-1 Where to store actual type information 22
3-2 When to know actual type information 24
3-3 How to set actual type information 26
3-3-1 PTCM.setAT() 27
3-3-2 PTCM.getAT() 27
3-3-3 PTCM.CheckCast() 28
3-4 How to use actual type information 29
Chapter 4 - Implementation 31
4-1 Attachment of instance variable to a generated class 31
4-2 Attachment of instance variable to a class file in existence 32
4-3 Replacement of generic new expressions on syntax tree 33
4-4 Replacement of parameterized type casting on syntax tree 36
4-5 Throw of exception with the correct line number 37
Chapter 5 - Conclusion and Future Works 39
5-1 Conclusion 39
5-2 Future Works 43
Reference 45
dc.language.isoen
dc.title一個精確的Java語言型別檢查機制zh_TW
dc.titleA Precise Parameterized Pype Phecking Mechanism for Javaen
dc.typeThesis
dc.date.schoolyear95-2
dc.description.degree碩士
dc.contributor.oralexamcommittee甘宗左(Tsung-Tso Kan),廖世偉
dc.subject.keyword爪哇,泛型,參數化多型,反射,爪哇編譯器,一般化方法,zh_TW
dc.subject.keywordJava,generics,parametric polymorphism,reflection,Javac,generalization,en
dc.relation.page46
dc.rights.note有償授權
dc.date.accepted2007-07-25
dc.contributor.author-college電機資訊學院zh_TW
dc.contributor.author-dept資訊工程學研究所zh_TW
顯示於系所單位:資訊工程學系

文件中的檔案:
檔案 大小格式 
ntu-96-1.pdf
  未授權公開取用
5.2 MBAdobe PDF
顯示文件簡單紀錄


系統中的文件,除了特別指名其著作權條款之外,均受到著作權保護,並且保留所有的權利。

社群連結
聯絡資訊
10617臺北市大安區羅斯福路四段1號
No.1 Sec.4, Roosevelt Rd., Taipei, Taiwan, R.O.C. 106
Tel: (02)33662353
Email: ntuetds@ntu.edu.tw
意見箱
相關連結
館藏目錄
國內圖書館整合查詢 MetaCat
臺大學術典藏 NTU Scholars
臺大圖書館數位典藏館
本站聲明
© NTU Library All Rights Reserved