COCOVILA Compiler-Compiler for Visual Languages



Similar documents
A Visual Language Based System for the Efficient Management of the Software Development Process.

Source Code Translation

Model Driven Interoperability through Semantic Annotations using SoaML and ODM

Modeling Turnpike: a Model-Driven Framework for Domain-Specific Software Development *

Implementing reusable software components for SNOMED CT diagram and expression concept representations

Formal Ontologies in Model-based Software Development

UPROM Tool: A Unified Business Process Modeling Tool for Generating Software Life Cycle Artifacts

NEW YORK STATE TEACHER CERTIFICATION EXAMINATIONS

Comparison of Model-Driven Architecture and Software Factories in the Context of Model-Driven Development

Domain-Specific Modelling for Cross-Platform Product Families

A Pattern-based Framework to Address Abstraction, Reuse, and Cross-domain Aspects in Domain Specific Visual Languages *

Use software to define silicon p. 15

Organization of DSLE part. Overview of DSLE. Model driven software engineering. Engineering. Tooling. Topics:

Textual Modeling Languages

Selbo 2 an Environment for Creating Electronic Content in Software Engineering

FLOW CHART INTERPRETER - an environment for software animation representation

Clarifying a vision on certification of MDA tools

Distributed Database for Environmental Data Integration

Meta-Model specification V2 D

VisualLISA: A Domain Specific Visual Language for Attribute Grammars

Jos Warmer, Independent

Evaluating OO-CASE tools: OO research meets practice

Designing a Family Tree Metamodel Case Study

Development of Tool Extensions with MOFLON

æ A collection of interrelated and persistent data èusually referred to as the database èdbèè.

FIPA agent based network distributed control system

Teaching Object-Oriented Concepts with Eclipse

MULTI-POLE MODELING AND INTELLIGENT SIMULATION OF A HYDRAULIC DRIVE WITH THREE-DIRECTIONAL FLOW REGULATING VALVE

A Business Process Services Portal

clooca : Web based tool for Domain Specific Modeling

A Workbench for Prototyping XML Data Exchange (extended abstract)

Foundations of Model-Driven Software Engineering

Dr. Jana Koehler IBM Zurich Research Laboratory

Embedded Software Development with MPS

International Journal of Scientific & Engineering Research, Volume 4, Issue 11, November ISSN

Questions? Assignment. Techniques for Gathering Requirements. Gathering and Analysing Requirements

Chapter 8 The Enhanced Entity- Relationship (EER) Model

Towards Flexible Business Process Modeling and Implementation: Combining Domain Specific Modeling Languages and Pattern-based Transformations

On General-purpose Textual Modeling Languages. On General-purpose Textual Modeling Languages

today 1,700 special programming languages used to communicate in over 700 application areas.

A Methodology for the Development of New Telecommunications Services

Component visualization methods for large legacy software in C/C++

VIRTUAL LABORATORY: MULTI-STYLE CODE EDITOR

Budapest University of Technology and Economics Department of Measurement and Information Systems. Business Process Modeling

UML PROFILING AND DSL

A Contribution to Expert Decision-based Virtual Product Development

Configuration Management Models in Commercial Environments

Tool Support for Software Variability Management and Product Derivation in Software Product Lines

Representing XML Schema in UML A Comparison of Approaches

A Case Study of Question Answering in Automatic Tourism Service Packaging

Winery A Modeling Tool for TOSCA-based Cloud Applications

Ontology and automatic code generation on modeling and simulation

The ADOxx Metamodelling Platform Workshop "Methods as Plug-Ins for Meta-Modelling" in conjunction with "Modellierung 2010", Klagenfurt

ONTOLOGY-BASED MULTIMEDIA AUTHORING AND INTERFACING TOOLS 3 rd Hellenic Conference on Artificial Intelligence, Samos, Greece, 5-8 May 2004

ProGUM-Web: Tool Support for Model-Based Development of Web Applications

XML-based Web Service for Collaborative Product Data Management

EMC Documentum Composer

Software Engineering. System Models. Based on Software Engineering, 7 th Edition by Ian Sommerville

XFlash A Web Application Design Framework with Model-Driven Methodology

Introduction to programming

Linking BPMN, ArchiMate, and BWW: Perfect Match for Complete and Lawful Business Process Models?

Cedalion A Language Oriented Programming Language (Extended Abstract)

