Universidade do Minho, Departamento de Informática Nuno Oliveira, 2008.

Slides:



Advertisements
Similar presentations
JavaCUP JavaCUP (Construct Useful Parser) is a parser generator
Advertisements

AUTOMATIC GENERATION OF VISUAL PROGRAMMING ENVIRONMENTS A workflow Universidade do Minho, Departamento de Informática Nuno Oliveira, 2009.
Slide 1 Insert your own content. Slide 2 Insert your own content.
Language Specification using Metamodelling Joachim Fischer Humboldt University Berlin LAB Workshop Geneva
An Introduction to Programming By :- Vishal Hirani B.Tech II year (CSE)
Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
Chapter 1: Introduction. Contents Whats New in Dreamweaver CS4? The Dreamweaver CS4 Interface Setting Up a Site Creating a Web Page Adding Text to Your.
1 Symbol Tables. 2 Contents Introduction Introduction A Simple Compiler A Simple Compiler Scanning – Theory and Practice Scanning – Theory and Practice.
1 After completing this lesson, you will be able to: Check spelling in a document. Check for grammatical errors. Find specific text. Replace specific text.
Basic HTML Workshop LIS Web Team Spring 2007.
Comparison of Several Meta-modeling Tools 2 Yi Lu Computer Science Department McGill University
VISUAL BASIC Visual Basic is derived from the Basic language (Beginner’s All-Purpose Symbolic Instruction Code) Visual Basic uses an event-driven programming.
Macromedia Dreamweaver MX 2004 – Design Professional Dreamweaver GETTING STARTED WITH.
IAAnalyzer: Towards a Model-Driven Modeling and Analysis Framework for C ONNECT(ors) Massimo Tivoli, University of L’Aquila (UNIVAQ)
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 15 Programming and Languages: Telling the Computer What to Do.
SYNTAX DIRECTED TRANSLATION 11CS Types of Attributes There are two types of attributes for non- terminals :- Synthesized Attributes : For a non-terminal.
Semantics Static semantics Dynamic semantics attribute grammars
Attribute Grammars Prabhaker Mateti ACK: Assembled from many sources.
Teppo Räisänen LIIKE/OAMK 2010
Chapter 5 Syntax Directed Translation. Outline Syntax Directed Definitions Evaluation Orders of SDD’s Applications of Syntax Directed Translation Syntax.
May 2006CLINT-LN Parsing1 Computational Linguistics Introduction Approaches to Parsing.
VisualLISA A Quick and Simple Demonstration. The default aspect of an attribute grammar specification on VisualLISA. In this view we can add a new production.
1 CS 106, Winter 2009 Class 4, Section 4 Slides by: Dr. Cynthia A. Brown, Instructor section 4: Dr. Herbert G. Mayer,
INTEGRATING Macromedia MX 2004 Products Integrating Macromedia MX 2004.
CS 330 Programming Languages 09 / 13 / 2007 Instructor: Michael Eckmann.
A basis for computer theory and A means of specifying languages
BİL744 Derleyici Gerçekleştirimi (Compiler Design)1.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
The Interpreter Pattern. Defining the Interpreter Intent Given a language, define a representation for its grammar along with an interpreter that uses.
Introduction 01_intro.ppt
Adobe Dreamweaver CS3 Revealed CHAPTER ONE: GETTING STARTED WITH DREAMWEAVER.
Syntax & Semantic Introduction Organization of Language Description Abstract Syntax Formal Syntax The Way of Writing Grammars Formal Semantic.
Microsoft Visual Basic 2005: Reloaded Second Edition
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming 1.
The Web Collection, Revealed MACROMEDIA STUDIO 8 INTEGRATING.
AN IMPLEMENTATION OF A REGULAR EXPRESSION PARSER
Overview of Previous Lesson(s) Over View  An ambiguous grammar which fails to be LR and thus is not in any of the classes of grammars i.e SLR, LALR.
Introduction to Yacc Ying-Hung Jiang
Author Context Institution Presentation. The Problem Conception of a Visual Language; Development of a Processor for the Language; Idealization of the.
Introduction to Compiling
1.
Compiler Design Introduction 1. 2 Course Outline Introduction to Compiling Lexical Analysis Syntax Analysis –Context Free Grammars –Top-Down Parsing –Bottom-Up.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
Overview of Previous Lesson(s) Over View 3 Model of a Compiler Front End.
Compiler Construction CPCS302 Dr. Manal Abdulaziz.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
CS416 Compiler Design1. 2 Course Information Instructor : Dr. Ilyas Cicekli –Office: EA504, –Phone: , – Course Web.
Submitted by: DRPU Software Team Site:
PZ03CX Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ03CX - Language semantics Programming Language Design.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Chapter 3 – Describing Syntax CSCE 343. Syntax vs. Semantics Syntax: The form or structure of the expressions, statements, and program units. Semantics:
LECTURE 10 Semantic Analysis. REVIEW So far, we’ve covered the following: Compilation methods: compilation vs. interpretation. The overall compilation.
Computer Software: Programming
Chapter A - Getting Started with Dreamweaver MX 2004
DW Tutorial 5 Sessions 5.1 & 5.2 REVIEW
Chapter 5 Syntax Directed Translation
Context-free Languages
CS416 Compiler Design lec00-outline September 19, 2018
Introduction CI612 Compiler Design CI612 Compiler Design.
Patterns.
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
CS416 Compiler Design lec00-outline February 23, 2019
SYNTAX DIRECTED DEFINITION
Lec00-outline May 18, 2019 Compiler Design CS416 Compiler Design.
Lecture 16 Boolean Expressions and Control Flow
Chapter 5 Syntax Directed Translation
Visual Programming Languages ICS 539 Icon System Visual Languages & Visual Programming, Chapter 1, Editor Chang, 1990 ICS Department KFUPM Sept. 1,
Programming Logic and Design Eighth Edition
Presentation transcript:

Universidade do Minho, Departamento de Informática Nuno Oliveira, 2008

Introduction Visual Language Grammar for VisualLISA DEViL Implementation Results Universidade do Minho, Departamento de Informática Nuno Oliveira,

VisualLISA is a project under the UCE-15 of MSc in Informatics 2 nd year; VisualLISA is a graphical interface for the compilers- compiler LISA. VisualLISA will be used to edit visually LISA specifications. Cant VisualLISA be a generic VisualAG tool? Universidade do Minho, Departamento de Informática Nuno Oliveira,

Differences between visual and textual Grammars? + Operators to relate two or more symbols in space; + Attributes to compute symbols position; - Notion of order of symbols occurrence; Universidade do Minho, Departamento de Informática Nuno Oliveira,

(…) AG_ELEM LEFT_SYMBOL | NON_TERMINAL | TERMINAL | SYNT_ATTRIBUTE | INH_ATTRIBUTE | TREE_BRANCH | IV_ATTRIBUTE | SYNT_CONNECTION | INH_CONNECTION| IV_CONNECTION (…) TERMINAL o v e r ( r e c t a n g l e, t e x t ) (…) TREE BRANCH p o i n t s _f r o m ( p o i n t s _t o ( l i n e, ˜TERMINAL), ˜LEFT SYMBOL) | p o i n t s _f r o m ( p o i n t s_ t o ( l i n e, ˜NONTERMINAL), ˜LEFT SYMBOL) 4

Complex Installation; Disperse Documentation and written in German; Generated Editor is only compatible with the SO where it is Generated;... Very good support; Too much examples, addressing several DEViL features; Exists for MacOS, Windows and Linux... Universidade do Minho, Departamento de Informática Nuno Oliveira,

Visual Language Grammar into DEViL Model Representation Editor Generation Semantic Analysis Code Generation Universidade do Minho, Departamento de Informática Nuno Oliveira,

Definition of Models to create different views: Define buttons Look & Feel; Define buttons behavior;... Definition of Canvas Look & Feel: Assign Visual Patterns to each grammar Symbol or Attribute; Define computations to implement the Visual Pattern assigned ( ex: SYNT.drawing, SYNT.text,... ); Calculate values for Symbols attributes; Universidade do Minho, Departamento de Informática Nuno Oliveira,

VIEW rootView ROOT Root { BUTTON IMAGE "img::btnSemprod" INSERTS Semprod INFO "Inserts a new Grammar Production"; } SYMBOL rootView_Root INHERITS VPRootElement, VPForm COMPUTE SYNT.drawing = ADDROF(rootViewDrawing); END; SYMBOL rootView_Root_semprods INHERITS VPFormElement, VPSimpleList COMPUTE SYNT.formElementName = "productions"; END; 9

DEViL builds a tree representation for our specification, based on the grammar specified; DEViL gives us a sort of a tree walker to perform computations given a tree context; The tree walker is named addCheck A tree context is any symbol or attribute in the tree representation; Universidade do Minho, Departamento de Informática Nuno Oliveira,

checkutil::addCheck Semprod { set n [llength [c::getList {$obj.grammarElements.CHILDREN[LeftSymbol]}]] set symbName [c::get {$obj.name.VALUE}] if { $n == 0 } { return "Production '$symbName' must have one Root symbol!" } elseif {$n > 1} { return "Production '$symbName' must have only one Root symbol!" } return } Semantic Contraint: A production must have one and only one root symbol 11

Definition of code templates with IPTG/PTG files; Definition of code generation using LIDO files: Use CONSTITUENTS to access/refer to symbols far down on the tree from the actual context; Use INCLUDING* to access/refer to symbols far up on the tree from the actual context; Use of SYNT attributes to calculate code or parts of code; * INCLUDING reduces the need of using inherited attributes; Universidade do Minho, Departamento de Informática Nuno Oliveira,

SYMBOL bnfgen_Semprod: bnfLHS : PTGNode; SYMBOL bnfgen_Semprod: bnfRHS : PTGNode; SYMBOL bnfgen_Semprod: bnfCode : PTGNode; SYMBOL bnfgen_Semprod COMPUTE SYNT.bnfLHS = CONSTITUENTS bnfgen_LeftSymbol.pers_symbolName WITH(PTGNode, PTGNewLineSeq, PTGAsIs, PTGNull); SYNT.bnfRHS = PTGAsIs(VLString(SELECT(vlList( "printBNFOrderedRHSElements",THIS.objId),eval()))); SYNT.bnfCode = PTGbnfProd(THIS.bnfLHS, THIS.bnfRHS); END; bnfProd(lhs, rhs): [lhs] -> [rhs] 13

Viag.XMODEL View.MODEL Code.HEAD Code.SPECS images.GDR Aux.TCL Code.LIDO Code.IPTG Code.MODEL View.LIDO Buttons.PNG Viag.DEFS Semantics.TCL Symbols.GIF Sync.TCL Edit.TCL

Universidade do Minho, Departamento de Informática Nuno Oliveira, 2008