Experiences with a UML Diagram Critique Tool
description
Transcript of Experiences with a UML Diagram Critique Tool
![Page 1: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/1.jpg)
EXPERIENCES WITH A UML DIAGRAM CRITIQUE TOOLRobert W. Hasker, Andrew Rosene, James ReidUniversity of Wisconsin – Platteville MICS, 2012
![Page 2: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/2.jpg)
Motivation Important skill for SE students:
constructing, diagramming models Consider the following class diagram
Reasonable structure, collection of classes
![Page 3: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/3.jpg)
Motivation Closer inspection:
Redundant with association
![Page 4: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/4.jpg)
Motivation Closer inspection:Missing objects
Redundant with association
![Page 5: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/5.jpg)
Motivation Closer inspection:Missing objects
Redundant with association
Nonstandard notation
![Page 6: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/6.jpg)
Motivation Closer inspection:
What sort of thing is a “security”?
Missing objectsRedundant with association
Nonstandard notation
![Page 7: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/7.jpg)
Solutions Ideally, the modeling tool would catch such errors
Professional tools (such as IBM Rational Rose used here) must allow for a wide variety of practices
Student tools reduce competitiveness, don’t seem mature
UMLint: identifies potential errors Inspiration: the C programming utility, lint Currently focused on class, use case diagrams
Presentation Overview of issues identified by UMLint Experiences from the students in using the tool in
upper-level classes
![Page 8: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/8.jpg)
Use case model defects Use case diagrams:
good for introducing diagram “rules” A pet food dispenser:
![Page 9: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/9.jpg)
Use case model defects Use case diagrams:
good for introducing diagram “rules” A pet food dispenser:
Belongs inclass model
Improper notation
Backwards dependencies
![Page 10: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/10.jpg)
Use case model defects Use case diagrams:
good for introducing diagram “rules” A pet food dispenser:
Backwards <<extend>>: no route to Block Excessive Eating
Belongs inclass model
Improper notation
Backwards dependencies
![Page 11: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/11.jpg)
Class model defects
Reversed generalizations
![Page 12: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/12.jpg)
Class model defects
Reversed generalizations
Multiple “owners”
![Page 13: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/13.jpg)
Class model defects
Reversed generalizations
Multiple “owners”
Nondescript word
Unnecessaryabbreviation
![Page 14: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/14.jpg)
Class model defects
Reversed generalizations
Multiple “owners”
Low cohesionNondescript word
Unnecessaryabbreviation
![Page 15: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/15.jpg)
Class model defectsReversed generalizations
Multiple “owners”
Low cohesionNondescript word
Unnecessaryabbreviation
![Page 16: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/16.jpg)
Class model defectsReversed generalizations
Multiple “owners”
Low cohesionNondescript word
Unnecessaryabbreviation
Publicattribute
![Page 17: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/17.jpg)
Class model defectsReversed generalizations
Multiple “owners”
Low cohesionNondescript word
Unnecessaryabbreviation
Publicattribute
Nonstandard methods
![Page 18: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/18.jpg)
Class model defectsReversed generalizations
Multiple “owners”
Low cohesionNondescript word
Unnecessaryabbreviation
Publicattribute
Nonstandard methods
Index variables Complex attributes
![Page 19: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/19.jpg)
Class model defectsReversed generalizations
Multiple “owners”
Low cohesionNondescript word
Unnecessaryabbreviation
Capitalization standards Missing documentation
Publicattribute
Nonstandard methods
Index variables Complex attributes
![Page 21: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/21.jpg)
![Page 22: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/22.jpg)
![Page 23: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/23.jpg)
Experiences Example 1: model a rescue system for the
Australian Outback Victim calls for help Operator plans route Self-guided system delivers supplies System can navigate obstacles
Goal of assignment: check skills retention Students: capstone project course
Prerequisites: Data Structures, Object-Oriented Analysis & Design, Intermediate Software Engineering
![Page 24: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/24.jpg)
Example 1: Use case model
![Page 25: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/25.jpg)
Errors identified by UMLint Directed
associations
(Directed) Associations between use cases
Classes
() after use case names
![Page 26: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/26.jpg)
Improved use case model Remaining
error: >3 links from actor
Indicates flowchart
![Page 27: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/27.jpg)
Example 2: Mobile Application
Ordering food Items in
categories Optional
condiments, components
![Page 28: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/28.jpg)
![Page 29: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/29.jpg)
Underscor
es vs. camelCase
Missing multiplicities
Inconsistencies Slow down
development
![Page 30: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/30.jpg)
Example 3: Alternative Food App
![Page 31: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/31.jpg)
Example 3: Alternative Food App
Complex attribute
Two owners for Item
Unrecognized/ misspelled words
Missing Multiplicities
![Page 32: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/32.jpg)
Improved Food App Fixing
multiplicities revealed missing containers
Improved method placement
![Page 33: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/33.jpg)
Example 4: Application Framework Second diagram by same group as ex. 3
Missing multiplicities, documentation
![Page 34: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/34.jpg)
Ex. 4: Revised Framework Result of
adding documentation:
![Page 35: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/35.jpg)
Discussion Goal: improve student diagram quality
Assumption: forcing students to look more closely at diagrams would result in identifying missing classes, introduce generalizations, improve associations
Results: could not find cases of this for the students involved in this project (spanning multiple groups)
Report: these issues were identified by groups before submittal Was successful in identifying smaller issues
Naming conventions Incorrect associations Missing multiplicities Missing containers
Generally: found detailed errors that are difficult to identify by hand
![Page 36: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/36.jpg)
Improvements Improve check for documentation
A single space satisfies this check Consider using natural language parser
Improve notification of deleted objects Rose allows deleting object from diagram, not
model Should provide better feedback on where to find
these Provide command-line interface
Current web interface too cumbersome for frequent checks
![Page 37: Experiences with a UML Diagram Critique Tool](https://reader036.fdocuments.us/reader036/viewer/2022062501/56816554550346895dd7d1e1/html5/thumbnails/37.jpg)
Conclusion In practice, UMLint addresses details
more than big picture issues in designs However, did help groups eliminate
errors Group members pointed out UMLint would
flag certain choices Helped remind users of notation
“Basic stuff, but it’s that basic stuff you forget.”