The rcos Modeler. ICTAC Summer School 2013 ECNU, Shanghai, China. Volker Stolz, Zhiming Liu. Friday, August 30, 13

Similar documents
Computation Independent Model (CIM): Platform Independent Model (PIM): Platform Specific Model (PSM): Implementation Specific Model (ISM):

Model driven Engineering & Model driven Architecture

Introduction to MDE and Model Transformation

Enabling Component-Based Model Transformations with QVT. Li Dan

Model Driven Engineering (MDE)

MDA Driven xuml Plug-in for JAVA

MDA and Integration of Legacy Systems: An Industrial Case Study

BLU AGE 2009 Edition Agile Model Transformation

Model Driven Development Unified Modeling Language (UML)

CoCoME Team Presentation rcos Relational Calculus of Object- and Component-based Systems

Executive Summary. Round Trip Engineering of Space Systems. Change Log. Executive Summary. Visas

Software Engineering with Objects and Components Open Issues and Course Summary

Overview of the KeY System

QoS-aware model-driven SOA using SoaML

Transforming UML Collaborating Statecharts for Verification and Simulation

Part II. Hoare Logic and Program Verification. Why specify programs? Specification and Verification. Code Verification. Why verify programs?

The Model Driven Architecture. Dennis Wagelaar Viviane Jonckers Software Languages Lab

3rd Lecture Languages for information modeling

MDD with OMG Standards MOF, OCL, QVT & Graph Transformations

!MDA$based*Teaching*and* Research*in*Software*Engineering*!

The UML Extension Mechanisms

Model Querying with Graphical Notation of QVT Relations

Design of Embedded Systems

02291: System Integration

MDSE USE CASES. Chapter #3

An Introduction to Model Driven Engineering (MDE) Bahman Zamani, Ph.D. bahmanzamani.com

The Unified Modelling Language. Example Diagrams. Notation vs. Methodology. UML and Meta Modelling

Overview of lectures today and Wednesday

Dresden OCL2 in MOFLON

Distributed Systems Programming (F21DS1) Formal Verification

Orthographic Software Modeling A Practical Approach to View Based Development

PisaTel Meeting Roma, 29 novembre 2007

UML for Global Computing Lecture 3: Property-Driven Development

09. Component-Level Design

Towards 2D Traceability

Dr. Klaus Fischer. Multiagent Systems Group DFKI GmbH Saarbrücken, Germany ICAART

How to Harvest Reusable Components in Existing Software. Nikolai Mansurov Chief Scientist & Architect

SysML Past, Present, and Future. J.D. Baker Sparx Systems Ambassador Sparx Systems Pty Ltd

bahmanzamani.com Computer Engineering i Dept. University of Isfahan

Handling Integer Arithmetic in the Verification of Java Programs

Advances in Programming Languages

Introduction to Dependable Systems: Meta-modeling and modeldriven

Unified Modeling Language (UML)

Requirements and Design Overview

An integrated framework for automated simulation of SysML models using DEVS

Model transformations. Overview of DSLE. Model transformations. Model transformations. The 4-layer architecture

From a Specification Level PIM to a Design Level PIM in the Context of Software Radios

Design Analysis Method for Multidisciplinary Complex Product using SysML

Model Driven Engineering

Verifying Java Programs Verifying Java Programs with KeY

Modellierung operationaler Aspekte von Systemarchitekturen. Master Thesis presentation. October 2005 March Mirko Bleyh - Medieninformatik

MDA & Semantic Web Services Integrating SWSF & OWL with ODM

Defining Domain-Specific Modeling Languages

What Is UML? The Goals and Features of UML. Overview. The goals of UML

Softwaretechnik. Lecture 08: Testing and Debugging Overview. Peter Thiemann SS University of Freiburg, Germany

Activities Common to Software Projects. Software Life Cycle. Activities Common to Software Projects. Activities Common to Software Projects

Flight Systems are Cyber-Physical Systems

Foundations of a New Software Engineering Method for Real-time Systems

OMG Workshop MDA. Tool Chains for MDA? Let's consider leaving our tool chains behind us.

Comparative analyses for the performance of Rational Rose and Visio in software engineering teaching

ITBIS393 Web-Based Information Systems

SCENARIO-BASED REQUIREMENTS MODELLING

RIGOROUSLY AUTOMATING TRANSFORMATIONS OF UML BEHAVIOR MODELS

CHAPTER 1. Topic: UML Overview. CHAPTER 1: Topic 1. Topic: UML Overview

Index. business modeling syntax 181 business process modeling 57 business rule 40

UNIT I. 3. Write a short notes on process view of 4+1 architecture. 4. Why is object-oriented approach superior to procedural approach?

Softwaretechnik. Lecture 08: Testing and Debugging Overview. Peter Thiemann SS University of Freiburg, Germany

Model Abstraction versus Model to Text Transformation

Chapter 7. Modular Refactoring. 7.1 Introduction to Modular Refactoring

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University

Modelling in Enterprise Architecture. MSc Business Information Systems

Object-Oriented Design

UNIT II. Syllabus. a. An Overview of the UML: Visualizing, Specifying, Constructing, Documenting

Lecture 05 ( ) High-Level Design with SysML. Systeme hoher Qualität und Sicherheit Universität Bremen WS 2015/2016

AUTOMATED BEHAVIOUR REFINEMENT USING INTERACTION PATTERNS

Automation of Semantic Web based Digital Library using Unified Modeling Language Minal Bhise 1 1

ACM Technical Solution Architecture - Development and Deployment of ACM Solutions- ECM Fast Start Workshop 1Q2011

Science of Computer Programming. Aspect-oriented model-driven skeleton code generation: A graph-based transformation approach

What's New in UML 2.0

16 Evaluation Framework for Model-Driven Product Line Engineering Tools

OO Analysis and Design with UML 2 and UP

A Model-driven approach to NLP programming with UIMA

CSSE 490 Model-Based Software Engineering: Transformation Systems

Dafny: An Automatic Program Verifier for Functional Correctness Paper by K. Rustan M. Leino (Microsoft Research)

CISC836: Models in Software Development: Methods, Techniques and Tools

challenges in domain-specific modeling raphaël mannadiar august 27, 2009

Lecture 11 Lecture 11 Nov 5, 2014

* Corresponding Author

Research Paper on Implementation of OCL Constraints in JAVA

A Metamodel independent approach for Conflict Detection to support distributed development in MDE. Mostafa Pordel A THESIS

developer.* The Independent Magazine for Software Professionals

CITS5501 Software Testing and Quality Assurance Formal methods

The Model Driven (R)evolution. Richard Mark Soley, Ph.D. Chairman and CEO Object Management Group, Inc.

Model Driven Development of Component Centric Applications

CS560: Formal Modelling and Implementation of Systems (Term II) Lecture: CASE A. O Riordan, 2009.

ADT: Eclipse development tools for ATL

Modelling with Relational Calculus of Object and Component Systems - rcos

Methods for the Development

M B S E. Model Transformations in Model-Based Systems Engineering. Chris Paredis Associate Director. Model-Based Systems Engineering Center

A (Very) Short Introduction to Model-Driven Development (MDD)

Transcription:

The rcos Modeler ICTAC Summer School 2013 ECNU, Shanghai, China Volker Stolz, Zhiming Liu

Benefits of Modeling Given the right models, we get for free: executable program user interfaces test cases (model-based testing) simulation verification

More Traditional Modeling UML class diagrams (boring) Components / Deployment Sequence diagrams / state machines (behaviour - now we are talking!) (Software) Product Lines: models of customization

More Traditional Modeling UML class diagrams (boring) Components / Deployment Sequence diagrams / state machines (behaviour - now we are talking!) (Software) Product Lines: models of customization

More Traditional Modeling UML class diagrams (boring) Components / Deployment Sequence diagrams / state machines (behaviour - now we are talking!) (Software) Product Lines: models of customization

More Traditional Modeling UML class diagrams (boring) Components / Deployment Sequence diagrams / state machines (behaviour - now we are talking!) (Software) Product Lines: models of customization

Level of abstraction Publication Contract Design Implementation Hierarchy of components Multi-view Interaction Diagram State Machine Diagram Class Diagrams Functionality Specification 4

Modeling Levels: OMG Platform independent model PIM-to-PSM: 50-70% automation CORBA, RMI,... Platform specific model PSM-to-code: full automation Java, C++,... Executable code 5

PIM: sub-divisions PIM Component Model Components Comp. sequence diagrams Composition/deployment Design Model Object (sequence) diagrams OO designs (executable) Requirements Model Class model Contracts (relational functionality specification) Dynamic behaviour (state machine, sequence diagram) 6

PIM: sub-divisions PIM Component Model Components Composition/deployment Comp. sequence diagrams Design Model Object (sequence) diagrams OO designs Requirements Model Incremental change Class model Contracts (relational functionality specification) Dynamic behaviour (state machine, sequence diagram) 7

PIM: sub-divisions PIM Component Model Incremental change Design Model Components Composition/deployment Comp. sequence diagrams Object (sequence) diagrams OO designs Requirements Model Class model Contracts (relational functionality specification) Dynamic behaviour (state machine, sequence diagram) 7

PIM: sub-divisions PIM Component Model Incremental change Design Model Components Composition/deployment Comp. sequence diagrams Object (sequence) Revising design diagrams OO designs decisions costly! Requirements Model Class model Contracts (relational functionality specification) Dynamic behaviour (state machine, sequence diagram) 7

Cost of Fixing Defects Relative cost 30 Requirements Architecture Construction System Test Post-Release Phase detected 22.5 15 7.5 0 Phase introduced: Requirements Architecture Construction Source: McConnell, Code Complete, Microsoft Press, 2004 8

Cost of Fixing Defects Relative cost 30 22.5 Requirements Architecture Construction System Test Post-Release Can we reduce the cost of change? Phase detected 15 7.5 0 Phase introduced: Requirements Architecture Construction Source: McConnell, Code Complete, Microsoft Press, 2004 8

Model Transformations In general: not necessarily applied to software engineering mathematical/algebraical different underlying formalisms, e.g.: triple graph grammars (by A.Schürr 94) imperative (Kermeta, 05) hybrid imperative/declarative (ATL 05, smartqvt 07) lowest level: XSLT/XQuery 9

Simple Transformations Model-to-Code: UML class diagrams to Java/C++ skeletons Test-case generation Verification (CSP, SPIN, SAT-solvers) Model-to-Model: Refactorings on UML class diagrams UML sequence diagrams state machines 10

Standards and Tool Support OMG standardised QVT transformation language (relational vs. operational) Software Engineering community standardises on UML Model interchange standardised on XMI Modeling supported by major tools: IBM Rational, Eclipse EMF/UML, MagicDraw 11

Modeling Languages UML (mostly static structure) rcos (OO, specification) Creol/ABS (OO, active objects) VDM/Overture JCSP (CSP for Java) 12

Modeling Languages UML (mostly static structure) rcos (OO, specification) Creol/ABS (OO, active objects) VDM/Overture JCSP (CSP for Java) Only UML and rcos use XMI: Interchange with other UML tools. All others: text files. 12

The Code is the Model(?) Problem: connection model code Generated code may need manual modifications. Solutions: add annotations to code (Frameworks like Spring,...) Round-trip engineering support (difficult/fragile, e.g. NetBeans) 13

Modeling: Static View Model developed once Then, processed for various consumers model T1 T2 T3 code testcases verifier input Very static view of development! 14

Modeling: Static View Model developed once Then, processed for various consumers model SPL Product T1 T2 T3 code test... code testcases verifier input Very static view of development! 14

But where s the Process? Different developers collaborate Different modeling levels/views Intermediate models for back-ends Models evolve over time (also: versioning) 15

Intermediate Models Initial model Refinement r. model testcases... code abs. model verifier input Models need to be refined/abstracted, leading to intermediate models! 16

