UML modeling for INF5150

Similar documents
Agile modeling for INF5150

Causality Interfaces and Compositional Causality Analysis

Object Modeling Approach! Object Modeling Approach!

Using the Principles of Synchronous Languages in Discrete-event and Continuous-time Models

Causality Interfaces for Actor Networks

Discrete Dynamics Finite State Machines גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון

Lecture 05: High-Level Design with SysML. An Introduction to SysML. Where are we? What is a model? The Unified Modeling Language (UML)

Concurrent Models of Computation

Concurrent Models of Computation in System Level Design

Information System Desig

Formal Conformance Testing 2006

An object-oriented design process. Weather system description. Layered architecture. Process stages. System context and models of use

Embedded Systems 5. Synchronous Composition. Lee/Seshia Section 6.2

TRANSITION CONFLICTS DETECTION IN BINARY MODULAR STATECHART DIAGRAMS 1. Grzegorz Łabiak

-- Technical Memorandum UCB/ERL M97/11 --

EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2016

CPO Semantics of Timed Interactive Actor Networks

Robustness the art of preparing for the unexpected

Introduction to Computer Programming

OBEUS. (Object-Based Environment for Urban Simulation) Shareware Version. Itzhak Benenson 1,2, Slava Birfur 1, Vlad Kharbash 1

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

Business Process Management

Using the Principles of Synchronous Languages in Discrete-event and Continuous-time Models

Seamless Model Driven Development and Tool Support for Embedded Software-Intensive Systems

The Two Time Pad Encryption System

Robustness the art of preparing for the unexpected

Extensibility Patterns: Extension Access

Algebraic Trace Theory

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr.

Algebraic Trace Theory

The Discrete EVent System specification (DEVS) formalism

Information System Design IT60105

Erly Marsh - a Model-Based Testing tool. Johan Blom, PhD

Embedded Systems Development

Research Report 326 ISBN ISSN

Change Management within SysML Requirements Models

Designing Information Devices and Systems I Spring 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way

EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2014

A PRELIMINARY VERSION OF A DENOTATIONAL FRAMEWORK FOR COMPARING MODELS OF COMPUTATION. Abstract

Developing software that drives machines. Klaas Gadeyne

Modern Functional Programming and Actors With Scala and Akka

Introduction to Embedded Systems

Hybrid Systems Modeling Challenges caused by CPS

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014

Fundamental Algorithms for System Modeling, Analysis, and Optimization

Computational Tasks and Models

1 Descriptions of Function

A Modular Formal Semantics for Ptolemy 1 2

Semester s projects at UTT in Autumn 2011

Complex Systems Design & Distributed Calculus and Coordination

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way

Basic System and Subsystem Structures in the Dataflow Algebra. A. J. Cowling

Synchronous Reactive Systems

Static Program Analysis

Communicating Scala Objects. Bernard Sufrin. CPA, York, September 2008

An Introduction to GLIF

Communication and Concurrency: CCS

Finite Automata Part One

ECEN 651: Microprogrammed Control of Digital Systems Department of Electrical and Computer Engineering Texas A&M University

Science Analysis Tools Design

NICTA Advanced Course. Theorem Proving Principles, Techniques, Applications. Gerwin Klein Formal Methods

The Montana Toolset: Formal Analysis of AADL Specifications

Bridging the Semantic Gap Between Heterogeneous Modeling Formalisms and FMI

Project 2: Hadoop PageRank Cloud Computing Spring 2017

Bridging the Semantic Gap Between Heterogeneous Modeling Formalisms and FMI

Cosmic Ray Detector Software

Numerical mathematics with GeoGebra in high school

Lecture 12: Core State Machines II

An Automotive Case Study ERTSS 2016

Expressing Dynamics of Mobile Programs by Typing

The State Explosion Problem

Blocking Synchronization: Streams Vijay Saraswat (Dec 10, 2012)

AC : BALANCING THEORY, SIMULATION AND PHYSICAL EXPERIMENTS IN

GISLab (UK) School of Computing and Mathematical Sciences Liverpool John Moores University, UK. Dr. Michael Francis. Keynote Presentation

