OVERVIEW OF MDE AND IN CLASS EXAMPLES try your luck at modeling UML4-1 UML 1.class diagrams 2.object diagrams and constraints 3.metamodeling 4.examples.

Slides:



Advertisements
Similar presentations
Three-Step Database Design
Advertisements

Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Budapest University of Technology and EconomicsDagstuhl 2004 Department of Measurement and Information Systems 1 Towards Automated Formal Verification.
Based on: Petri Nets and Industrial Applications: A Tutorial
Counters. In class excercise How to implement a “counter”, which will count as 0,3,1,4,5,7,0,3,1,…… Q2Q1Q0D2D1D
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Introduction to Graph “theory”
E-commerce Project Erik Zeitler Erik Zeitler2 Lab 2  Will be anounced and scheduled later  We will deploy Java Server Pages on a Tomcat server.
ECE 331 – Digital System Design
Finite State Machine Minimization Advanced Methods based on triangular table and binate covering.
Code Generation for Basic Blocks Introduction Mooly Sagiv html:// Chapter
Lecture 6 & 7 System Models.
Basic Register Typically, we store multi-bit items
1 Info 1409 Systems Analysis & Design Module Lecture 8 – Modelling tools and techniques HND Year /9 De Montfort University.
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
Software Testing and QA Theory and Practice (Chapter 4: Control Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
1 COMP541 State Machines Montek Singh Feb 8, 2012.
CIS Computer Programming Logic
System Models Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn Lecture 6 & 7.
Models of Computation: FSM Model Reading: L. Lavagno, A.S. Vincentelli and E. Sentovich, “Models of computation for Embedded System Design”
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
An ordered n-tuple is a set of n objects with an order associated with them. If n objects are represented by x 1, x 2,..., x n, then we write the ordered.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
Introduction to Software Testing Chapter 2.5 Graph Coverage for Specifications Paul Ammann & Jeff Offutt
Computabilty Computability Finite State Machine. Regular Languages. Homework: Finish Craps. Next Week: On your own: videos +
Generic API Test tool By Moshe Sapir Almog Masika.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
Counters. In class excercise How to implement a “counter”, which will count as 0,3,1,4,5,7,0,3,1,…… Q2Q1Q0D2D1D
Programmable Logic Training Course HDL Editor
Computing and SE II Chapter 9: Design Methods and Design Models Er-Yu Ding Software Institute, NJU.
Lecture 5. Sequential Logic 2 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
1 Graph Coverage (5). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section
SM2220 – Class 06 Finite Automata. SM2220 – Class 06 Topic in theoretical computing. A subset of computation machines. Closely related to formal language.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Finite State Machines (FSM) OR Finite State Automation (FSA) - are models of the behaviors of a system or a complex object, with a limited number of defined.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
Sahar Mosleh California State University San MarcosPage 1 Finite State Machine.
1 COMP541 Finite State Machines - 1 Montek Singh Sep 22, 2014.
Daniel Amyot, University of Ottawa Based on Powerpoint slides by Gunter Mussbacher (2009) with material from: Jo Atlee, Dan Berry (both University of Waterloo);
METAMODELING the core of MDE and modeling in general UML3-1 UML 1.class diagrams 2.object diagrams and constraints 3.metamodeling.
1 CEN 4020 Software Engineering PPT4: Requirement analysis.
Introduction to Computing Concepts Note Set 19. Design Creating complex software… ▫ Not done by just one person (or two, or three) ▫ Can’t just sit down.
CS 404Ahmed Ezzat 1 CS 404 Introduction to Compiler Design Lecture 1 Ahmed Ezzat.
Miguel Garzón, University of Ottawa Based on Powerpoint slides by Gunter Mussbacher (2009) with material from: Jo Atlee, Dan Berry (both University of.
On Combining Multi-formalism Knowledge to Select Models for Model Transformation Testing Sagar Sen (1 st year PhD student), Benoit Baudry, Jean-Marie Mottu.
1 COMP541 Sequential Logic – 2: Finite State Machines Montek Singh Feb 29, 2016.
Lecture 4. Sequential Logic #2
Control Flow Testing Handouts
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
IAY 0600 Digital Systems Design
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Model Driven Engineering
Outline of the Chapter Basic Idea Outline of Control Flow Testing
Structural testing, Path Testing
MetaModeling the core of MDE and modeling in general UML
Assembler, Compiler, Interpreter
Instructor: Alexander Stoytchev
THEORY OF COMPUTATION Lecture One: Automata Theory Automata Theory.
CS310 Software Engineering Dr.Doaa Sami
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
IAS 0600 Digital Systems Design
Assembler, Compiler, Interpreter
Tonga Institute of Higher Education IT 141: Information Systems
Counters.
Tonga Institute of Higher Education IT 141: Information Systems
Software Architecture & Design
Presentation transcript:

OVERVIEW OF MDE AND IN CLASS EXAMPLES try your luck at modeling UML4-1 UML 1.class diagrams 2.object diagrams and constraints 3.metamodeling 4.examples

Finite State Machines Yet another UML diagram Nodes represent states in a computation; edges represent legal state transitions UML4-2 this is a high-level description of an ugly Java program I would rather draw this than write this ugly program

Model Driven Engineering Basic idea is this: programmer draws a model graph of the software that he wants to build tool translates the graphical model into a database of tuples tool evaluates metamodel constraints if no errors, tool generates code or whatever from these tables UML4-3 (1) draws FSM using xlate graph to tables FSM Tool (2) press button to generate velocity code generation FSM code validate constraints FSM Application Engineer

Model Driven Engineering What I’ve been showing you is how MDE tools work input graphs – like your homework – are fancy object diagrams you are manually translating object diagrams to databases: tools do this automatically you are writing the constraints that tools invoke assignment P2 you will be writing the scripts to generate code or whatever as output P3 UML4-4 (1) draws FSM using xlate graph to tables FSM Tool (2) press button to generate velocity code generation FSM code validate constraints FSM Application Engineer

Where does MetaModeling Fit in? The tool that allows you to draw diagrams – it must use a metamodel to understand whether an engineer’s diagram makes sense it conforms to the tool’s metamodel UML4-5 (1) draws FSM using xlate graph to tables FSM Tool (2) press button to generate velocity code generation FSM code validate constraints FSM Application Engineer mm

Everything is a Graph to MDE nothing special about FSMs, hence the generality of MDE Message Sequence Charts Data Flow Model Flow Chart Petri Net Network Architecture Logic Circuit Diagram MDE1-6

An MDE Tool for These Domains Uses a metamodel for message sequence charts, logic circuit diagrams, data flow models, etc. to allow engineers to draw diagrams and make sure that the diagrams conform to make sure there are no stupidities that can’t be mapped to code UML4-7 Message Sequence Charts Data Flow Model Flow Chart Petri Net Network Architecture Logic Circuit Diagram

What you are Learning Are the basics behind Model Driven Engineering There are MDE tools take a meta-model and automatically generate tools that allow programmers to draw object models that are customized for a domain like FSMs they translate input object diagrams to databases they evaluate the Prolog constraints that you have defined they generate whatever from this database You will see all the pieces brought together in program P3 UML4-8

METAMODELING lets get back to UML4-9

H1: Category Diagrams UML4-10 (a) (b)

To Us… They are just directed graphs and yes, I inadvertently made things more complicated talking about compound arrows I ignored that part of the problem when grading Always remember: models capture very little of domain semantics does the Java compiler understand your program? NO – it just cares if your program conforms to its metamodel (syntax + type constraints) UML4-11

Metamodel UML4-12

Tables UML4-13 #name # fromto Domain Arrow #name boolBool intInt unitUnit realReal #namefromto iszero boolint not bool true unitbool false unitbool zero unitint succint int toreal intreal succreal real unit (b)

Tables UML4-14 #name # fromto Domain Arrow #name xX yY zZ # fromto ffxy ggyz g f xz (a)

Ex #1: Hypergraphs UML please note that I include color in this design; color is not fundamental to hypergraphs

Class Diagram without Constraints UML4-16 table#attributes node belongsTo hyperEdge please note that I include color in this design; color is not fundamental to hypergraphs table#attributes noden#name belongsTo hyperEdge table#attributes noden#name belongsTob#n#e# hyperEdge table#attributes noden#name belongsTob#n#e# hyperEdgee#namecolor

Tables UML4-17 n#name v1 v2 v3 v4 v5 v6 v7 Node 1 e#namecolor e1 yellow e2 salmon e3 green e4 purple HyperEdge 2 b#n#e# b1v1e1 b2v2e1 b3v2e2 b4v3e1 b5v3e2 b6v3e3 b7v4e4 b8v5e3 b9v6e3 BelongsTo

Constraints Enforce cardinality constraints – every edge must contain at least one vertex Lots of other possibilities: check belongsTo column for nulls – error exists if nulls exist check unique name for each vertex check unique name & color for each edge UML4-18 atLeastOne(H) :- belongsTo(_,_,H). NoEmptyEdges :- forall(hyperEdge(H,_,_),atLeastOne(H)).

Amaze Your Friends! When you see: You exclaim “It’s a hypergraph with one edge!” UML4-19

Amaze Your Friends! When you see: You exclaim “It’s a hypergraph with two edges!” UML4-20

Ex #2: Labeled Mixed Graphs UML4-21 V = { 1, 2, 3, 4, 5 } A = {A1, A2, A3, A4} E = {E1, E2} A1 A2 A3 A4 E1 E2

Class Diagram without Constraints UML4-22

Tables UML4-23 n#label Node 1 e#label Edge 2 a#labelstartsAtendsAt Arc c#e#n# Connects 3 V = { 1, 2, 3, 4, 5 } A = {A1, A2, A3, A4} E = {E1, E2} A1 A2 A3 A4 E1 E2 n#label n11 n22 n33 n44 n55 e#label e1E1 e2E2 c#e#n# c1e1n1 c2e1n4 c3e2n3 c4e2n4 a#labelstartsAtendsAt a1A1n5n1 a2A2n1n2 a3A3n2n3 a4A4n5n3

Constraints Unique labels for nodes, edges, arcs No nulls for arc or edge endpoints Endpoints for arcs and edges must exist UML4-24

Ex #3: Recall Survey this is harder UML4-25 What is a UML (class diagram) model of such surveys?

Class Diagram Question: do we need to normalize associations? Question: is this a model or a meta-model or a meta-meta-model? UML4-26 abstract

Ans: Meta-Meta-Model! UML4-27 s1s1 s4s4 s3s3 s2s2 metasurvey survey instances i1i1 i3i3 i2i2 i4i4 i6i6 i5i5 surveys

Diagram-2-Table Mapping UML4-28 table#attributes questionairen#name questionq#textin simpleQuestionq#textinqs# questionSetq#textin answerChoicea#choicevalueq# always empty table – why?

Tables UML4-29 n#name n1CS373S survey questionnaire 1 q#textinqs# q1Status at UTn1null q2Major or Deptn1null q3Registered?n1null q4BNFn1q19 q5Reg. Expr.n1q19 ……n1q19 q18Design Patternsn1q19 SimpleQuestion 2 AnswerChoice #ChoiceValueQuestion A11 st yearq1 A22 nd yearq1 A33 rd yearq1 A44 th yearq1 A55 th yearq1 A6CSq2 A7ECEq2 A8Otherq2 A9Yesq3 A10Noq3 A11Not Familiarq19 A12Somewhatq19 A13Veryq19 k#TextIn q19Knowledge survey n1 QuestionSet 3

Constraints Check cardinalities Check for unique names? UML4-30

Next Lecture We have looked at UML models transformations that map models to databases model constraints – written in prolog meta-models Next we will look at: model refactorings why they are relevant to modeling Java program refactorings UML4-31