Input and output for specified visual languages

The specification of languages used for generating programming environments for these languages has been investigated with various formalisms. In the case of visual languages, the support provided for the interactive aspects of the tools within such environments is very important because the apparent consistency of visual presentations determines the correct comprehension of visual notation. In this work we examine two interactive aspects of visual languages: (1) the presentation of abstract terms (thepretty-printingof terms) and (2) input and output during execution(dynamicinput and output). To address the pretty-printing problem we introduce some heuristic rules that maintain two types of information:ShareandWhere.These rules track whether a symbol is shared among different syntactic constructs and where it was originally created. The technique called Share-Where maintenance automatically assigns and propagates annotations to abstract syntax nodes with this information. These annotations are used for pretty-printing terms in a manner that attempts to preserve the appearance of similar parts that exist both in the initial and in the final term. To address the dynamic input and output with visual terms, we define an extension to the formalism for querying for external (visual) input which is used during further rewriting. We use the visual algebraic specification formalism VAS in examining these issues and describe the developed methods by means of a finite-state automata example.