580 likes | 718 Vues
Syntactic Methods for Diagrams. Tomokazu ARITA. 1. Introduction. Background. Motivation. In mechanical documentation, it is necessary to formally define tabular forms and the drawing conditions. Purpose. To propose a model for forming tabular forms efficiently.
E N D
Syntactic Methods for Diagrams Tomokazu ARITA WAAP
1. Introduction WAAP
Background WAAP
Motivation In mechanical documentation, it is necessary to formally define tabular forms and the drawing conditions. WAAP
Purpose • To propose a model for forming tabular forms efficiently. • To formalize tabular forms based on this model. • To investigate properties of this model for tabular forms. • To propose an analyzing method. • To formalize editing by graph grammars WAAP
Results • To define an attribute NCE graph grammar. • To formalize tabular forms based on an attribute NCE graph grammar. context-free,280 productions, 2504 attribute rules • To show properties of the grammar for tabular forms. precedence graph grammar • To propose a parsing method by this grammar. • To construct a parsing system. WAAP
2. Preliminaries WAAP
A program specification language Hiform • 17 types of Forms based on ISO6592 • A collection of tabular forms WAAP
Constraints for Tables Definition A form graph : Fg = (Σ, Γ, V, E, φ) where Σ: alphabets of items Γ = {in, ov, lf}: alphabets of edges V: sets of nodes E: sets of edges φ: V → Σ WAAP
Constraints for Tables Definition A tabular form: T = (Fg, π) where Fg = (Σ,Γ, V, E, φ): a form graph π: V → N4 WAAP
Constraints for Tables ConstraintsC1 For vi, vj ∈ V, πx(vj) = πx(vi) + πw(vi) if there is (vi, lf, vj)∈ E. ConstraintsC2 For vi, vj ∈ V, πy(vj) = πy(vi) if there is (vi, lf, vj) ∈ E. WAAP
Constraints for Tables Constraints C3 For vi, vj ∈ V, πx(vj) = πx(vi) if there is (vi, ov, vj)∈ E. ConstraintsC4 For vi, vj ∈ V, πy(vj) = πy(vi) + πh(vi) if there is (vi, ov, vj) ∈ E. WAAP
Constraints for Tables ConstraintsC5 Items do not pile up on each other. WAAP
Constraints for Tables Definition A tabular form T = (Fg, π) is consistent if and only if π satisfies C1, C2, C3, C4, and C5 WAAP
REVIEW [7] [Rozenberg et al.] WAAP
REVIEW (continued) WAAP
Production with Attribute Rules Production ‘H5’ sub-derivation tree WAAP
Our Result 1 WAAP
Productions of HNGG WAAP
Features of HNGG WAAP
Our Result 2. Syntactic Analysis • The syntactic analysis is done by parsing of precedence graph language. • use a precedence property. WAAP
How to use precedence rule • Input Graph • Derivation Tree WAAP
Attribute Evaluation WAAP
Proposition Attributes in HNGG are evaluated in linear time. WAAP
Our Result 3 Proposition HNGG is a precedence graph grammar. Proof. We construct 5376 precedence relations. The relations are shown to be pairwise disjoint. Fig. A part of precedence relations of HNGG WAAP
Proposition For graph G with n nodes and m edges, the parsing based on HNGG perform in linear times depended on n and m. WAAP
Proposition For graph G with n nodes and m edges, the attribute evaluation for G based on HNGG perform in linear times depended on n and m. WAAP
Diagrams WAAP
Tessellation Diagram • Tessellation Diagram and Its • Corresponding Graph
Tessellation Diagram Production Example of HTGG • Grammar HTGG HTGG ( Hiform Tessellation Graph Grammar ) is an attribute context-sensitive NCE graph grammar for the tessellation diagrams such as:
Tessellation Diagram Features of HTGG
Tessellation Diagram Derivation of HTGG
Diagram Processing System KEYAKI – CASE2000 Concept 1.HichartED Hichart program diagram editing component 2. HiformED Hiform diagram component WAAP
HichartED • The Hichart program diagram editing component • Syntax-directed diagram editor • Editor-Commands defined by productions WAAP
HiformED • Hiform Diagram Processing Component • A Java application WAAP
An Execution Screen ofParsing Engine (Arita 2001) Input : Marked Graph Output : Derivation Tree
5. FXL WAAP
File Structures Browser (IE etc.) XML Style Files XML Files Other Systems Editor Viewer Other Systems Parsing Engine Marked Graph Class Derivation Tree Class File Converter Tabular Form Processing System FXL Files
3.3 MGC and DTC MGC • Data structure of marked graph (edNCE GG) • Java Class • Bidirectional List • Used for Syntax Analysis WAAP
3.3 MGC and DTC DTC • Data structure for derivation tree • Java Class • Bidirectional List • Generated by Syntax Analysis • Used for attribute evaluation and drawing of a table WAAP
4.1 FXL(A Form Exchange Language) • Syntax of FXL is defined by extended BNF. • Codes of FXL are text-based codes. • FXL can describe several attributes for tabular forms. WAAP