Software Factories: Assembling Applications with Patterns, Models, Frameworks, and Tools

PENNSYLVANIA COMMON CORE STANDARDS English Language Arts Grades 9-12

Parsing Technology and its role in Legacy Modernization. A Metaware White Paper

Lecture 12: Entity Relationship Modelling

How the Computer Translates. Svetlana Sokolova President and CEO of PROMT, PhD.

What is a metamodel: the OMG s metamodeling infrastructure

Towards Model-Driven Approach for Rapid ERP Development

II. PREVIOUS RELATED WORK

Reusable Knowledge-based Components for Building Software. Applications: A Knowledge Modelling Approach

Generating Enterprise Applications from Models

From Object Oriented Conceptual Modeling to Automated Programming in Java

Complexities of Simulating a Hybrid Agent-Landscape Model Using Multi-Formalism

Towards Integrating Modeling and Programming Languages: The Case of UML and Java

Development of a Feature Modeling Tool using Microsoft DSL Tools.

Tool Support for Model Checking of Web application designs *

Common Warehouse Metamodel (CWM): Extending UML for Data Warehousing and Business Intelligence

Modeling the User Interface of Web Applications with UML

2. Basic Relational Data Model

Software Development Methodologies

YAML: A Tool for Hardware Design Visualization and Capture

CommentTemplate: A Lightweight Code Generator for Java built with Eclipse Modeling Technology

Electronic Healthcare Design and Development

Visualization of Verilog Digital Systems Models

Automatic Generation of Consistency-Preserving Edit Operations for MDE Tools

Towards collaboration between sighted and visually impaired developers in the context of Model-Driven Engineering

SYSML PLUGIN. version user guide

2 AIMS: an Agent-based Intelligent Tool for Informational Support

Transcription:

LDTA 2005 Preliminary Version COCOVILA Compiler-Compiler for Visual Languages Pavel Grigorenko, Ando Saabas and Enn Tyugu 1 Institute of Cybernetics, Tallinn University of Technology Akadeemia tee 21 12618 Tallinn Estonia Abstract A compiler-compiler for visual languages is presented. It has been designed as a framework for building visual programming environments that translate schemas into textual representation as well as into programs representing the deep meaning of schemas. The deep semantics is implemented by applying attribute grammars to schema languages; attribute dependencies are implemented as methods of Java classes. Unlike compiler-compilers of textual languages, a large part of the framework is needed for support of interactive usage of a visual language. Key words: compiler-compiler, extended attribute grammars, visual languages. 1 Shallow and deep semantics of visual languages Our idea has been to develop a compiler-compiler for visual languages analogous to the compiler compilers of programming languages, to be used as a tool for rapid development of domain-specific visual languages. To be able to describe both syntax and semantics of languages considered, we have restricted the class of languages to schema languages with well-defined abstract syntax. On the semantic side, we are able to specify precisely shallow semantics that produces a textual representation of schemas without loss of essential information included in a schema. Furthermore, we give a general way to implement deep semantics of schemas, i.e. to generate an executable code from a schema, using in essence an extension of attribute grammars to schema languages. The attempts to generate visual environments automatically have been made earlier, a good representative is [1]. Our framework differs from the 1 Email: {pavelg, ando, tyugu}@cs.ioc.ee This is a preliminary version. The final version will be published in Electronic Notes in Theoretical Computer Science URL: www.elsevier.nl/locate/entcs

Fig. 1. Visual programming earlier ones by its capability to translate a visual sentence in principle into an arbitrary code using semantic programs run as implementations of attribute dependencies. Figure 1 describes our approach to development of a visual language and using it for programming. The compiler-compiler COCOVILA supports a language designer in the definition of visual languages, including the specification of graphical objects, syntax and semantics of the language and provides the user with a visual programming environment, which is automatically generated from the visual language definition. When a scheme is composed by the user, the following steps parsing, planning and code generation are fully automatic. The compiled program then provides a solution for the problem specified in the scheme, and the results it provides can be fed back into the scheme, thus providing interactive properties. In several ways, COCOVILA is similar to meta-modelling tools such as MetaEdit[2] or AToM3 [3]. However, our treatment of scheme semantics is quite different. Unlike the latter we are using a technique of dynamic evaluation of attributes of the syntactic graph underlying the scheme. 2 Class Editor From a user s point of view COCOVILA consists of two components: Class Editor and Scheme Editor. The tool for a visual language developer is Class Editor, which supports the language designer in defining the visual aspects of classes, but also some of their logical and interactive aspects. The functional properties of visual classes are implemented by annotated Java classes. The 2

