1 / 33

CPSC 371/872 UML / SysML Modeling

CPSC 371/872 UML / SysML Modeling. J. Yates Monteith , Clemson University, Fall 2014. UML Modeling. Contents Modeling UML Modeling A brief history of UML Types of Models A Quick Exercise? SysML Modeling PolarSys. What is Modeling?. What is a model?

taini
Télécharger la présentation

CPSC 371/872 UML / SysML Modeling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CPSC 371/872UML / SysMLModeling J. Yates Monteith, Clemson University, Fall 2014

  2. UML Modeling • Contents • Modeling • UML Modeling • A brief history of UML • Types of Models • A Quick Exercise? • SysML Modeling • PolarSys

  3. What is Modeling? • What is a model? • It’s an abstraction of a ‘thing’. Lets look at some models.

  4. Architectural Models

  5. Scientific Models

  6. Mathematical Models

  7. High Level Models

  8. Low Level Models

  9. What is Modeling? • What is a model? • It’s an abstraction of a ‘thing’. • A model is used to represent something else. • A model is used to describe and convey information and understanding about the thing which it represents. • What is a model in Software and Systems Engineering? • Just a pretty picture. • Eratta: A pretty picture that [hopefully] has some semantic meaning. • Models help us specify a piece of software's design in a more abstract way than source code itself. • And we’ll accomplish this through the Unified Modeling Language (UML)

  10. Unified Modeling Language (UML) • UML is a standardized general purpose modeling standard. • Standardized in the same way that JavaDocs, Java code, naming conventions, etc are standardized. • General purpose in that it can model nearly any type of application. • UML is primarily object oriented. • It could be used in non-OO systems, but a little tougher, a little less expressive. • Standard way to visualize • Activities and Actors • Programming Structures and Software Components • Deployment Models and Physical Models. • And much much more…

  11. UML: A [Very] Brief History • Object Oriented Languages  Modeling languages • During the 1980s and 1990s, during the rise OO Programming, tons of modeling languages existed. • Needed something better. • Too many languages meant our models might not work with other organizations models. • UML unified the best in modeling techniques at the time: • Jacobsen • Use Classes • Rumbaugh (OMT) • Object Models (Object Diagrams) • Dynamic Models (State Machines) • Functional Models (Process Models) • Booch • Class Diagrams

  12. So why modeling and UML? • By providing a non-textual way of specifying a software system, models provide us with: • An at-a-glance view of a software system • A method of documentation that can be ingested and digested easier than a bajillion lines of source. • Modeling also provides us with a mechanism for delivering different stakeholder views of a system. • We might not want to provide the same information to the CEO as we do the Project Manager

  13. UML: Types of Models Profile Class Composite Structure Component Deployment Object Package Activity Use Case State Machine Interaction Sequence Timing Communication Interaction Overview Behavioral Structural

  14. UML Diagram of UML Diagrams It’s so meta

  15. UML Diagrams • We’re only concerned with two diagrams right now: • Use Case Diagram • Requirements Diagram

  16. My Most Used Model: Use Case • Pronounced YOUS-CASE • Depicts a set of high level functionalities from the perspective of different actors. • What is an actor? • Anyone or anything that will interact with the system. Usually stick figures. With top hats. • What is a YOUS-CASE? • High level functionality that is associated with various actors or other Use Cases through relationships. Usually a circle. With top hats.

  17. Use Case • Composed from Scenarios. • Scenarios are English description of a high level functionality. Scenarios are engineered during Requirements Ellicitation/Specification. • Example Scenario: • “User is typing an SMS message and receives a phone call. Incomplete message is stored in local memory during call and recalled once call is completed.” • What sort of Use Cases do we see here?

  18. Use Case • Composed from Scenarios. • Scenarios are English description of a high level functionality. Scenarios are engineered during Requirements Ellicitation/Specification. • Example Scenario: • “User is typing an SMS message and receives a phone call. Incomplete message is stored in local memory during call and recalled once call is completed.” • What sort of Use Cases do we see here? • A single scenario incorporates multiple use cases. • Many scenarios might incorporate the same use case.

  19. Lets do a UML diagram Pretend we’re going out to dinner. Who are the actors?

  20. Lets do a UML diagram • Pretend we’re going out to dinner. • Who are the actors? • Waiter • Cashier • Chef • Client

  21. Use Case Discussion When would we create a Use Case Diagram?

  22. Use Case Discussion • When would we create a Use Case Diagram? • Requirements Specification phase. We specify the software via scenarios, and scenarios = {Use Cases} • What do we use Use Cases?

  23. Use Case Discussion • When would we create a Use Case Diagram? • Requirements Specification phase. We specify the software via scenarios, and scenarios = {Use Cases} • What do we use Use Cases for? • Everything. Literally everything. • Requirements Analysis • Test Planning • Client Communication • Even more • When do we use the Use Case Diagram?

  24. Use Case Discussion • When would we create a Use Case Diagram? • Requirements Specification phase. We specify the software via scenarios, and scenarios = {Use Cases} • What do we use Use Cases for? • Everything. Literally everything. • Requirements Analysis • Test Planning • Client Communication • Even more • When do we use the Use Case Diagram? • Every phase of the SDLC.

  25. Use Case Discussion What are the limitations of Use Cases?

  26. Use Case Discussion • What are the limitations of Use Cases? • They are difficultto write. There’s a lot of research on how to write good Use Cases. • They don’t reflect non-functional requirements. At all. • That’s not the point, but they don’t reflect those.

  27. SysML • UML was great for specifying software products • Structural diagrams allowed us to specify the structure of modules, classes and components. • Behavioral diagrams allowed us to specify the behavior and interaction of the programming structures. • But as software systems grew more complex, we needed more expressive models to help in the development of systems. • Enter SysML, the Systems Modeling Language. • SysML is an extension of the UML meta-model / profile that is primarily targeted at systems modeling. • As opposed to software or source code modeling. • Managed by the Object Management Group. • Adds several additional diagrams to the UML Profile. • Notably the Requirements diagram.

  28. Modeling Tools • Lots of tools exist for performing UML and SysML Modeling. • Some can reverse engineer models from code • Take code and create a model from it. • Some can forward engineer code from models • Take a model and generate code from it. • Some can perform round trip engineering • Take a (Model or Code) and generate / forward engineer (Code or Models) • Take the generated (Code or Models) and generate / reverse engineer (Models or Code) from them. • Ensure consistency. • Many tools exist: • Bouml, TopCASED, PolarSys, others… • Lets look at PolarSys and see if we can do some modeling.

  29. PolarSys – Getting Started • Step 1: Download and Install the PolarSysIDE • Located at: http://polarsys.org/downloads/ • Current version: 1.*? • Available for Linux/GTK and Windows. Should also work on Mac, because Eclipse  Java and Mac  GTK • Step 2: Unzip into the C:\ directory or another ‘short’ base directory (/opt would work well). • Using another base directory might result in path names that are too long, especially on Windows. • Step 3: Install JDK 6u35. • You could also install JDK 7u* or perhaps 8u*. I have not used / tested it with JDK 7 or 8. • Step 4: Open the folder at the extraction point and launch the polarsys application.

  30. Important Links • http://polarsys.org/downloads/ • http://en.wikipedia.org/wiki/Unified_Modeling_Language • http://www.uml.org/ • http://www.methodsandtools.com/archive/archive.php?id=76

  31. Extra

  32. My Favorite Diagram: Class Diagrams • Used to specify a class and • Member Variables and Methods • Visibility of Methods and Variables • The classes relations to other classes. • Relations to other classes are specified through a number of connectors. • Association (Relation) – Uni/Bi directional containment, possibly reflexive, possibly aggregating. • Aggregation: “Has-A” Class contains a structure containing multiple instances of another class. • Composition: “Owns-A” Slightly different from Aggregation. • Generalization: “Is-A” Think inheritance hierarchies

More Related