11/15/10 State of the practiceState of the practice Building software pyramids 2.

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
SECOND MIDTERM REVIEW CS 580 Human Computer Interaction.
Software Modeling SWE5441 Lecture 3 Eng. Mohammed Timraz
Professor John Hosking, Dean of Engineering and Computer Science Models, Modelling, MBSE.
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Presented by: Thabet Kacem Spring Outline Contributions Introduction Proposed Approach Related Work Reconception of ADLs XTEAM Tool Chain Discussion.
ISBN Chapter 3 Describing Syntax and Semantics.
1 Semantic Description of Programming languages. 2 Static versus Dynamic Semantics n Static Semantics represents legal forms of programs that cannot be.
CS 355 – Programming Languages
Object-Oriented Analysis and Design
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
Requirements Analysis Concepts & Principles
Creating Architectural Descriptions. Outline Standardizing architectural descriptions: The IEEE has published, “Recommended Practice for Architectural.
HAS. Patterns The use of patterns is essentially the reuse of well established good ideas. A pattern is a named well understood good solution to a common.
1/31 CS 426 Senior Projects Chapter 1: What is UML? Chapter 2: What is UP? [Arlow and Neustadt, 2005] January 22, 2009.
CS 290C: Formal Models for Web Software Lecture 6: Model Driven Development for Web Software with WebML Instructor: Tevfik Bultan.
Describing Syntax and Semantics
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
End-to-End Design of Embedded Real-Time Systems Kang G. Shin Real-Time Computing Laboratory EECS Department The University of Michigan Ann Arbor, MI
Software Architecture Quality. Outline Importance of assessing software architecture Better predict the quality of the system to be built How to improve.
1 Scenario-based Analysis of UML Design Class Models Lijun Yu October 4th, 2010 Oslo, Norway.
Research in Compilers and How it Relates to Software Engineering Part III: Relation to SE Tomofumi Yuki EJCP 2015 June 22, Nancy.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
On Roles of Models in Information Systems (Arne Sølvberg) Gustavo Carvalho 26 de Agosto de 2010.
UML Unified Markup Language Ziya Karakaya Atılım University, Computer Engineering
1 IBM Software Group ® Mastering Object-Oriented Analysis and Design with UML 2.0 Module 1: Best Practices of Software Engineering.
Instructor: Peter Clarke
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
Introduction to MDA (Model Driven Architecture) CYT.
Assessing the Suitability of UML for Modeling Software Architectures Nenad Medvidovic Computer Science Department University of Southern California Los.
Effective Requirements Management – an overview Kristian Persson Field Product Manager, Telelogic Asia/Pacific.
Overview of Formal Methods. Topics Introduction and terminology FM and Software Engineering Applications of FM Propositional and Predicate Logic Program.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Model-Driven Analysis Frameworks for Embedded Systems George Edwards USC Center for Systems and Software Engineering
University of Southern California Center for Systems and Software Engineering Model-Based Software Engineering Supannika Koolmanojwong Spring 2013.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
Design Management: a Collabortive Design Solution ECMFA 2013 Montpellier, France Maged Elaasar (Presenter) Senior Software Engineer, IBM
1 Introduction to Software Engineering Lecture 1.
Review of Software Process Models Review Class 1 Software Process Models CEN 4021 Class 2 – 01/12.
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
1 pUML part 3 Precise UML Conclusions. 2 pUML part 3 5 ways for Requirements u Textual Description u Building Prototype u Axioms, mathematical u Z u UML.
Requirements Engineering Methods for Requirements Engineering Lecture-30.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
Verification of behavioural elements of UML models using B Truong, Ninh-Thuan and Souquieres, Jeanine In Proceedings of the 2005 ACM Symposium on.
Object-Oriented Software Engineering using Java, Patterns &UML. Presented by: E.S. Mbokane Department of System Development Faculty of ICT Tshwane University.
FDT Foil no 1 On Methodology from Domain to System Descriptions by Rolv Bræk NTNU Workshop on Philosophy and Applicablitiy of Formal Languages Geneve 15.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
Semantics for DSL Group Members: Ritu Arora, Diyang Chu, Zekai Demirezen, Jeff Gray, Jacob Gulotta, Luis Pedro, Arturo Sanchez, Greg Sullivan,Ximing Yu.
Chapter 3 Part II Describing Syntax and Semantics.
Semantics In Text: Chapter 3.
1-1 Software Development Objectives: Discuss the goals of software development Identify various aspects of software quality Examine two development life.
CSC480 Software Engineering Lecture 8-9 September 20, 2002.
MODEL-BASED SOFTWARE ARCHITECTURES.  Models of software are used in an increasing number of projects to handle the complexity of application domains.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Formal Specification: a Roadmap Axel van Lamsweerde published on ICSE (International Conference on Software Engineering) Jing Ai 10/28/2003.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 4 Slide 1 Software Processes.
CSCI 3428: Software Engineering Tami Meredith UML Unified Modeling Language.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
A UML-Based Pattern Specification Technique Presented by Chin-Yi Tsai IEEE TRANSACTION ON SOFTWARE ENGINEERING, VOL. 30, NO. 3, MARCH 2004 Robert B. France,
MDD-Kurs / MDA Cortex Brainware Consulting & Training GmbH Copyright © 2007 Cortex Brainware GmbH Bild 1Ver.: 1.0 How does intelligent functionality implemented.
Software Design Methodology
Model-Driven Analysis Frameworks for Embedded Systems
From Use Cases to Implementation
Presentation transcript:

11/15/10 State of the practiceState of the practice Building software pyramids 2

If software developers built pyramids … 11/15/103

“Model-Driven Engineering” (MDE) is concerned with …  reducing accidental complexities associated with bridging wide abstraction gaps  through use of technologies that support rigorous transformation of abstractions to software implementations MDE is concerned with developing software tools to support the work of software engineers 4

11/15/10 What is a model?What is a model? A (formal or informal) description of an aspect of a software-based system that may or may not exist. A model is created to serve one or more purposes. 5

11/15/10 Modeling is purpose-drivenModeling is purpose-driven  Modeling to explore problem or solution spaces  Models as sketches (informal)  Models as analyzable artifacts (formal)  Modeling to communicate aspects of problems or solutions  Models as documentation artifacts  Modeling implementations to generate code 6

Modeling and software engineering  Modeling is an essential software engineering activity  Modeling examples  Creating descriptive development documents  Creating formal specifications  Creating source code  The question is not whether or not we should model software (we’ve been doing that for decades), but how can we better leverage models during development 11/15/107

Does formal methods research subsume MDE research?  Not likely  MDE concerns go beyond describing and analyzing systems using a limited set of viewpoints  A key modeling concern: Finding the “right” abstractions - How does a modeler determine the adequacy of the abstractions used in their models?  It may be the case that abstractions that make verification easier are also good enough to support rigorous transformation to dependable code  MDE research can provide a context for FST research that emphasizes usability, i.e., research into (for example)  how formal modeling techniques can support agile development  analyzing incomplete models 11/15/108

Early focus of MDEEarly focus of MDE  Models as documentation/communication artifacts  Early work on CASE technologies laid the foundation  Verification opportunity: Checking consistency of representations  Models as artifacts for generating implementation and deployment artifacts  OMG’s work on UML and MDA  Separation of Platform Independent and Platform Specific abstractions  Software development viewed as a transformative process  Verification opportunities: Verifying correctness of transformations 9

Evolution of MDEEvolution of MDE  Supporting domain-specific software development  Supporting exploratory development through compositional modeling  Making agile development rigorous  Breathing life into models  Models as analyzable artifacts  Foundation provided by work on formal specification techniques  Models as artifacts for managing and evolving runtime behavior  11/15/1010

Early attitudes towards UML formalization  Reliance on natural language descriptions to communicate semantics  From the early UML standard: “… the state of the practice in formal specifications does not yet address some of the more difficult language issues the UML introduces”  Prevailing perception: Developing mathematically defined semantics requires significant effort with little or no perceived gain 11/15/1011

pUML: An early initiative on UML formalization  The Precise UML (pUML) group  A collaborative group of researchers formed in 1998  Core members: A. Evans, R. France, S. Kent, K. Lano, B. Rumpe  Why pUML?  Growing (mis)use of UML  Difficult to determine if understanding of UML concepts was real or apparent  Objectives of pUML initiative  Spur and encourage efforts to develop acceptable, usable formal UML semantics  Broaden awareness of benefits gained through formalization 11/15/1012

Defining Semantics “directly”Defining Semantics “directly”  Operational semantics  Focus primarily on supporting behavioral analysis (e.g., Lilius & Paltor semantics for state machine models, Kermeta)  Supports animation, simulation of behavior  Denotational semantics  For example, using metamodels to describe syntactic/semantic domains and semantic mappings  Supports mathematical reasoning about modeled properties  Axiomatic semantics  Semantics expressed in terms of logical theories and axioms (e.g., Lano & Clarke axiomatic semantics for state machines)  Supports mathematical reasoning about modeled properties 11/15/1013

Defining semantics “indirectly”Defining semantics “indirectly”  Translational approaches: Transform UML models to analyzable models expressed in a formal language  Enables use of available analysis tools (e.g., model-checking tools)  Semantics embedded in translation rules 11/15/1014

Transformation-based approaches UML Model Formal Model Formalization Rigorous Analysis static analysis dynamic analysis feedback UML MetamodelFormal Language Metamodel based on conforms to 11/15/1015

Using Base Semantic ModelsUsing Base Semantic Models Formal Model Formalization Rigorous Analysis static analysis dynamic analysis feedback Base Operational Semantics Operational Semantics verified using semantic mapping UML Model bisimulation relation 11/15/1016

Enhanced use of Base Semantic Models Base UML Semantic Model Base UML Structural Semantic Model Base UML untimed Behavioral Semantic Model Conforms to Supports translation to static analysis tools, e.g., Alloy, Z Supports translation to behavioral analysis tools, e.g., Promela/SPIN Base UML timed Behavioral Semantic Model Supports translation to timing analysis tools, Conforms to 11/15/1017

Tooling  Need for both lightweight and heavyweight tool-supported analysis techniques  Structural analysis tools  USE, OCLE  Behavioral analysis tools  vUML, tools that model-check state machine and interaction models, Kermeta  SUDA: Scenario-based UML design analysis  Testing executable models: UMLAnT (a tool for animating and testing detailed UML design class models) 11/15/1018

The way aheadThe way ahead  Many opportunities for applying formal verification techniques in the MDE context  Supporting lightweight and heavyweight analysis of models (lower hanging fruit)  Supporting use of domain-specific languages  Verifying the correctness of model transformations  Runtime verification of model adaptations at runtime  Observation: Different analysis techniques target different properties. Need to support different types of semantic analyses  Promising approaches: FIACRE, the system model approach developed by the UML Semantic Project team  Generic Model of Computation (GeMOC) Initiative  Need to capture usable semantics in profiles  Promising approaches: work on encapsulating operational semantics in profiles by S. Gerard’s team at CEA 11/15/1019

Focus questions - 1Focus questions - 1  Can we raise the level of abstraction in design? Yes, but developers/students find modeling above the code level difficult  Is MDE an “effective” way of gaining an audience for verification? Yes; there are many modeling problems that can benefit from work on formal verification  How does modeling impact usable verification? Choice of abstractions can ease or complicate rigorous verification 11/15/1020

Focus questions - 2Focus questions - 2  How do verification tools make modeling more effective? Provides developers with feedback on the adequacy and fidelity of their models  How can verification technology reshape the design modeling lifecycle? There will be some “reshaping”, but a more pertinent question is how to adapt verification technologies to better cope with incompleteness and highly-adapatable design processes 11/15/1021

11/15/10 Modeling aptitudeModeling aptitude  We need to understand why Johnny can’t model and Jane can  Hypothesis: A good modeler is a good programmer; a good programmer is not always a good modeler  Modeling requires programming and abstraction skills  Abstraction skills refine programming language skills  Programs produced by developers with good abstraction skills should be of significantly better quality 22

…and that’s how one can effectively use bisimulation to … He lost me after he introduced himself … 11/15/1023

Supplemental SlidesSupplemental Slides 11/15/1024

pUML perspective: Why formalize UML semantics?  Identify completeness, consistency, ambiguity problems in language definition  Provide a basis for checking consistency across models consisting of heterogeneous views (i.e., views described using different notations)  Support rigorous analysis of UML models  Support rigorous manipulation of UML models  Support development of “intelligent” model development tool environments 11/15/1025

pUML perspective: Defining semantics  Denotational view of semantics  Semantics of a language is defined by a formal mapping from well-defined elements in a syntactic domain to well-defined elements in a semantic domain  Provide support for using the UML as a formal modeling language  Supporting diagrammatic “proofs” 11/15/1026

11/15/10 Why is modeling difficult? Or why modeling seems to add accidental complexity  Lack of good tool support  Many existing modeling tools do introduce significant accidental complexity  Dissatisfaction with current technologies should not be used as the basis for dismissing MDE  Learning how to abstract is difficult  Current software development methods provide little or no abstraction guidelines 27

Are you a good modeler?Are you a good modeler?  How do you decompose a problem or solution?  Structure should provide significant insights or enable useful formal analysis  How do you determine what information should or should not be in a model and what level of abstraction is appropriate?  How do you determine if the abstractions you use are “fit-for-purpose”?  If you have answers that involve systematic application of abstraction principles write a paper for SoSyM! 11/15/1028

Early attempts at providing support for analyzing OO models  Methods integration  Transforming “informal” models to tool-supported formal specifications (e.g., Fusion-to-Z, UML-to-ASMs)  OO-extended formal specification languages  Extending non-OO formal specification languages with OO concepts (e.g., Z++, Object-Z, Maude)  Supplemental formal notation  Provide a formal language that modelers can use to formally describe properties (e.g., Syntropy)  Note: This is different than providing a semantics for a modeling language 11/15/1029

30 UML Structural Analysis ToolsUML Structural Analysis Tools  Analysis tools such as USE and OCLE can be used to statically analyze Class Models  Given an object diagram, these tools can check whether it has structural properties specified in class models  LIMITATION: Current tools restricted to analyzing static structural properties 11/15/10

31 Static analysis of class models using USE/OCLE class model with constraints instance diagram Characterizes valid application states Describes an application state analysis results references USE/OCLE 11/15/1031

Supporting lightweight analysis of behavior  Evaluate design model by checking whether scenarios describing legal and illegal behavior are allowed or disallowed in model 1.Verifier produces scenarios of illegal and legal behavior 2.Verifier uses the scenario-based analysis technique to evaluate design  Approach described in MODELS 2008 paper by L. Yu et al. 11/15/1032

33 Approach application model Snapshot Model Characterizes valid snapshots and specifies class operations Characterizes valid sequences of snapshots Scenario Object Model Describes a sequence of application states :Bank U s e r :Contr o l l e r toAcco u n t :Accou n t transfer(…) withdraw(…) deposit(…) fromAccount:Ac count Describes scenario to be analyzed USE/OCL E 11/15/10

34 Snapshot Model 11/15/10

35 Approach application model Snapshot Model Characterizes valid snapshots and specifies class operations Characterizes valid sequences of snapshots Scenario Object Model Describes a sequence of application states :Bank U s e r :Contr o l l e r toAcco u n t :Accou n t transfer(…) withdraw(…) deposit(…) fromAccount:Ac count Describes scenario to be analyzed USE/OCL E 11/15/10

36 Scenarios  Created by a verifier  Reflects verifier’s understanding of the design  Described using annotated sequence diagrams  Java-like Action Language (JAL) used to describe operations invoked in scenario  Two types of scenarios  Good/legal scenario: describes a desirable behavior  Bad/illegal scenario: describes undesirable behavior 11/15/10

Generating Snapshot SequencesGenerating Snapshot Sequences  JAL-annotated sequence models are interpreted using UMLAnT  Alternative:  Treat snapshot sequence generation as a constraint solving problem  JAL models converted to Alloy  The trace of object states produced is used to build the Scenario Object Model 37 11/15/1037

Example scenarioExample scenario  In an RBAC banking environment an administrator assigns the user Bob to two conflicting roles: the Accountant and Senior Cashier roles  The above is a bad scenario 38 11/15/1038

39 11/15/1039

40 Analyze behavioral propertiesAnalyze behavioral properties  Analyze scenarios using USE or OCLE against  Snapshot model  Snapshot invariants  Scenario specific invariants 11/15/1040

Generating the Snapshot Model: A simple example 1.Generate Snapshot class diagram structure 2.Generate Snapshot Model invariants from operation specifications 41 11/15/1041

42 Partial HRBAC application model 11/15/1042

43 11/15/1043

Generating the Snapshot ModelGenerating the Snapshot Model 1.Generate Snapshot Class Diagram 2.Generate Snapshot Model invariants from operation specifications 44 11/15/1044

45 An operation specificationAn operation specification // pre- and post- conditions of the Assign method context User::Assign(role:Role) pre : self.userRoles->forAll(r | r.name <> role.name) //role is not currently assigned to the user post : self.userRoles->exists(r | r.name = role.name) and | self.userRoles->exists(r2 | r1.name = r2.name)) and (self.userRoles->size() = + 1) //role is assigned to user 11/15/1045

context User_Assign_Transition //From Assign() pre-condition before.users->includes(userPre) and before.roles->includes(rPre) and userPre.userRoles-> forAll(r | r.name <> rPre.name) and //From Assign() post-condition after.users->includes(userPost) and after.roles->includes(rPost) and userPost.userRoles-> exists(r | r.name = rPost.name) and userPre.userRoles-> forAll(r1|userPre.userRoles-> exists(r2 | r1.name = r2.name)) and userPost.assignedRoles->size() = userPre.userRoles->size() + 1 and after.users -> excluding(userPost) = before.users->excluding(userPre) and after.roles = before.roles and after.sessions = before.sessions and after.admin = before.admin 46 context User::Assign(role:Role) pre: self.userRoles->forAll(r | r.name <> role.name) //role is not currently assigned to the user post: self.userRoles->exists(r | r.name = role.name) and | self.userRoles->exists(r2 | r1.name = r2.name)) and (self.userRoles->size() = + 1) //role is assigned to user 11/15/1046

Scenario Object Model Example 47 11/15/1047