Fig. 2. Class Editor window class editor is used to map domain concepts to visual classes as described in Figure 1. Its main window is shown in Figure 2. Pop-up windows for defining port properties and for developing an object window of the class are visible there as well. Results of a visual language development are stored in a package that is usable by the Scheme Editor. The user interface for using a visual language in Scheme Editor is automatically generated from the language definition given in Class Editor. 3 Scheme Editor The Scheme Editor is a tool for the language user. It is intended for developing schemes and for compiling (synthesizing) programs from the schemes according to the specified semantics of a particular domain. The scheme editor is implemented using Java Swing library. It provides an interface for visual programming, which enables one to compose a scheme from shapes of classes. The environment generated for a particular visual language allows the user to draw, edit and compile visual sentences (schemes) through language-specific menus and toolbars. Figure 3 shows the scheme editor in use, when a package for calculating loads and kinematics of a gearbox has been loaded. Gears are connected to each other by arranging them on top or next to each other; lines connect other objects (motor and monitoring device). The toolbar at the top of the scheme is used for adding objects and relations to the scheme. One pop-up window is designed for instantiating object attributes, another popup window is designed for manipulating the scheme - deleting and arranging objects etc. The scheme editor is fully syntax directed in the sense that the correctness of the scheme is forced during editing: drawing syntactically incorrect diagrams is impossible. 3

Fig. 3. Scheme Editor The way to handle large schemes in the scheme editor is to use hierarchical composition in building the scheme. Any part of a scheme can be encapsulated as a separate class, so a large scheme can consist of a hierarchy of schemes, where each scheme object can contain subschemes. This means that schemes can be viewed in several different levels of abstraction, in order to encapsulate and manipulate parts of the scheme which are relevant to a particular issue. 4 Compiler The deep semantics of schemes has been implemented in our framework on Java platform in such a way that a synthesized program becomes a method in a new Java class. Functional dependencies between attributes of an object of a schema are given either as methods of a class representing the object, or by equations. Equations and the usage of methods as functional dependencies are specified in a textual specification added to every class that can represent an object in a scheme. An important point of the implementation is that attributes of objects of a scheme are not components of the class of the object. They become components of the synthesized class, and are passed as parameters to methods. The logic of program synthesis needed for the attribute evaluation has been explained thoroughly in the paper [4]. 5 Demo Packages Several packages have been developed in this framework: a package for calculating loads and kinematics in a gearbox (shown in Figure 3), a package 4

for analyzing logical schemes, a package for designing mechanical drives etc. Also, several UML modelling tools have been implemented in the framework, for example class diagram, use case diagram and state chart diagram tools. As the experiments have shown, rapid prototyping of visual languages can be quite effective in the framework. For example, the implementation of the functional aspects (generating Java class file templates) of the class diagram editor was under 100 lines of Java code, and specification of the graphical and interactive aspects (which were also part of the language definition) was done visually easily in Class Editor (Figure 2). The prototype implementation together with demo packages for analysis of logical circuits and mechanical drives as well as packages for UML modelling are accessible from http://www.cs.ioc.ee/ cocovila/. Acknowledgements This work has been supported by the Grant No. 5400 of the Estonian Science Foundation. Participation of Ando Saabas and Pavel Grigorenko in ETAPS 2005 was supported by the EU project evikings II (IST-2001-37592). References [1] G. Costagliola, A. De Lucia, S. Orefice, G. Tortora. Automatic Generation of Visual Programming Environments. IEEE Computer, 28(3):56-66, 1995. [2] J-P. Tolvanen, M. Rossi. Metaedit+: Defining and Using domain-specific Modeling Languages and Code Generators. In: OOPSLA 2003 demonstration, 2003. [3] J. de Lara and H. Vangheluwe. Defining visual notations and their manipulation through meta-modelling and graph transformation. Journal of Visual Languages and Computing, 15(3-4):309-330, 2004. [4] M. Matskin and E. Tyugu. Strategies of structural synthesis of programs and its extensions. Computing and Informatics, 20:1-25, 2001. 5