UML -> Rhapsody in Ada An Example

Similar documents
UML for the C programming language.

Object Oriented Analysis and Design and Software Development Process Phases

PIE. Internal Structure

Glossary of Object Oriented Terms

Designing Real-Time and Embedded Systems with the COMET/UML method

Programming and Software Development CTAG Alignments

: provid.ir

Java (12 Weeks) Introduction to Java Programming Language

There are 2 approaches to starting a session: the mutation scope can contain a whole codebase or in a single chosen method.

W4118 Operating Systems. Instructor: Junfeng Yang

CS 111 Classes I 1. Software Organization View to this point:

Module 8. Industrial Embedded and Communication Systems. Version 2 EE IIT, Kharagpur 1

Software Architecture

Discussion Board. Accessing Discussion Board

My home. Mobile phone application. Instructions for use and installation. For DELTA DORE GSM transmitters and transmitter control units.

Cyclic Architectures in UML

In this Lecture you will Learn: Systems Development Methodologies. Why Methodology? Why Methodology?

I PUC - Computer Science. Practical s Syllabus. Contents

Umbrello UML Modeller Handbook

Working with Visio Connectors

Designing a Home Alarm using the UML. And implementing it using C++ and VxWorks

A Rational Software Whitepaper

COMMANDtrack. Service Bulletin 2.7 Release Date: September 13, New Functionality. Application CR Description

System Behaviour Analysis with UML and Ptolemy. Scope and goals

Object Oriented Databases. OOAD Fall 2012 Arjun Gopalakrishna Bhavya Udayashankar

Design and UML Class Diagrams. Suggested reading: Practical UML: A hands on introduction for developers

Integrating Legacy Code / Models with Model Based Development Using Rhapsody

My home Mobile phone application

History OOP languages Year Language 1967 Simula Smalltalk

ReqXChanger Closing the Gap between Requirements and Modelling

Hands-On: Introduction to Object-Oriented Programming in LabVIEW

Adapted for a textbook by Blaha M. and Rumbaugh J. Object Oriented Modeling and Design Pearson Prentice Hall, 2005.

Fundamentals of Java Programming

Infrastructure that supports (distributed) componentbased application development

WORKSPACE WEB DEVELOPMENT & OUTSOURCING TRAINING CENTER

Dispatching Domains for Multiprocessor Platforms and their Representation in Ada

Communications Software Engineering Design Model

Java Interview Questions and Answers

SnapLogic Salesforce Snap Reference

Chapter 6, The Operating System Machine Level

Description of Class Mutation Mutation Operators for Java

WASv6_Scheduler.ppt Page 1 of 18

SYSTEM ecos Embedded Configurable Operating System

A UML Introduction Tutorial

Course Name: Course in JSP Course Code: P5


Lab Manual: Using Rational Rose

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

IRA 423/08. Designing the SRT control software: Notes to the UML schemes. Andrea Orlati 1 Simona Righini 2

First-class User Level Threads

Laboratory Assignments of OBJECT ORIENTED METHODOLOGY & PROGRAMMING (USING C++) [IT 553]

ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology)

Business Application

EBOX Digital Content Management System (CMS) User Guide For Site Owners & Administrators

Frameworks & Android. Programmeertechnieken, Tim Cocx

Multichoice Quetions 1. Atributes a. are listed in the second part of the class box b. its time is preceded by a colon. c. its default value is

core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt

Red Hat Enterprise Portal Server: Architecture and Features

Scheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum

Introduction. UML = Unified Modeling Language It is a standardized visual modeling language.

System Modeling / Class Diagra Diagr m a Week 6

Code Refactoring and Defects

Summary of Correction Event log create utility has been recompiled with.net Framework 4

Object Oriented Software Design II

MiniDraw Introducing a framework... and a few patterns

Scientific Visualization with ParaView

REAL TIME OPERATING SYSTEMS. Lesson-10:

Smart Connection 9 Element Labels

Digital indicator 3011

UML Diagram Types. Use Cases do the Following. Use Case Diagram

Introduction CORBA Distributed COM. Sections 9.1 & 9.2. Corba & DCOM. John P. Daigle. Department of Computer Science Georgia State University

Suggested Application Options Settings for Autodesk Inventor

Course Title: Software Development

BSc (Hons) Business Information Systems, BSc (Hons) Computer Science with Network Security. & BSc. (Hons.) Software Engineering

Objectives. Chapter 5: CPU Scheduling. CPU Scheduler. Non-preemptive and preemptive. Dispatcher. Alternating Sequence of CPU And I/O Bursts

CS 341 Software Design Homework 5 Identifying Classes, UML Diagrams Due: Oct. 22, 11:30 PM

Design by Contract beyond class modelling

RTOS Debugger for ecos

Chapter 2: OS Overview

TECHNOLOGY Computer Programming II Grade: 9-12 Standard 2: Technology and Society Interaction

Object Oriented Design

CSCI 253. Object Oriented Programming (OOP) Overview. George Blankenship 1. Object Oriented Design: Java Review OOP George Blankenship.

Assignment 5 - Due Friday March 6

Using Protothreads for Sensor Node Programming

Real Time Programming: Concepts

Database Modelling in UML

Presentation of the AADL: Architecture Analysis and Design Language

StarUML Documentation

