王凡Wang, Fran臺灣大學:電子工程學研究所蕭儒鴻Hsiao, Ju-HungJu-HungHsiao2010-07-142018-07-102010-07-142018-07-102008U0001-2207200815282500http://ntur.lib.ntu.edu.tw//handle/246246/189122全球微波存取互通 (Worldwide Interoperability for Microwave Access, WiMAX) 係由全球微波存取互通協會 (WiMAX Forum)根據IEEE 802.16e 所制定的標準電信技術,此技術可供資料以不同的方式來做無線存取。 為了推廣WiMAX技術,並方便廠商可針對WiMAX設備做測試,WiMAX Forum提供了以TTCN-3測試語言所建構的協定一致性之測試案例 (Protocol Conformance Testing, PCT);然而,TTCN-3測試語言並無法經由自身進行執行之動作。由台大電機自動軟體測試實驗室所開發的軟體測試工作平台(Software Testing Workbench)係一個整合性的測試工具,可針對此問題將TTCN-3測試語言轉換成可執行的C/C++程式。 本研究針對STW的編譯效能提出了幾項限制,並且發展出了一個全新的程式碼產生器來幫助STW解決此問題。首先我們透過Lex以及Yacc兩個工具,依TTCN-3測試案例建構出一顆語法分析樹,並利用程式碼產生器追蹤樹的節點來獲取必要資訊,最後再產生對應的可執行之C/C++程式碼格式。此外,我們不僅成功的提升編譯效能,更提供使用者更多的程序來建構測試案例。Worldwide Interoperability for Microwave Access (WiMAX) is a telecommunications technology based on IEEE 802.16, and it provides wireless data in a variety of ways, from point-to-point links to full cellular type access. Protocol Conformance Testing (PCT) is provided by WiMAX Forum for the development of WiMAX. PCT executes the testcases designed in TTCN-3 for estimating whether the devices are designed according to the protocol. However, TTCN-3 core language can’t execute itself, and an integrating testing tool named Software Testing Workbench (STW) is developed to translate TTCN-3 into executable C/C++ code. We address the limitations of the STW, and successfully develop a new code generator for STW to solve the restrictions. We first translate the TTCN-3 core language into a parsing tree by Lex&Yacc. Therefore, the code generator can trace the parsing tree to extract the essential information, and generate the corresponding executable C/C++ code formats. Moreover, our approach enhances the compilation performance and supports more functions for users.Contestsontents iist of Figures iiiist of Tables iv Introduction 1.1 WiMAX 1.2 Testing of WiMAX 2 Testing and Test Control Notation Version 3 4.1 An Overview of TTCN-3 4.2 TTCN-3 Core Language 5.2.1 Definition part 8.2.2 Control Part 10.3 TTCN-3 Communication 11.3.1 Send operation 11.3.2 Receive operation 11.4 TTCN-3 Runtime Interface 12.5 TTCN-3 presentation formats 12 Software Testing Workbench 14.1 An Overview of STW 14.2 limitations of STW 17 Implementation of new code generator 19.1 Parser and Parsing tree 21.2 Code generator 21.2.1 Declaration 24.2.2 Testcase Configuration 26.2.3 Function Local Instance 28.2.4 Function Statements 28.2.4.1 Map Statement 29.2.4.2 Timer Statements 30.2.4.3 Communication Statements 32.2.4.4 Basic Statements 35.2.4.5 Function Instance 35.2.4.6 AltConstruct 36.2.4.7 Verdict Statements 40 Experiment 43 Conclusions and Future Works 47ibliography 49 Cell618 51 tsspec1_1.ttcn 53 tsspec1_1.cpp 55ist of Figures.1 Difference between TTCN-2 and TTCN-3 4.2 TTCN-3 test configuration 7.3 message-based communication 12.4 The core language and other presentation formats 13.1 the architecture of STW 15.2 STW Graphical User Interface 16.3 the main flow of STW 18.1 the new work flow of compilation 20.2 structure of the parsing tree 22.3 test system configuration 27.4 architecture of Function Statement in Parsing tree 29.5 illustration of alternative behavior 36.6 the graphical presentation format of Table 4.15 38.1 the interface of Cell618 44.2 power-on state 44.3 after code generation 45.4 testcase fail 45.5 testcase pass 45ist of Tables.1 a TTCN-3 module 6.2 the elements in module definition part 8.3 the definition of port and component 9.4 a TTCN-3 testcase example 10.1 the translate algorithm 23.2 TTCN-3 user defined structure and corresponding C/C++ code segments 24.3 an example of UInt2 and corresponding code segments 26.4 declaration of components and ports and corresponding code segments 27.5 grammar of function local instance 28.6 TTCN-3 function local instance and the corresponding pseudo code 28.7 grammar of Function Statement 29.8 an example of Map Statement and corresponding pseudo code 30.9 grammar of Timer Statements 30.10 the examples of start and stop timer and corresponding pseudo code 31.11 an example of timeout and its corresponding algorithm 32.12 grammar of communication statements 33.13 an example of send statement and corresponding pseudo code 33.15 an example of log statement and corresponding pseudo code 35.14 an example of receive statement and corresponding pseudo code 34.16 an example of Function Instance 35.17 an example of TTCN-3 AltConstruct 36.18 the algorithm of alt construct 39.19 Overwriting rules for the verdict 40.20 TTCN-3 verdict statements and the corresponding pseudo code 41.21 implementation comparison between two methods 41.1 the compilation time between two methods 46.1 the input key messages of the Cell618 52.2 the state identity of Cell618 531006139 bytesapplication/pdfen-USWiMAX協定一致性測試測試案例程式碼產生器軟體測試語法剖析程式編譯器WiMAX PCTTTCN-3testcasecode generationsoftware testingparsercompilerWiMAX 通訊協定符合性測試案例之程式碼產生器之研發Development of code-generator for WiMAX PCT TTCN-3 testcasesthesishttp://ntur.lib.ntu.edu.tw/bitstream/246246/189122/1/ntu-97-R95943169-1.pdf