lecture 1 introduction
play

Lecture 1: Introduction 2015-10-20 Prof. Dr. Andreas Podelski, Dr. - PDF document

Software Design, Modelling and Analysis in UML Lecture 1: Introduction 2015-10-20 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal 1 2015-10-20 main Albert-Ludwigs-Universit at Freiburg, Germany Motivation and Context 1


  1. Software Design, Modelling and Analysis in UML Lecture 1: Introduction 2015-10-20 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal – 1 – 2015-10-20 – main – Albert-Ludwigs-Universit¨ at Freiburg, Germany Motivation and Context – 1 – 2015-10-20 – main – 2 /36

  2. Recall: Model Definition. [Folk] A model is an abstract, formal, mathematical representation or description of structure or behaviour of a (software) system. Definition. (Glinz, 2008, 425) A model is a concrete or mental image (Abbild) of something or a concrete or mental archetype (Vorbild) for something. Three properties are constituent: (i) the image attribute (Abbildungsmerkmal), i.e. there is an entity (called original) whose image or archetype the model is, – 1 – 2015-10-20 – Smotivation – (ii) the reduction attribute (Verk¨ urzungsmerkmal), i.e. only those attributes of the original that are relevant in the modelling context are represented, (iii) the pragmatic attribute, i.e. the model is built in a specific context for a specific purpose. 5 /36

  3. One Software Modelling Language: UML (OMG, 2011b, 694) OCL Diagram Structure Behavior Diagram Diagram Component Object Activity Use Case State Machine Class Diagram Diagram Diagram Diagram Diagram Diagram Composite Deployment Package Interaction Structure Diagram Diagram Diagram Diagram Interaction Profile Diagram Sequence Overview Diagram – 1 – 2015-10-20 – Smotivation – Diagram Communication Timing Diagram Diagram Dobing and Parsons (2006) 8 /36 (Our) Premises for Using a Software Modelling Language (i) We want to know D : C x : Int how the words of the language look like : Syntax . E/ s 3 (In UML: when is a diagram a proper state machine?) – 1 – 2015-10-20 – Smotivation – 9 /36

  4. (Our) Premises for Using a Software Modelling Language E/ ✘ (i) We want to know D : C x : Int how the words of the language look like : Syntax . s 3 (In UML: when is a diagram a proper state machine?) – 1 – 2015-10-20 – Smotivation – 9 /36 (Our) Premises for Using a Software Modelling Language ✘ (i) We want to know D : C x : Int how the words of the language look like : Syntax . E/ s 3 (In UML: when is a diagram a proper state machine?) (ii) We want to know • s 1 • E/ what a word of the language means : Semantics . • s 5 s 2 (In UML: can sending event E and then G kill the object?) • E/ s 3 F/ s 6 s 8 G/ → then we can formally analyse the model, e.g., F/ s 4 prove that the design satisfies the requirements, simulate the model, automatically generate test cases, [ true ] / generate code, etc. F/ s 7 – 1 – 2015-10-20 – Smotivation – • UML is sometimes (neutrally, or as offence) called “semi-formal” : the UML standard OMG (2011a,b) is strong on (i), but weak(er) on (ii). (“the diagram is self-explanatory”, “everybody understands the diagram” — No.) • In the lecture : study the (!) syntax , define one (!) semantics . 9 /36

  5. Our? Floorplan Modes! Sketch : Blueprint : Program : wiringplan + + windows + ... With UML it’s the same [ http://martinfowler.com/bliki ] : – 1 – 2015-10-20 – Smotivation – “[...] people differ about what should be in the UML be- Khoshnevis (2004) cause there are differing fundamental views about what the UML should be . So when someone else’s view of the UML seems rather different to yours, it may be because they use a different UmlMode to you.” 10 /36 Our? Floorplan Modes! Sketch : Blueprint : Program : Sketch Blueprint Programming Language In this UmlMode developers use [...] In forward engineering the If you can detail the UML the UML to help communicate idea is that blueprints are devel- enough, and provide semantics some aspects of a system. [...] oped by a designer whose job is for everything you need in soft- to build a detailed design for a ware, you can make the UML be Sketches are also useful in doc- programmer to code up. your programming language. uments, in which case the focus That design should be suffi- Tools can take the UML di- is communication ra- ther than ciently complete that all design agrams you draw and compile completeness. [...] wiringplan + + decisions are laid out and the them into executable code. windows The tools used for sketching are programming should follow as The promise of this is that UML + lightweight drawing tools and of- a pretty straightforward activity ... is a higher level language and ten people aren’t too particular that requires little thought. [...] thus more productive than cur- about keeping to every strict rule Blueprints require much more rent programming languages. of the UML. sophisticated tools than sketches With UML it’s the same [ http://martinfowler.com/bliki ] : – 1 – 2015-10-20 – Smotivation – Most UML diagrams shown in order to handle the details re- The question, of course, is in books, such as mine, are quired for the task. [...] whether this promise is true. “[...] people differ about what should be in the UML be- Khoshnevis (2004) sketches. Their emphasis is on Forward engineering tools sup- I don’t believe that graphical cause there are differing fundamental views about what selective communication rather port diagram drawing and back than complete specification. programming will succeed just the UML should be . it up with a repository to hold because it’s graphical. [...] Hence my sound-bite “compre- the information. [...] So when someone else’s view of the UML seems rather hensiveness is the enemy of com- different to yours, it may be because they use a different prehensibility” UmlMode to you.” 10 /36

  6. UML-Mode of the Course The “mode” fitting the lecture best is AsBlueprint . Aim of the Course : • show that UML can be precise — to avoid misunderstandings . • allow formal analysis of models on the design level — to find errors early . • be consistent with (informal semantics in) OMG (2011b) as far as possible. Side Effects : After the course, you should. . . • have a good working knowledge of UML, – 1 – 2015-10-20 – Smotivation – • have a good working knowledge of software modelling, • be able to efficiently and effectively work in AsSketch mode, • be able to define your own UML semantics for your context/purpose, or define your own Domain Specific Languages as needed. 11 /36 The Lecture: Content and Non-Content – 1 – 2015-10-20 – main – 12 /36

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend