From Eviss to Viola Visual Parser Generators based
From Eviss to Viola: Visual Parser Generators based on Extended Constraint Multiset Grammars Jiro Tanaka University of Tsukuba jiro@computer. org 1
Contents Visual Parsing n Visual Parser Generators n ¨ Eviss ¨ Viola 2
Visual systems and visual languages n n Visual systems are systems that process visual languages. Visual languages are two (or more) dimensional languages with have structures. Box customer name goods order No. number No. name ER-diagrams Link text left width height cut select price select deselect Collection Selection cut copy move Sheet delete Drawing name add sheet next sheet save load Class diagrams 3
Visual parsing: motivation ⇒We would like to implement visual systems with less effort and time. 4
What is Necessary n 2 D version of yacc (text -> visual) ¨A visual parser generator such as yacc which generates a parser if rules and actions are given. n Easy visual system builder ¨ Make visual systems with less efforts, only by giving their rules. 5
What is Necessary (2) n Generated visual systems keep the semantic relationships between figure elements, when moved. 3 3 4 + 6
Visual Parser Generator: n Grammar ¨ Extended CMG (Constraint Multiset Grammars) 7
Extended CMG Extended Constraint Multiset Grammar n CMG is used to describe the relationship between figures using constraints. val n Extended CMG is obtained by adding various actions to CMG. 8
Actions n Actions are arbitrary script such as ¨ calculating values ¨ creating widgets ¨ redrawing the figures in the execution window alter the attributes of the figures n move the figures n create new figures n delete the figures n 9
How the List. Tree is Parsed 1. List. Tree consists of a circle with a text string in it. No arrow comes into the node. 2. List. Tree consists of a circle with a text string in it. There exist two arrows which come into the circle. Each arrow comes from another List. Tree. 3 4 5 + * 10
Contents Visual Parsing n Visual Parser Generators n ¨ Eviss ¨ Viola 11
Visual Parser Generators n We have implemented a series of visual parser generators based on Extended CMG. n Eviss [1997] is the first one. ¨ Implemented n in Tcl/Tk Viola [2004] is the latest one. ¨ Implemented in Java 12
“Eviss” System Definition window Grammars are defined here. Execution window Generated systems can be used here. Relationships between figure elements are preserved. 13
Defining Rules Eviss translates them into textual form. The user modifies - attributes - actions - constraints Rough Rules can be defined visually. 14
Applications 3 4 + 5 VSH * calc tree GUI Builder stack STD HIVISUAL VSH VISPATCH 15
Calculation Tree 3 4 + 7 5 35 * Calculation Tree 16
Stack c c b b a a 17
State Transition Diagram Editor 18
VSH (Visual Shell) 19
GUI Builder 20
HIVISUAL n [I. Yoshimoto, 1986] 21
VISPATCH n [Harada, 1997] 22
More Application n Recursive Drawing of a Comic Character 23
Problems with Eviss Needed to define Extended CMG rules textually. n Difficult to the end users. n 24
Features of Viola The user can define the rules by direct manipulation, without describing rules in text. n Implemented in Java (J 2 SE v 1. 4. 1) n As a constraint solver, Chorus [Hosobe 2001] is used. n 25
Features of Viola (2) n No distinction between the definition window and the execution window. We can define the rules and execute the visual system dynamically. 26
Demo: Network Structure Diagram 27
Summary n n n Visual Parser Generators based on Extended CMG are described. They generate the spatial parsers, if the rules for the visual languages are given. ¨ The grammars are based on the extended CMG. In Viola, the user can define rules and execute them dynamically. 28
Future direction: Meta-GUI n Write meta-interpreter of Viola in Viola cf. Vispatch 29
Free Software Packages n EVISS is available from http: //www. iplab. cs. tsukuba. ac. jp/ n More Info: jiro@computer. org 30
From Eviss to Viola: Visual Parser Generators based on Extended Constraint Multiset Grammars Jiro Tanaka University of Tsukuba jiro@computer. org 31
- Slides: 31