Project Server 2013 Inside Out Course 55034; 5 Days, Instructor-led

Napster and Gnutella: a Comparison of two Popular Peer-to-Peer Protocols. Anthony J. Howe Supervisor: Dr. Mantis Cheng University of Victoria

Business Modeling with UML

TRAFFIC LIGHT: A PEDAGOGICAL EXPLORATION

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

Your partner when introducing and using modern software development tools. Klaus Wachsmuth Dr. Peter Dencker

White Paper. Real-time Capabilities for Linux SGI REACT Real-Time for Linux

Transcription:

UML -> Rhapsody in Ada An Example E1-1

Object Orientated Ada Ada is not fully OO Key Concepts: Separate external and internal views Encapsulation Classification Inheritance Dynamic Dispatching (Polymorphism) Ada 83 Ada 95 E1-2

Code Generation RULES BASED APPROACH The Auto-Code Generation is achieved through an external Code Generator The Code Generator has a set of rules to map UML concepts to Ada Code Every single token in the code is customisable The User can maintain several rulesets (eg Ada95, Ada83, Spark) The Rules Editor is Java-Based and WYSIWYG E1-3

The Transformation Engine Code Generation Roundtripping Reverse Engineering E1-4

UML to Ada Classes Class Class Attributes Class Pointer this Pointer E1-5 For Ada83, the SW_t would be just a record not a tagged type so avoid Inheritance if you want the model to remain Ada83 compatible

The this Pointer Class_t is automatically added as the first argument to every operation (The this pointer) Clock +tick():void E1-6

A Simple Clock What has a clock got to do? Maintain minutes, seconds Implement timing algorithm (so we don t get 61 seconds) Display the time E1-7

The Clock Class E1-8

Instantiating a Class Clock THE MAIN E1-9

The Display Class E1-10

Relationships E1-11

Creating a NEW Instance E1-12

Accessors / Mutators E1-13

Composite Classes E1-14

Alarm Function E1-15

Wake me up at 1.00 Clock +secs : Integer +mins : Integer +tick():void +print():void E1-16

What if the Alarm is not set? Where do we store this? An Attribute of the Clock An Attribute of the Alarm The Alarm State Call Events (Synchronous) E1-17

Statechart Code - Defs Each State & Event has an ID defined in the Spec file Default State Events States E1-18

Statechart Code - Events Events are record Types with accessors Events have Data Event Data is also record type with accessor Event Event Data E1-19

Class Code - Data The Class holds extra attributes for the statechart Including a pointer to the current event being processed E1-20

Statechart Code Generating Events Each Event has a corresponding operation allowing a client to generate the Event E1-21

Statechart Code for Events For Each Event: The class has an operation that the client can call to generate the event into the statechart Synchronous: Operation is name of event asynchronous: Operation is named take_eventname Or gen_eventname The Class has a state_take_eventname for each state Allows each state to handle an event independently E1-22

Event Operation Code Creates the Event Calls the Root of the Statechart with the new Event E1-23

Event Initialisation Code E1-24

Statechart Structure The Statechart is one large switch statement, broken up into smaller switch statements Take_Event checks overall statechart behaviour (eg is it started yet?) Take_Event calls Dispatch Event to pass the event onto the current state Each state has its own take_event operation as a root This dispatches any event received to : Each state then has its own take_eventname to actually handle the event E1-25

Take_Event Check If Statechart is still active Set current Event Dispatch Event E1-26

Dispatch_Event Dispatch Event identifies the current State and calls the root take event operation of that state E1-27

The Alarm Set State The State_Take_Event operation identifies the event and calls the appropriate take_eventname for that state Analagous to individual dispatch_event operations for each state E1-28

Alarm_Set_Take_Sound_Alarm Leaving the State Action On Transition Entering the next state E1-29

asynchronous Statecharts Require an Event Handler Active Context To Be Continued. E1-30

Creating an Event Driven Statechart Create the Statechart as usual. Add an EventHandler Class & make its Class Visibility Private Make it Active Add a Dependency from it to any Reactive Class and stereotype that to <<Active Context>> TheEventHandler The combination of these two things causes extra operations to be generated in the EventHandler <<Active Context>> Timer E1-31

Statechart Code An Example Statechart Events are defined at Package Level States are defined in the Statechart Code for the Class E1-32

Statechart Event Dispatching Code Important Operations Generated for a Statechart: procedure start_behavior Procedure take_eventname One Procedure is generated per Event EG: procedure take_evstop procedure take_event (Event) procedure Initialize procedure Finalize Kicks off the Statechart Creates an Event and passes it to it s Active Context to be placed on a queue. Actually Consumes the Event and causes a State Transition. Called by the Active Context Constructor/Destructor E1-33

Instantiating a Reactive Object Create the Event Handler and Initialise it Create the Reactive Object and Initialise it Register the Reactive object with the Event Handler Start the Event Handler Task Causes it to spawn a thread and process its object queue repeatedly Start the Reactive Object s Statemachine E1-34

Framework Use Sequence A sequence of the prior collaboration is shown here. The client does the creation, starting, message sending and deletion in an orderly fashion. E1-35

Framework Internal Behavior If we look at the start operation for an active object more closely we see there is much going on. A task is spawned and the reactive object queue is processed repeatedly to cause event consumption in the reactive state chart. E1-36