UNM CS 580 - CS 580 OCL 1- Introduction to OCL & USE

Unformatted text preview:

1CS 580: Software SpecificationsCS 580: Software SpecificationsCS 580: Software SpecificationsCS 580: Software SpecificationsOCL 1: Introduction to OCL & USECopyright 2001-2002, Matt Dwyer, John Hatcliff, and Rod Howell. The syllabus and all lectures for this course are copyrighted materials and may not be used in other course settings outside of Kansas State University in their current form or modified form without the express written permission of one of the copyright holders. During this course, students are prohibited from selling notes to or being paid for taking notes by any person or commercial firm without the express written permission of one of the copyright holders. Used and modified with permission by Robert Stehwien.2OutlineOutlineOutlineOutlineOverview of UMLThe role of OCL within UMLObject model componentsdefines the states to which OCL constraints are appliedA brief look at OCLA brief look at USE3What is Software Modeling?What is Software Modeling?What is Software Modeling?What is Software Modeling?The designing of software applications before codingAn essential part of large software projects, and helpful to small and medium-sized projects as wellA model plays the analogous role in software development that blueprints and other plans (site maps, elevations, physical models) play in the building of a skyscraperModeling can help ensure that…business functionality is complete and correct end-user needs are met (requirements)program design supports scalability, robustness, security, extendibility, and other characteristicsbeforeimplementation in code renders changes difficult and expensive to make (do agile practices change the cost?)(Source: Introduction to OMG’s Unified Modeling Language)24What Do We Want To Model?What Do We Want To Model?What Do We Want To Model?What Do We Want To Model?System requirements (use cases)Basic situations in which a system is usedRoles of system usersSystem architecture (class models)Behavior of components (activity diagrams, state charts)Static and dynamic component interaction…5What is UML?What is UML?What is UML?What is UML?For the past 10+ years various proposals have been put forth about how to performobject-oriented analysis and modelingi.e., describing system designs in terms of objects and their inter-relationshipsThere have been at least 10 “methods”proposedUML is the “combination” of the most popular (Booch, Rumbaugh, Jacobson)6Design by CommitteeDesign by CommitteeDesign by CommitteeDesign by CommitteeAs a consequence UML isa collection of methodsrather than a single systematic approach to object modeling multiple methods for the same goalIt’s becoming a de-facto standardOMG oversees an ongoing a standardization effortwww.omg.org/umlIf you don’t use it already, you probably will ...37A Quick Overview of UMLA Quick Overview of UMLA Quick Overview of UMLA Quick Overview of UMLUML defines twelve types of diagrams divided into three categories…Structural DiagramsClass Diagram, Object Diagram, Component Diagram, and Deployment Diagram.Behavior DiagramsUse Case Diagram, Sequence Diagram, Activity Diagram, Collaboration Diagram, and Statechart Diagram.Model Management DiagramsPackages Diagram, Subsystems Diagram, and Models Diagram.Advanced features include the Object Constraint Language (OCL) and Action Semantics8Contrast with AlloyContrast with AlloyContrast with AlloyContrast with AlloyBoth UML and Alloy seek to describe…The (possible) state space of a systemthe transitions between statesin an implementation independent wayUML has a much broader scopeimplementation description (and synthesis) including system structure/architectureproblem domain modeling (requirements)many different ways of capturing behavior (state diagrams, activity diagrams, sequence diagrams, etc.)meant to be a bit imprecise to avoid committing to a particular platform (hard to make semantic checking/generating tools)tons of books written on UML – one on AlloyAlloy has a much more rigorous semantic foundation 9Structural Diagram ExampleStructural Diagram ExampleStructural Diagram ExampleStructural Diagram ExampleClass Diagramshows a set of classes, interfaces, and collaborations, and their relationshipsthe most common diagram found in modeling OO systemsaddress the static view of the systemwe will emphasize class diagrams with the USE tool410Class DiagramClass DiagramClass DiagramClass DiagramPersonage : Integerancestors() : Set(Person)married() : Booleansiblings() : Set(Person)Manmarried() : BooleanWomanmarried() : Booleanspousehusband wife0..1 0..1offspringparentschildren*0..2ClassAttributeOperationsAssociationRoleMultiplicity11Behavior Diagram ExampleBehavior Diagram ExampleBehavior Diagram ExampleBehavior Diagram ExampleUse Case Diagramshows a set of cases of system usesequence of actionsshows actors that participate in each use caseused to model the context of a systemdescribing which actors “outside the system”interact with itused to model the requirements of a system“what” (not “how”) the system should do as viewed from outside the system12Use Case DiagramUse Case DiagramUse Case DiagramUse Case DiagramPerform card transactionProcess customer billReconcile transactionsManage customer accountCredit CardValidation SystemCustomerIndividualCustomerCorporateCustomerRetail InstitutionSponsoringFinancial Institution(source: UML User Guide, Booch, Rumbaugh, Jacobson)513Behavior Diagram ExampleBehavior Diagram ExampleBehavior Diagram ExampleBehavior Diagram ExampleActivity Diagramshows flow from activity to activity within a systemaddresses the dynamic view of a systemglorified flow charts14Activity DiagramActivity DiagramActivity DiagramActivity Diagramproceed in parallel along outgoing arcswait here until activities on incoming arcs are complete15Module Management Diagram Module Management Diagram Module Management Diagram Module Management Diagram ExampleExampleExampleExamplePackages Diagram616UML is VisualUML is VisualUML is VisualUML is VisualA picture is worth a thousand wordspictures can be misleadingMost people can look at a UML description and get a “reasonable” idea of the parts of the system that are describedis reasonable good enough?Usually, yes!17UML ShortcomingsUML


View Full Document

UNM CS 580 - CS 580 OCL 1- Introduction to OCL & USE

Download CS 580 OCL 1- Introduction to OCL & USE
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view CS 580 OCL 1- Introduction to OCL & USE and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CS 580 OCL 1- Introduction to OCL & USE 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?