045eafe48c849e52be1dcc95540f1943.ppt
- Количество слайдов: 20
A Visual Programming Environment Based on Graph Grammars and Tidy Graph Drawing Y. Adachi, Y. Miyadera, K. Sugita K. Tsuchida and T. Yaku
Contents * Introduction : Purpose, Characteristics and Related Projects * Hichart Tree Structured Diagram (TSD) (1) Characteristics, (2) Attribute Graph Grammar * Hichart TSD Processing System (1) Translator (Hi. TRANS), (2) Editor (Hi. ED) * Hichart Tidy Drawing Algorithm (Hi. TD) * Conclusion
Purpose and Characteristics • Motivation : * Extension of Application Fields of Visualization. * Need of Theoretical Background for Them. (1) Constructing Automated Processing System (2) Studying Drawing Algorithm. • Target : Visualization of Programs. • Characteristics : (1) Using Tree Structured Diagram (TSD) (2) Applying Attribute Graph Grammar(AGG)
Related Projects, System Components • Related Projects : (1) IPSEN-PROGRESS targets program semantics, (2) PLAN 2 D targets nested graphs, (3) Dia. Gen, (4) Graph. Ed target general graphs. • Components of Our System (1) Syntactical Editor (Hi. ED), (2) Translator targeting Pascal/C/DXL (Hi. TRANS), (3) TSD Tidy Drawing Algorithms.
Fig. 1 Components of the System
Fig. 2 Example Hichart TSD
2. 1 Characteristics of Hichart TSD • is a planary Graph. • shows both data structures and control flow simultaneously. • is satisfying some graphical constraints. (e. g. (a) hierarchical alignment, (b) uniform gap between cells. )
2. 2 Attribute Graph Grammar Used for Constructing This System • AGG : (GGu, A, F) * GGu : underlying context-free graph grammar. * A : set of attributes ( set of numerical values and functions. ) * F : set of semantic rules ( set of relations among attributes)
Table 1 Attributes of Hi. AGG
Table 2 Example of Semantic Rules
3. Hi. TRANS : Translator of TSD • Components an Features of Translators (1) X 2 H : Pascal/C/DXL to Hichart translator. input : Pascal/C/DXL source code, output : Hichart internal code and TSD. (2) H 2 X : Hichart to Pascal/C/DXL translator. input : Hichart internal code, output : Pascal/C/DXL program code. Rem. Hichart internal code is a text file.
Main Phases of H 2 X Parser ; input : a Hichart internal code as input, output : a derivation tree for TSD. Attribute-evaluator(A); input : a derivation tree, evaluation : attributes about cell size, type, inside cells. Attribute-evaluator(B); input : a derivation tree, evaluation : attributes about drawing condition among cells. Code-generator : generates program source codes.
Fig. 3 Parsing of a TSD
4 Hi. ED: TSD Editor • Feature (a) Editing Commands (1) Generation, (2) Insertion, (3) Deletion. (b) Characteristics * Generation of Grammatically Correct TSDs. • Method * Providing of Editing Command Based on the Production Rules of the Hi. AGG.
5 Hi. TD: Drawing Algorithm of TSD Hi. TD : a program flowchart processing system that automatically generates tidy Hichart TSD using theory of “tidy drawing problem”.
Constraints of Layout • Constraints: (B 1) planarity condition, (B 2, 3) hierarchy alignment condition, (B 4) balancing condition of a sub-tree, (B 5) isomorphism for sub-trees, (B 6(k)) overlapping condition w. r. t a par. k, (B 7) other overlapping condition.
Conditions and Algorithms of Drawing • Conditions E 0 = B 1, B 2, 3, B 4, B 5, B 6(0), E 1 = B 1, B 2, 3, B 4, B 5; E 2 = B 1, B 2, 3, B 4, E 3(k) = B 1, B 2, 3, B 4, B 5, B 6(k), B 7 E 4 = B 1, B 2, 3, B 4, B 5, B 7 • Algorithms Hi. TD-Proc : procedural algorithm Hi. TD-Cnst : constraint based algorithm Hi. TD-Agg : AGG based algorithm
Fig. 6 Structure of Hichart Drawing
Conclusion • Development of a Visual Programming Environment Based on Graph Grammar. • Definition of Complete AGG for Pascal/C/ DXL. • Development of a Syntactical Programming TSD Processing. (1) Hi. ED, (2) Hi. TRANS, (3) Hi. TD • Implementation of a TSD Processing System Based on This AGG.
045eafe48c849e52be1dcc95540f1943.ppt