Specifying diagram animation with rewrite systems
Bernd E. Meyer, Kim Marriott · 1997
AbstractThe complete specification of visual languages often requires to capture not only the static aspectsof syntax and semantics but also to describe dynamic aspects like the animation or execution ofvisual expressions or user interaction with such notations. Formal specification frameworks forvisual languages have so far mainly been targeted for static language aspects. We present a rewriteframework for the formal specification of diagram animation which is based on the combination ofgraph rewriting and constraint solving. Since it can be regarded as an extension to constraint-basedmultidimensional grammar frameworks, it is suitable for the integration with previous approachesto the formal specification of visual language syntax and parsing. 1 Motivation Many applications of visual languages involve dynamically changing diagrams. Such change mainlyarise from two sources: (a) in interactive languages change may be caused by a user interaction or (b)the task itself requires graphical transformations. Such graphical transformations can, for example,describe valid editing actions in a syntax-based diagram editor or they can be used to formalize so-called “imagery” reasoning processes, i.e., processes in which the reasoning steps themselves are givenby graphical transformations of images [GNC95]. A prime example for such “imagery” reasoning arevisual mathematical notations in which the evaluation rules or the consequence relations are given byvisual transformations. Examplesof such notationsareShin’s extendedVennsystems[Shi95], Hammer’sheterogeneousrelation representations[HD93,Ham93], VEX [CHZ95], LambdaBirds[Kee95], boundaryarithmetics and logic [Bri88], and Harel’s state charts [Har88]. The same principle is at the heart ofsome “completely visual” programming languages, like Pictorial Janus [KS90] and VIPR [CDZ94] whoseexecution semantics is fully defined by visual transformations.Unfortunately there has been relatively little work into how to formalize or specify dynamicallychanging diagrams. Formal specifications of visual or diagrammatic languages have mainly consideredstatic notations and have mostly been constructed to support one-step processing tasks like parsingor syntax-directed translation. As a consequence, most existing visual language formalisms are basedon grammars. Indeed, a common argument against formal approaches to visual languages is that suchstatic formalizations are essentially misguided, because most visual languages are used in interactiveapplications and are thus dynamic. While in our opinion grammar-based methods do merit a centralplace invisual language theory, ithas to be admitted that current approachesdo notsufficiently supportdynamic notations. On the other hand, the advantages of grammar-based approaches are obvious: theyprovide a clear and well-formalized foundation of a theory of visual languages and they open the way forautomated construction of visual language environments from declarative specifications. In this paperwe address how to extend grammar-based approaches to the specification of dynamically changingdiagrams.To define and animate the execution of such notations in a well-defined manner we need to be ableto specify visual diagram transformations in exact, unambiguous ways. Currently there are two mainapproaches to the grammatical specification of static visual languages. The first is based on graphrewriting and relies on representing a diagram by a graph whose nodes are the objects in the diagram1