SE310 Analysis and Design of Software Systems
Standard Design Chart Types and Notation Review and Overview
February 23, 2020 Sam Siewert Spiral Model for 6-8 weeks
Level-0 – First turn through spiral, ends with scrum Level-1 – Second turn, ends with scrum (internal review) Level-2 – Third turn, ends with public walk-through Level-3-4 – Complete models and/or prototype code, inspection Presentation of Level-1 for PDR, Level-3 for CDR Always complete one more level of detail than you are presenting
Spiral includes: 1. Specification (requirements analysis) – based on level above 2. Design – to corresponding level 3. Construction – exploratory code, simulations, proof-of-concept, mock-ups, prototypes as ready 4. Compliance – Unit, I&T, System, Acceptance
Sam Siewert 2 Level 0 - Analysis
From Concept to Analysis prior to Architecture – Goals - Why you chose project – Objectives - What you want it to do – Scope - What is in, what is out
Requirements – First Cut, Reviewed, Revised
Use Cases - Reviewed, Revised
Tracing of UC to Requirements
CRC – Class Responsibility Collaborator Model (Draft)
Sam Siewert 3 Level 1 - CRC Domain Model From Analysis to Architecture prior to System Design
Requirements – Refinement based on L0 Reviews
Use Cases – Refinement and Acceptance Tests
Major Components (Modules) and Component, Package, Deployment Diagrams
Class Diagram – Methods and Attribute Refinement with Emphasis on Relationships – Association (1…*, 1…1, 0…n, *…*) – Inheritance (Sub-class refines parent class attributes and methods) – Container (Class contains class or classes) – Aggregation (Class comprises part of another class)
OIM Sequence Diagrams – First Cut with classes – Class instantiation and methods for objects to communicate, synchronize and complete a UC – Positive and Negative – Focus on Positive – Supports further Class method refinement – Defines Processing Sam Siewert 4 Level 2 – Domain Class Diagrams From Architecture to System Design prior to Module Design – What Comprises the System – Consistency and Completeness – How Does the System Behave?
Requirements – Refinement based on L0/L1 Reviews
Use Cases – Refinement, Testing
Class Diagram – Complete to Support all OIM Behavior Models – Complete Attributes (Built-in and Extended Types) – Complete Methods – Happy Path and Error Recovery first (stubbed bodies)
OIM Sequence Diagrams – Refinement for Objects (Positive, Negative) – Class instantiation and methods for objects to communicate, synchronize and complete a UC – Positive and Negative – Focus on Negative (Sequences that should NOT happen) – Supports further Class method refinement – Defines Error Handling
Sam Siewert 5 Level 3-4 – Sub-system Module Design From System Design to Sub-systems and Modules – prior to or concurrent with Prototypes and Mock-ups – Cohesion and Coupling, Component (Module) Diagrams and Deployment
Requirements – Refinement based on L0/L1/L2 Reviews
Use Cases – Refinement and Integration & Test, cross with req’ts
Class Diagram – Validate and Verify with Code Gen and Stubs – Code to Design and Design to Code – Instantiate and Test all Classes (Other than Pure Virtual) – Explicit Constructors and Destructors – Add methods and test for Level-4
OIM Sequence Diagrams – Complete and Test (as Possible) – Refine Positive and Negative – Exhaustive Tests (if Simulation Available) and Neg/Pos Tests
Module Behavioral Design – Activity Diagrams (Flow-chart and Concurrent) – State Machines – Prototypes and Mock-Ups Sam Siewert 6 System Block Diagram Simple Interfacing between Major Hardware and Software Elements (Components or Subsystems) with User Interaction Shown E.g. CU Boulder Space Grant DATA-CHASER Mission (STS-85)
Sam Siewert 7 Payload Operations Requirements 1. The Embedded System shall Operate 3 Instruments (LASIT, SXEE, FARUS) According to a Scheduled Observing Plan of the Sun within STS Imposed Viewing and Operation Constraints 2. The Health & Status of Each Instrument shall be Reported to the Ground Continuously at no less than 1 Hz 3. Science Data Collected by Each Instrument shall be Streamed to the Ground While an Instrument is Observing 4. Observing Plan Updates must be Uplinked from the Ground Systems as Command(s) with Response 5. Commands to Operate Instruments Interactively must be Uplinked from the Ground and Status Indication Response Will be Provided 6. The Embedded System must Interface to Low-Rate Uplink and Downlink interfaces on STS for Command/Response, and H&S Telemetry Streaming 7. The Ground Software at GSFC must Interface to the ACCESS LRDU 8. Telemetry must be Stored in a Time-stamped Database 9. A HMI GUI must Display H&S Telemetry at GSFC and Provide a Command/Response Interface 10. GSFC Ground Systems must Host a Planning and Operations Rules and Constraints Database and Engine 11. GSFC Ground Systems must Host H&S Telemetry Monitoring to Detect Anomalous Behavior to Generate Alerts for the HMI/GUI 12. A Data Bridge Between GSFC Ground Systems and CU Boulder must Provide a Command/Response and H&S Telemetry Network Interface 13. CU Boulder Ground Systems must Interface an Automated Planning and Scheduling Software Application and Allow it to Generate Uplink Commands to Modify or Replace the Current Embedded System Observing Plan 14. The CU Boulder Ground Systems must Provide and HMI/GUI for H&S Telemetry, Command/Response and Automated Planning and Scheduling 15. A CU Boulder to NASA JPL Data Bridge must Provide H&S Telemetry for Beacon Monitoring to NASA JPL for Display on a High Level Status HMI/GUI Sam Siewert Constraint related to requirement 8 Application Block Diagram
Hardware shows standard platform(s), Software, and User Interaction Label Interface Dataflow and Protocols E.g. Contacts App on AOS
App Android App HCI
Java & C++ AOS methods SQLite AOS v X.Y Android Debug Bridge SQL ADB NDK (USB) Debugger
Smart Phone
Sam Siewert 9 System of Systems Block Diagram Complex Systems that are Systems of Systems or Integration of Subsystems that can also stand alone (E.g. Drone Net) E.g. IEEE SOSE (Drone Net IEEE Aerospace - presentation, paper)
Sam Siewert 10 Block Diagram Resources
There is no standard for Block Diagrams
Traditional Engineering Diagram that is Interdisciplinary
SysML - An Extension to UML for Systems
http://www.omgsysml.org/
https://en.wikipedia.org/wiki/Block_diagram
Sam Siewert 11 Traditional SA/SD – Useful, But Not OO
Data Flow Diagrams – Stores, Flows, Processes, External Entities Data [Messages] Between Processes and is Transformed - Related http://en.wikipedia.org/wiki/Data_flow_diagram Control Flow Diagrams
Entity Relationship Diagrams – Lacks Operations, but Defines Entities [Objects] and Relationships http://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model State Machines [used in UML, but Typically for Each Process in DFD]
Flow-Charts, Control Flow Graphs – Detailed http://en.wikipedia.org/wiki/Finite-state_machine Procedural Design [Interaction, Logic] http://en.wikipedia.org/wiki/Flowchart Sam Siewert 12 Flowchart - SA/SD
ISO 5807:1985
Procedural http://flowgorit hm.org/ https://code2fl ow.com/ http://raptor.m artincarlisle.co m/ https://en.wikipedia.org/wiki/Flowchart Sam Siewert 13 DFD - Data Flow Diagram
DeMarco, Tom. "Structure analysis and system specification." Pioneers and Their Contributions to Software Engineering. Springer, Berlin, Heidelberg, 1979. 255-288.
Data transformation https://en.wikipedia.org/wiki/Data_flow_diagram Smart Draw DFD DFD - Easy to Understand, Natural for Transformation Architectures, Simple notation, https://www.draw.io/ Function (Process) abstraction, Can be leveled (DFDs compose Function or Process at a higher level)
Sam Siewert 14 ERD - Entity Relationship Diagram [Database Schemas]
Chen, Peter Pin-Shan. "The entity-relationship model — toward a unified view of data." Readings in artificial intelligence and databases. 1988. 98-111.
Smart Draw ERD https://erdplus.com
MySQL Workbench - CS317
Navicat alternative to https://www.smartdraw.com/entity-relationship-diagram/ Workbench https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model
Sam Siewert 15 State Machine (Extended Finite SM)
Mealy Machine – Most common Moore Machine – Alternate notation
State Charts Real-Time Event Driven State https://en.wikipedia.org/wiki/Moore_machine Machines https://en.wikipedia.org/wiki/Mealy_machine
SDL - Extended Finite State Machine AADL, TASTE
https://en.wikipedia.org/wiki/Specification_and_Description_Language Sam Siewert 16 Petri Nets (FYI - Not on Exams) Peterson, James L. "Petri net theory and the modeling of systems." (1981).
PIPE (Platform Independent https://en.wikipedia.org/wiki/Petri_net Petri Net Editor)
Protocol analysis and synchronous/asynchronous systems analysis
Petri nets are useful for concurrent systems analysis and decision Problems - Reisig, Wolfgang. Petri nets: an introduction. Vol. 4. Springer Science & Business Media, 2012. Sam Siewert 17 UML (Quick Reference, Visual Paradigm) https://www.omg.org/spec/UML/About-UML/ State with Use Cases and CRC for Classes 4 Main Behavioral (UC, OIM sequence, Activity, State) 4 Main Structural (Class, Object, Package, Deployment)
4 3 1 2
1 4 3
2
Sam Siewert 18 UML Use Case - Behavioral, Starting Point Concurrent with Goals and Objectives and Block Diagram Goes well with requirements analysis (tracing) Start here to define project scope & Actors: users, external interfaces
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-use-case-diagram/ Sam Siewert 19 UML Structural Diagrams
Class, Object, Package, Deployment (Component)
Sam Siewert
20 #1 - UML Class Diagram - CRC level First, use CRC (Class, Responsibility, Collaborator) analysis and create Class diagram with classes and relationships (attributes and methods can come later) 1. Association (Cardinality - 1:1, 1:n, 0..1) 2. Aggregation (may include) 3. Composition (must include) 4. Hierarchy (Super class, sub-class - e.g. Withdrawal is a sub-class of Transaction)
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-class-diagram/ Sam Siewert 21 #1 - UML Class Diagram - Domain Model Second, refine use CRC analysis along with OIM sequence diagrams and create Class diagram with classes, relationships, attributes and methods, and can combine with packages Refinement - additional progress, updates based on Level-0 design walk-throughs, more detail 1. Association (Cardinality - 1:1, 1:n, 0..1) 2. Aggregation (may include) 3. Composition (must include) 4. Hierarchy (Super class, sub-class - e.g. Withdrawal is a sub-class of Transaction)
Sam Siewert 22 #2 - UML Object Diagram Simple Goal - Show Class instantiation as objects and how objects relate (test instantiation, containers, constructor/destructor, etc.) https://www.visual-paradigm.com/guide/uml-unified-modeling- language/what-is-object-diagram/ Test Class Diagram completed in Level-1 Domain Model
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-object-diagram/ Sam Siewert 23 #3 - UML Deployment Diagram Useful for Systems with Hardware platforms and Multiple stand-alone software applications or services What you need to ship and configure for a system test
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-deployment-diagram/
Sam Siewert 24 #3 - Deployment Diagram - Example Shows mixture of software sub-systems and hardware Similar to block diagram with hardware and software blocks
From Kung, OOSE - Example of Deployment diagram for cellular system Sam Siewert 25 #4 - UML Package Diagram Can be done alone (typically level-2) or combined with a Class Diagram
Module strong cohesion and interface loose coupling
Define directory structure for
CMVC https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-package-diagram/
Sam Siewert 26 UML Packages with Class Diagram Break up Class Diagram and abstract
Sam Siewert 27 Class Diagram with Packages
Show detail of cruise control session and interfaces to packages containing related classes
Sam Siewert 28 UML Component Diagram - FYI Models well concepts of 1) Unit (Module, CSU), 2) Subsystem (CSCI), 3) System (CSC) and Interface Requirements Specificaiton (DoD-2167-A, MIL-STD-498)
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-component-diagram/ Sam Siewert 29 UML Behavioral Diagrams
Use Case, State, Activity Diagram, OIM Interaction Sequence
Sam Siewert
30 #1 - UML Detailed Use Cases Show hierarchy, information flow, actors Relationships between use cases (ovals)
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-use-case-diagram/
Sam Siewert 31 #2 - UML OIM Message Sequence Diagram Class only Object only Class with Object instance Level-1 Domain Model with Classes and messages Level-2+ with Objects and Methods
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-sequence-diagram/ Sam Siewert 32 #3 - UML Activity Diagram Flowchart with fork and join for concurrency, Start, Finish Use to model process bars in OIM sequence diagram
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-activity-diagram/ Sam Siewert 33 #4 - UML State Machine (Extended) Useful at any Level (0,1,2, 2+) for Event Driven Architectures and Hybrid Architectures State Machine Hierarchy of States with sub-states
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-state-machine-diagram/ Sam Siewert 34 UML Timing Diagram - FYI Use for time constraints (if you have them) Rate Monotonic Analysis - CEC450 (Example Timing Diagrams)
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-timing-diagram/ Sam Siewert 35 UML Communication Diagram - FYI Use instead of or in addition to OIM Sequence Diagram
Use with Object Model
Analysis for Domain Model
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-communication-diagram/
Sam Siewert 36