Go Tutorial. Ian Lance Taylor. Introduction. Why? Language. Go Tutorial. Ian Lance Taylor. GCC Summit, October 27, 2010

Adding the METAR service to the CNS/ATM-1 FIS Application

THE UTP SUITE YOUR ALL-IN-ONE SOLUTION FOR BUILDING MODERN TEST SYSTEM SOFTWARE

Communication and Concurrency: CCS. R. Milner, A Calculus of Communicating Systems, 1980

Theoretical Foundations of the UML Lecture 18: Statecharts Semantics (1)

Abstractions and Decision Procedures for Effective Software Model Checking

COR Safety Management Data system

Mappings For Cognitive Semantic Interoperability

Physical Modeling of Hybrid Systems with Rand Model Designer

A BOUNDARY NOTATION FOR VISUAL MATHEMATICS Jeffrey James and William Bricken September Published in IEEE Visual Languages'92 ABSTRACT

From High-Level Component-Based Models to Distributed Implementations

An Indian Journal FULL PAPER ABSTRACT KEYWORDS. Trade Science Inc.

Formal Models of Timed Musical Processes Doctoral Defense

Model Checking: An Introduction

EE249 - Fall 2012 Lecture 18: Overview of Concrete Contract Theories. Alberto Sangiovanni-Vincentelli Pierluigi Nuzzo

Administrivia. Course Objectives. Overview. Lecture Notes Week markem/cs333/ 2. Staff. 3. Prerequisites. 4. Grading. 1. Theory and application

Geo-enabling a Transactional Real Estate Management System A case study from the Minnesota Dept. of Transportation

TRAITS to put you on the map

INF Models of concurrency

DATA SCIENCE SIMPLIFIED USING ARCGIS API FOR PYTHON

TDDB68 Concurrent programming and operating systems. Lecture: CPU Scheduling II

Synchronous Modelling of Complex Systems

6.897: Advanced Topics in Cryptography. Lecturer: Ran Canetti

Report. Stepwise refinement of sequence diagrams with soft real-time requirements. Author(s) Atle Refsdal Ragnhild Kobro Runde, Ketil Stølen

Formal Methods for Java

Opus: University of Bath Online Publication Store

Transcription:

UML modeling for INF5150 Version 101022 ICU 0-1 22-Oct-10 INF5150 Unassailable IT-systems 1

Disciplined Heterogeneous Modeling Edward A. Lee Robert S. Pepper Distinguished Professor EECS Department UC Berkeley Invited Keynote Talk MODELS 2010 Oslo, Norway, October 6-8, 2010

UML Notations: Unified? [Image from Wikipedia Commons. Author: Kishorekumar 62]

The Truly Unified Modeling Language TUML h 0 0 w A model in TUML is a function of the form (notice how nicely formal the language is!) Tools already exist. With the mere addition of a TUML profile, every existing UML notation is a special case!

Examples of TUML Models [Image from Wikipedia Commons. Author: Kishorekumar 62]

Drawbacks of TUML Most importantly: It is not standardized (yet) Models are not executable (but there is nothing new here ) A model may not have the same meaning for all observers (but there is nothing new here )

My Claim Modeling languages that are not executable, or where the execution semantics is vague or undefined are not much better than TUML. We can do better.

Assumptions of this Talk I am interested only in executable models (I will not comment about descriptive models) I focus on concurrent components that communicate via ports (as one might describe in SysML, AADL, or UML Component Diagrams & Communication Diagrams, though my take is more specific than any of these)

Concurrent Components that Communicate via Ports Component interactions in object-oriented programming: class name data methods call return An alternative: Actor oriented: What flows through an object is sequential control The use of the term actors for this dates back at least to the 1970s [Hewitt, Agha, Dennis, Kahn, etc.] actor name data (state) parameters ports What flows through an actor is evolving data Input data Output data

Examples of Actor-Oriented Modeling Frameworks & Languages from Outside the UML Community ASCET (time periods, interrupts, priorities, preemption, shared variables ) Autosar (software components w/ sender/receiver interfaces) CORBA event service (distributed push-pull) Dataflow languages (many variants over the years) LabVIEW (structured dataflow, National Instruments) Modelica (continuous time, constraint-based, Linkoping) MPI (message passing interface, parallel programming) Occam (rendezvous) OPNET (discrete events, Opnet Technologies) SCADE (synchronous, based on Lustre and Esterel) SDL (process networks) Simulink (continuous time, The MathWorks) SPW (synchronous dataflow, Cadence, CoWare) VHDL, Verilog (discrete events, Cadence, Synopsys,...) The semantics of these differ considerably in their approaches to concurrency and time. Some are loose (ambiguous) and some rigorous. Some are strongly actor-oriented, while some retain much of the flavor (and flaws) of threads.

First(?) Executable Actor-Oriented Modeling Language The On-Line Graphical Specification of Computer Procedures W. R. Sutherland, Ph.D. Thesis, MIT, 1966 MIT Lincoln Labs TX-2 Computer Bert Sutherland with a light pen Bert Sutherland used one of the first acknowledged object-oriented frameworks (Sketchpad, created by his brother, Ivan Sutherland) to create the first actor-oriented modeling language (which had a visual syntax and a stream-based semantics). Partially constructed iterative square-root program with a class definition (top) and instance (below).

ICU0 your very first I see you system surveillance at your fingertips, first we only observe ourselves 22-Oct-10 INF5150 Unassailable IT-systems 12

Tools for executable modeling in INF5150 third party sw: simple interfaces PATS Oracle hybrid systems Commercial big, imperfect executable modeling UML compiler UML2 plugin SeDi open source our own UML 2 runtime system JavaFrame 3.0 Windows+ Linux 22-Oct-10 INF5150 Unassailable IT-systems 13

Agile modeling agile = having a quick resourceful and adaptable character executable models! very stepwise approach each step will have its specification and executable model each step should be tested We shall use one example throughout the course with many steps intended to be mirrored by the project exercise model Every week a working program! 22-Oct-10 INF5150 Unassailable IT-systems 14

Manifesto for Agile Software Development We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value: Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan That is, while there is value in the items on the right, we value the items on the left more. 22-Oct-10 INF5150 Unassailable IT-systems 15

Dialectic Software Development Software Development is a process of learning once you have totally understood the system you are building, it is done Learning is best achieved through conflict, not harmony discussions reveal problematic points silence hides critical errors By applying different perspectives to the system to be designed inconsistencies may appear and they must be harmonized Inconsistencies are not always errors! difference of opinion difference of understanding misunderstanding each other a result of partial knowledge Reliable systems are those that have already met challenges 22-Oct-10 INF5150 Unassailable IT-systems 16

Buzzzzz 1: Agility Give 3 reasons for why agile modeling/programming is a good approach Give 3 possible problems for an agile approach Give each pro and each con a short name 22-Oct-10 INF5150 Unassailable IT-systems 17

UML Use Cases very very simple subject : our system note: an informal text use case: a service actor: the outsiders 22-Oct-10 INF5150 Unassailable IT-systems 18

Use cases in a separate package Diagram Package 22-Oct-10 INF5150 Unassailable IT-systems 19

UML Sequence Diagrams: a more precise way Sequence diagram Lifeline Interaction Message State inv. Signature 22-Oct-10 INF5150 Unassailable IT-systems 20

Packages, Collaboration, Composite Structure Package Composite structure Collaboration Part Port 22-Oct-10 INF5150 Unassailable IT-systems 21

Model-time Consistency! Run validation! 22-Oct-10 INF5150 Unassailable IT-systems 22

Structure hierarchy Part type Part type 22-Oct-10 INF5150 Unassailable IT-systems 23

A State Machine defining the whole system local variables Initial State machine Decision State Transition Trigger Guard Effect 22-Oct-10 INF5150 Unassailable IT-systems 24

JavaFrame action language In principle all java can be used but we try only to use simple constructs we prefer to use Activity constructs for loops/choices etc. output (Signal, Port, csm) sends a signal through a local port. typically the signal is like new S(parm1, parm2) typically the port is like csm.tosomewhere csm is like a keyword meaning current state machine To read from the most recent consumed signal, use sig sig has been cast to the right type (normally) Example: sig.parm1 when sig is consumed as object of class S 22-Oct-10 INF5150 Unassailable IT-systems 25

