帳號:guest(18.218.122.158)          離開系統
字體大小: 字級放大   字級縮小   預設字形  

詳目顯示

以作者查詢圖書館館藏以作者查詢臺灣博碩士論文系統以作者查詢全國書目
作者(中文):陳楚家
作者(外文):Chen, Chu-Jia
論文名稱(中文):GraphRE: 圖形轉換系統基於正則表達式之搜尋與替換
論文名稱(外文):GraphRE: A Rule-Based Search-and-Replace Graph Transformation System using Regular-Expression-like Patterns
指導教授(中文):周百祥
指導教授(外文):Chou, Pai H
口試委員(中文):韓永楷
謝孫源
口試委員(外文):Hon, Wing-Kai
Hsieh, Sun-Yuan
學位類別:碩士
校院名稱:國立清華大學
系所名稱:資訊工程學系
學號:108062642
出版年(民國):110
畢業學年度:109
語文別:英文
論文頁數:42
中文關鍵詞:圖形重構正規表達式匹配替換
外文關鍵詞:Graph RewriteRegular ExpressionMatchingSubstitution
相關次數:
  • 推薦推薦:0
  • 點閱點閱:66
  • 評分評分:*****
  • 下載下載:0
  • 收藏收藏:0
本論文提出以匹配兼取代方式編輯圖形的一套系統。正如正則表式(regular expressions)廣泛被使用於文字資料的編輯,本論文採取此類搜尋兼替代編輯方式的優點。匹配型樣和取代規則皆可精簡、精準額外描述,即使新增客製功能,也不會影響到改寫器的核心功能,不會需要撰寫新的程式碼,只需要改型樣即可。如此政策與機制的分離可使軟體更容易維護與演進。但是,目前鮮少有此類「圖形文法」的編輯系統,難點在於圖形不是線性結構,不容易以公式表達,而且又分有向與無向,階層或扁平、含權重或其他屬性、有埠或無埠、一體或成叢林、還有許多其他特性,導致一套通用的圖形改寫系統變得很有挑戰性。為了解決這個問題,我們提出一套圖形正則表式(GraphRE)的系統,其RE部份指的是以文字版為比喻的可擴充式、以規則為基準的編輯器。GraphRE遵照我們以自定圖形型樣描述語言所訂規則,將一個圖形轉換成另一個圖形。GraphRE把規則編譯成一個可將讀取的圖形轉換為比子圖同構更通用的演算法。我們認為,這種匹配取代的優勢在於模組化會高於完全依賴命令式語言表達圖形重寫的傳統圖形文法系統。實驗結果顯示,GraphRE的確能夠實作出一個圖形編輯程式的編輯動作。本技術將會朝向可對不同種類示意圖定義以可程式化載入的圖形編輯器邁向一大步,避免把圖形邏輯以手刻程式碼作為唯一的實作方式。
This thesis describes a graph-transformation system based on the idea of pattern matching and re-placement. Analogous to regular expressions for text editing, this search-and-replace style of graphtransformation has several key advantages. The patterns to match and the replacement rules can bespecified concisely, precisely, and custom-defined by the user or tool without modification to the coreengine or writing imperative program code. This separation of policy and mechanism can also makesoftware more maintainable and evolvable. However, few such “graph grammar”-based transforma-tion systems exist, due to the nonlinear nature of graph data structures, and their diversity such asdirected vs. undirected, hierarchical vs. flat, weighted or attributed, ported vs. non-ported, connectedvs. forest, and many variants make it very challenging to develop a general-purpose graph transfor-mation system.To address these challenges, we propose GraphRE, a extensible graph-rewriting system for rule-based graph editing, analogous to regular expressions for text. GraphRE transforms a graph intoanother according to rules described in our graph-pattern description language. GraphRE generatesa custom parser for the set of rules and can match subgraphs in ways more general than subgraphisomorphism. The use of substitution pattern also makes it more modular than conventional graphgrammar systems that rely entirely on executable code to actually perform the graph rewriting. Ex-perimental results show our GraphRE to be able to implement editing actions for a diagram editor.This technology represents the first step towards enabling programmable diagram editors that can bespecialized to editing different types of diagrams based on loadable rules instead of crafting customcode.
Contents i
Acknowledgments vi

1 Introduction 1
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Thesis Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Background and Related Work 4
2.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.1 Graph Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.2 Subgraph Isomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.3 Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Graph Grammars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.1 Graph Transformation System . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.2 Design of Graph Grammar . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Subgraph Isomorphism Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.1 Brute-Force Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.2 Heuristic Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3 System Overview 10
3.1 Representations of Graphs and Patterns in GraphRE . . . . . . . . . . . . . . . . . . 10
3.1.1 Graph Representations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.1.2 Pattern Representations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1.3 Isolation of ID Namespaces Between the Source Graph and Patterns . . . . . 12
3.1.4 Attributed Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 Procedures in GraphRE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2.1 Matching Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2.2 Substitution Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3 Graph Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3.1 Modifiers of Matching Patterns . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3.2 Primitive Graph Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 18

4 Implementations 21
4.1 Elements of Graph Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.1.1 Vertices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.1.2 Edges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.1.3 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.1.4 Grouping and GroupRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.1.5 Repetition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2 Graph Transformation in GraphRE . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.2.1 Matching Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.2.2 Substitution Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3 Composite Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3.1 Splicing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3.2 Adding a Merged Sink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3.3 Adding a Merged Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

5 Evaluation 33
5.1 Data Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.2 Editing Efforts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.3 Example of HTML Browser Grammar . . . . . . . . . . . . . . . . . . . . . . . . . 34

6 Conclusions and Future Work 37
6.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
6.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Appendix 40
[1] C. Ermel, M. Rudolf, and G. Taentzer, “The AGG approach: Language and environment,” in Handbook Of Graph Grammars And Computing By Graph Transformation: Volume 2: Applica- tions, Languages and Tools, pp. 551–603, World Scientific, 1999.
[2] A. H. Ghamarian, M. de Mol, A. Rensink, E. Zambon, and M. Zimakova, “Modelling and analysis using groove,” International journal on software tools for technology transfer, vol. 14, no. 1, pp. 15–40, 2012.
[3] D.-Q. Zhang and K. Zhang, “Reserved graph grammar: A specification tool for diagrammatic VPLs,” in Proceedings. 1997 IEEE Symposium on Visual Languages (Cat. No. 97TB100180), pp. 284–291, IEEE, 1997.
[4] J. R. Ullmann, “An algorithm for subgraph isomorphism,” Journal of the ACM (JACM), vol. 23, no. 1, pp. 31–42, 1976.
[5] W.-S. Han, J. Lee, and J.-H. Lee, “TurboISO: towards ultrafast and robust subgraph isomorphism search in large graph databases,” in Proceedings of the 2013 ACM SIGMOD International Con- ference on Management of Data, pp. 337–348, 2013.
 
 
 
 
第一頁 上一頁 下一頁 最後一頁 top
* *