CPN模型仿真和分析工具的設(shè)計與實現(xiàn)
本文選題:著色Petri網(wǎng) + CPNML編譯器。 參考:《內(nèi)蒙古大學》2017年碩士論文
【摘要】:近年來計算機軟件行業(yè)的飛速發(fā)展,傳統(tǒng)的軟件設(shè)計與測試技術(shù)已經(jīng)滿足不了并行軟件日益增加的軟件復(fù)雜程度和規(guī)模,基于模型的仿真和測試開始受到廣泛關(guān)注。在眾多建模語言中,CPN(Colored Petri Net,著色Petri網(wǎng))是一種能夠?qū)δP拖到y(tǒng)進行檢驗和仿真的建模語言,特別適用于分析和描述具有并發(fā)和同步等特征的系統(tǒng)。然而,現(xiàn)有的CPN模型仿真工具在針對某些特定問題時略有不足,例如基于模型執(zhí)行自動完成模型分析等工作。因此,本文設(shè)計并實現(xiàn)一個CPN模型的編譯、仿真和分析工具。通過待測軟件系統(tǒng)CPN模型文件的讀入、編譯、執(zhí)行、分析等功能,該工具能夠自動完成模型的整體仿真、到達指定目標的仿真、指定目標點火路徑的生成以及指定目標不可達時的斷點分析。一方面,在軟件設(shè)計階段本工具可以輔助設(shè)計人員完成指定目標的相關(guān)設(shè)計與分析;另一方面,在軟件測試階段本工具可以輔助測試人員完成指定目標的測試例設(shè)計。本文完成了如下工作:1.CPNML(CPN Model Language,CPN 模型語言)編譯器:在分析 CPNML語言詞法和語法結(jié)構(gòu)后,利用LexYacc工具編寫CPNML語言的詞法分析和語法分析文件,生成CPNML編譯器。該編譯器用于在模型仿真和模型分析時解析變量定義和表達式處理等工作;2.模型仿真:在規(guī)范變遷點火條件和點火過程后,利用CPNML編譯器輔助計算令牌信息在傳遞過程中的變化來模擬模型的執(zhí)行過程。該過程分為單步仿真,整體仿真以及指定目標的仿真;3.模型分析:在模型仿真的基礎(chǔ)上,基于模型執(zhí)行自動完成指定目標的可達性分析。通過邊生成狀態(tài)空間邊尋找的方式,在可達時給出該目標的可達性點火路徑,在不可達時進行斷點變遷分析。最后,通過軟件系統(tǒng)模型實例對該工具進行測試與分析,說明本文設(shè)計與實現(xiàn)的CPN模型的仿真分析工具能夠準確完成仿真和分析,對具有復(fù)雜并行軟件設(shè)計和測試提供有力地支持。
[Abstract]:In recent years, with the rapid development of computer software industry, the traditional software design and testing technology has not been able to meet the increasing complexity and scale of parallel software. Among the many modeling languages, colored Petri net (colored Petri net) is a modeling language which can verify and simulate the model system. It is especially suitable for analyzing and describing systems with the characteristics of concurrency and synchronization. However, the existing CPN model simulation tools are slightly inadequate for some specific problems, such as model based execution of automatic completion of model analysis and so on. Therefore, this paper designs and implements a compilation, simulation and analysis tool for CPN model. With the functions of reading, compiling, executing and analyzing the CPN model file, the tool can accomplish the whole simulation of the model automatically and achieve the simulation of the specified target. Specifies the generation of the target ignition path and breakpoint analysis when the specified target is not reachable. On the one hand, in the software design stage, the tool can assist the designer to complete the related design and analysis of the specified target; on the other hand, in the software testing stage, the tool can assist the tester to complete the test case design of the specified target. The work of this paper is as follows: 1. CPN Model language) compiler: after analyzing the lexical and grammatical structure of the CPNML language, we use LexYacc tools to write the lexical analysis and syntax analysis files of CPNML language, and generate the CPNML compiler. This compiler is used to parse variable definition and expression processing in model simulation and model analysis. Model simulation: after the specification transition ignition condition and ignition process, the CPNML compiler is used to calculate the change of token information in the transfer process to simulate the execution process of the model. The process is divided into single step simulation, overall simulation and target simulation. Model analysis: on the basis of model simulation, the reachability analysis of automatic completion of specified targets based on model execution. In this paper, the reachability ignition path of the target is given when it is reachable, and the breakpoint transition is analyzed when it is unreachable. Finally, through the software system model example to test and analyze the tool, it shows that the CPN model simulation analysis tool designed and implemented in this paper can finish the simulation and analysis accurately. Support for complex parallel software design and testing.
【學位授予單位】:內(nèi)蒙古大學
【學位級別】:碩士
【學位授予年份】:2017
【分類號】:TP311.52
【參考文獻】
相關(guān)期刊論文 前10條
1 陸陽;岳峰;張國富;蘇兆品;王永奇;;串并行軟件系統(tǒng)測試資源動態(tài)分配建模及求解[J];軟件學報;2016年08期
2 劉靖;李茹;葉新銘;李軍;;PN4TS:一種基于CPN模型的IOCO測試選擇方法[J];計算機學報;2014年12期
3 劉麗娜;楊純輝;張靜;;Lex和Yacc解釋程序?qū)崿F(xiàn)方法[J];微處理機;2013年01期
4 臧秀娟;劉維亭;;基于Lex和Yacc的C_Minus編譯器[J];信息技術(shù);2011年05期
5 王志強;;著色Petri網(wǎng)應(yīng)用研究[J];電腦與信息技術(shù);2010年05期
6 蔡立志;;基于CPN狀態(tài)空間的軟件場景測試[J];計算機應(yīng)用與軟件;2010年09期
7 王站立;;利用MSXML解析XML文檔[J];科技信息;2009年15期
8 劉曉平;唐益明;鄭利平;;復(fù)雜系統(tǒng)與復(fù)雜系統(tǒng)仿真研究綜述[J];系統(tǒng)仿真學報;2008年23期
9 朱連章;隋瑞升;孔瑩瑩;;基于CPN Tools的性能評價仿真研究[J];微計算機應(yīng)用;2008年04期
10 陳翔,夏國平;基于著色Petri網(wǎng)的工作流建模和合理性分析[J];計算機集成制造系統(tǒng)-CIMS;2004年04期
相關(guān)博士學位論文 前1條
1 馬健麗;信息系統(tǒng)安全功能符合性檢驗關(guān)鍵技術(shù)研究[D];北京郵電大學;2010年
相關(guān)碩士學位論文 前5條
1 劉璐;基于CP-nets的針對待測線性行為的測試序列生成工具的設(shè)計與實現(xiàn)[D];內(nèi)蒙古大學;2016年
2 王少帥;Petri網(wǎng)模型驅(qū)動的云測試生成服務(wù)研究與實現(xiàn)[D];內(nèi)蒙古大學;2015年
3 熊文文;基于層次CPN的軟件建模仿真與性能分析[D];中國石油大學(華東);2014年
4 李金奎;基于著色Petri網(wǎng)的并行測試研究及工具開發(fā)[D];南京航空航天大學;2010年
5 李青;基于CPN的軟件開發(fā)過程建模[D];中國石油大學;2009年
,本文編號:1979175
本文鏈接:http://sikaile.net/kejilunwen/ruanjiangongchenglunwen/1979175.html