Transition Effect Activity Diagram Initial Opaque Action where the name is java code Final Control flow 22-Oct-10 INF5150 Unassailable IT-systems 26

Runtime Consistency! 22-Oct-10 INF5150 Unassailable IT-systems 27

Buzzzzz 2: Refinement Assume that the semantics of the state machine are the traces that it potentially may produce (given all reasonable input from a Mobile) as positive traces and all other traces as negative. Is the state machine ICUprocess a refinement of the interaction KMLfile? Is the opposite refinement true? (that KMLfile is a refinement of ICUprocess) 22-Oct-10 INF5150 Unassailable IT-systems 28

KML: using GoogleEarth to place mobiles 22-Oct-10 INF5150 Unassailable IT-systems 29

Testing ICU0 by using the UML Testing Profile 22-Oct-10 INF5150 Unassailable IT-systems 30

Testing is A technical process Performed by experimenting with a system In a controlled environment following a specified procedure With the intent of observing one or more characteristics of the system By demonstrating the deviation of the system s actual status from the required status/specification. 22-Oct-10 INF5150 Unassailable IT-systems 31

Goals of the UML Testing Profile Definition of a testing profile to capture all information that would be needed by different test processes To allow black-box testing (i.e. at UML interfaces) of computational models in UML A testing profile based upon UML 2.0 That enables the test definition and test generation based on structural (static) and behavioral (dynamic) aspects of UML models, and That is capable of inter-operation with existing test technologies for blackbox testing Define Test purposes for computational UML models, which should be related to relevant system interfaces Test components, test configurations and test system interfaces Test cases in an implementation independent manner 22-Oct-10 INF5150 Unassailable IT-systems 32

Test Concepts: Black-Box Testing Test Case Stimulus Port Response Assignment of a Test Verdict System Under Test (SUT) 22-Oct-10 INF5150 Unassailable IT-systems 33

ICU0 test context test package imports def of system Test case Test case returns Test component System Under Test Test configuration 22-Oct-10 INF5150 Unassailable IT-systems 34

Test context and system context are similar 22-Oct-10 INF5150 Unassailable IT-systems 35

Test behavior and context behavior are similar Verdict Verdict 22-Oct-10 INF5150 Unassailable IT-systems 36

Buzzzz 3: Why both context behavior and tests? Why do we need tests when we have context behavior We do not always only want pass verdicts we could also use the neg fragments in Sequence Diagrams We may want more tests than context behaviors Tests should be explicit Identify the SUT and the Test components this distinction is not done in the context behavior sequence diagrams Clearly specify the verdicts context behaviors usually specify potential positive behaviors only 22-Oct-10 INF5150 Unassailable IT-systems 37

How to execute the tests Generated test components we could specify the behavior of the test components then compile and run the total test management system and have the tool verify the test cases by comparison Manual execution on real environment you operate the mobile phone, and observe the resulting SMSes you observe also the GoogleEarth results Disadvantage: slow procedure since you need to physically move Advantage: it is the real thing Manual execution on simulated environment FakePATS made by Frank Davidsen Advantage: quicker turn-around, easier manipulation, cheaper 22-Oct-10 INF5150 Unassailable IT-systems 38

fakepats.jar is also a stand-alone program! Bus stop Bus 37 route Tel. no. Actor Start fakepats, then application Send SMS from actor 22-Oct-10 INF5150 Unassailable IT-systems 39

The verdict of the fake mobile 22-Oct-10 INF5150 Unassailable IT-systems 40

Verdict of GoogleEarth 22-Oct-10 INF5150 Unassailable IT-systems 41

About operations and methods In order to keep the low-level java code away from the beautiful symbols of our UML models, we may want to separate some of the nitty, gritty details in out in chunks 22-Oct-10 INF5150 Unassailable IT-systems 42

We will introduce operations/methods parsepos deccoords 22-Oct-10 INF5150 Unassailable IT-systems 43

UML distinguish between operation and method parsepos the operation parsepos the method 22-Oct-10 INF5150 Unassailable IT-systems 44