Intermediate Models Initial model Refinement r. model testcases... code abs. model verifier input Models need to be refined/abstracted, leading to intermediate models! 16

rcos Language/Modeler Making software engineering easier: Multi-view specifications: different views for different roles Refinement of designs: correct-by-construction editing steps Verification/Testing part of the process 17

Use case = Structure + Behaviour Use case-driven Component-based Model-driven (based on UML) Multi-View Specification Verification Testing Code generation 18

Multi-View Specification Different views for different tasks: Sequence diagrams for customer State machine for internal state change Consistency check required 19

Component Model Substitutability Hierarchical composition Design-by-Contract Compatibility check required! (slight differences to UML) 20

Behaviour Functional Correctness Behaviour specification is not enough Also need to be able to specify computation Specification-level: Pre/Post (Hoare), OCL Executable level: sequence of destructive updates (C, Java,...) Tools should support both levels for verification (usually: bolted on, e.g. JML) 21

Refinement Refinement steps......make program more concrete...preserve semantics Simple refinement vs. custom step Former: correct-by-construction Latter: need additional verification create proof obligation (MDD!) 22

rcos: Theoretical Foundation Relational calculus and semantics based on Hoare & He s Unifying Theories of Programming [TCS06] Refinement calculus for both functional refinement and structure refinement [ibid.] Support analysis, design, refactoring and code generation [ICTAC05] rcos methodology for Soft.Eng. [ISoLA06, FCSC12]

Example: Expert Pattern Cashdesk::finishSale() { [ sale null sale.complete' = true]; var double sum; sum 0; for (LineItem l : sale.lines) { [ sum' = sum + l.subtotal] }; [ sale.total' = sum]; end sum } 24 Cashdesk::finishSale() {[ sale null sale.finishsale() ]} Sale::finishSale() { [ complete' = true]; var double sum; sum := 0; for (LineItem l : lines) { [ sum' = sum + l.subtotal] }; [ total' = sum]; end sum }

Model Transformations Design Patterns provide standard solutions to common tasks Transformations......automate patterns...refine the design...reduce manual development Need to be correctnesspreserving, track proof obligations [Morisset, 2011] Increasing detail Func. Spec. OO Model Time Components Increasing views [UML&FM 09/J.ISSE] 25

Model Transformations Design Patterns provide standard solutions to common tasks Transformations......automate patterns...refine the design...reduce manual development Need to be correctnesspreserving, track proof obligations [Morisset, 2011] Increasing detail Refinement Func. Spec. OO Model Time Components Increasing views [UML&FM 09/J.ISSE] 25

Model Transformations Design Patterns provide standard solutions to common tasks Transformations......automate patterns...refine the design...reduce manual development Need to be correctnesspreserving, track proof obligations [Morisset, 2011] Increasing detail Refinement Func. Spec. Transform OO Model Time Components Increasing views [UML&FM 09/J.ISSE] 25

Model Transformations Design Patterns provide standard solutions to common tasks Transformations......automate patterns...refine the design...reduce manual development Need to be correctnesspreserving, track proof obligations [Morisset, 2011] Increasing detail Refinement Func. Spec. OO Model Time Transform Components Increasing views [UML&FM 09/J.ISSE] 25

PIM: sub-divisions PIM Component Model Components Comp. sequence diagrams Composition/deployment Design Model Object (sequence) diagrams OO designs (executable) Requirements Model Class model Contracts (relational functionality specification) Dynamic behaviour (state machine, sequence diagram) 26

OO-to-CSD Design process for object interactions (FACS 11) Instead of writing interaction (a.k.a. method calls ) in OO-code, use sequence diagrams Advantage: objects visible Assign objects to components interactively 27

Summary Models are good for you: formal meaning (contracts) their design clarifies intention automatic processing model transformations reduce costs

Trying out rcos Eclipse Helios rcos Eclipse update site: http://rcos.iist.unu.edu/eclipse/ Download the example models TOPCASED 29