Sequence Diagram Generation & Validation MSE First Presentation Samer Saleh Advisor: Bill Hankley.
-
Upload
brayden-giddens -
Category
Documents
-
view
220 -
download
1
Transcript of Sequence Diagram Generation & Validation MSE First Presentation Samer Saleh Advisor: Bill Hankley.
Sequence Diagram Sequence Diagram Generation & ValidationGeneration & Validation
MSE First PresentationMSE First PresentationSamer SalehSamer Saleh
Advisor: Bill HankleyAdvisor: Bill Hankley
IntroductionIntroduction
Software modeling & modern software Software modeling & modern software engineering.engineering.
Software modeling is not about drawing Software modeling is not about drawing models only.models only.
M. Validation M. Quality S. Quality M. Validation M. Quality S. Quality
Model Validation:Model Validation:
Introduction - Introduction - ContinueContinue
UML class diagram and UML class diagram and sequence diagram are one of sequence diagram are one of the essential models for starting the essential models for starting the modeling process.the modeling process.
Class and sequence models are Class and sequence models are heavily correlated. heavily correlated.
Usually this correlation.Usually this correlation.
Introduction- Introduction- ContinueContinue
Example1:Example1:
Example2:Example2:
Examples ConclusionExamples Conclusion
Inconsistency between class Inconsistency between class and sequence diagrams are and sequence diagrams are very common. very common.
Tools are needed to validate & Tools are needed to validate & suggest solutions if there are suggest solutions if there are any.any.
What is done so far….What is done so far….
A lot of research has been done to A lot of research has been done to validate model. Yet not much validate model. Yet not much implementation.implementation.
Formalism of the UML diagrams.Formalism of the UML diagrams. Problem: Hard to understand. Problem: Hard to understand.
Difficult to implement by novice Difficult to implement by novice software engineers.software engineers.
Problem: Current tools doesn’t check Problem: Current tools doesn’t check for a lot of validation.for a lot of validation.
Project idea….Project idea….
Actor1
Class1
Class2
Class3
Class4
1
*
o1:Class1 o2:Class2Message1
return
Create/Reload Class Model
Create Sequence Model
[Valid] Generate Sequence Model
Validate[Not Valid] Generate Error Message.
View
Project GoalsProject Goals
1.1. Create a user friendly tool to Create a user friendly tool to assist user to generate assist user to generate sequence diagram.sequence diagram.
2.2. Insure reliable and consistent Insure reliable and consistent generated sequence diagram.generated sequence diagram.
3.3. Satisfies the software process Satisfies the software process and life cycle.and life cycle.
4.4. Meeting IEEE standards for Meeting IEEE standards for software documentation software documentation
Risks….Risks….
Difficulty of using the Java Difficulty of using the Java Swings and other java Swings and other java graphical libraries.graphical libraries.
Difficulty of embedding the Difficulty of embedding the validation rules, generating validation rules, generating meaningful error messages & meaningful error messages & suggesting solutionssuggesting solutions
Time concern.Time concern.
Validation RulesValidation Rules
Focused on messagesFocused on messages Only Semantics or Structural. Only Semantics or Structural. No Syntax (Implicit).No Syntax (Implicit).
Rule #1: Direct/Indirect AssociationRule #1: Direct/Indirect Association
Message corresponds to direct or Message corresponds to direct or indirect ( transitive ) association.indirect ( transitive ) association.
Example:Example:
A
BC
D
Z
1
*
1
*
a:A c:C
Message1
d:D
Message2
z:Z
return
Message3
Rule#2: Dependency ExistenceRule#2: Dependency Existence
For indirect association; at For indirect association; at least one path that covers all least one path that covers all dependant classes.dependant classes.
?
Rule#3: Reference ExistenceRule#3: Reference Existence
For Indirect Association:For Indirect Association:1.1. For all predecessor messages out of the For all predecessor messages out of the
sender object, there is at least one sender object, there is at least one message where the return type is the message where the return type is the
receiver objectreceiver object..2.2. For all predecessor messages in the For all predecessor messages in the
sender object, there is at least one sender object, there is at least one message where the parameter passed is message where the parameter passed is type of the receiver object.type of the receiver object.
Rule#3: ExampleRule#3: Example
GUI Prototype- Main InterfaceGUI Prototype- Main Interface
Form TitleForm Title
File Edit Help
ClassDiagram SequenceDiagram Pseudo Code
Class Model View
Tool Panel
Pseudo Code View
UI- Creating Class ModelUI- Creating Class Model
Sequence Diagram GeneratorSequence Diagram Generator
File Edit Help
ClassDiagram SequenceDiagram Pseudo Code
Tools
Modules
Interface
Class
Associations
Association
Aggregation
Composition
--<< Pseudo Code >>--
1. Create Class
UI – Class InformationUI – Class InformationClass InformationClass Information
ItemClass Name
Create()Find()Destroy()
Add
Delete
Add
Delete
Name Type Visibilty
Edit
Attributes
Methods
Methods InformationMethods Information
createMethod’s Name
Add
Delete
Name TypeParameters
Return Type void
UI- Creating AssociationUI- Creating AssociationSequence Diagram GeneratorSequence Diagram Generator
File Edit Help
ClassDiagram SequenceDiagram Pseudo Code
Tools
Modules
Interface
Class
Associations
Association
Aggregation
Composition
--<< Pseudo Code >>--
1. Create Association
3. Select Tail2. Select Head
UI- Association InformationUI- Association InformationSequence Diagram GeneratorSequence Diagram Generator
File Edit Help
ClassDiagram SequenceDiagram Pseudo Code
Tools
Modules
Interface
Class
Associations
Association
Aggregation
Composition
--<< Pseudo Code >>--
1.Create AssociationAssociation informationAssociation information
Item Title
Multiplicity 1..* Multiplicity 1..*
Head Tail
Ok
2.Confirm Association Info
3. Association Created.
UI- Creating Sequence ModelUI- Creating Sequence Model
Sequence Diagram GeneratorSequence Diagram Generator
File Edit Help
ClassDiagram SequenceDiagram Pseudo Code
Tools
Modules
Interface
Class
Associations
Association
Aggregation
Composition
--<< Pseudo Code >>--
Create Sequence Diagram
Enable Analyzer
1. Select to create sequence Diagram
Sequence Diagram NameSequence Diagram Name
testSequence
Sequence Diagram Name
Ok2. Enter Sequence Diagram Name
UI- Creating SequenceUI- Creating SequenceSequence Diagram GeneratorSequence Diagram Generator
File Edit Help
ClassDiagram SequenceDiagram Pseudo Code
Tools
Modules
Associations
<<testSequence>>1. [Guard] Title->Item: create()
Sequence Diagram Mode:> Select Initiator Object
1. Select Initiator Object
2. Select Message
All Association from Initiator Class will be
Highlighted.Include Trasitive
Message ControlMessage Control
None (Default)If ConditionFor LoopWhile Loop
Ok
Control
Predicate
3. Select GuardSelect Return.
Pseudo Code is created
Return Return Value
UI- Viewing the sequenceUI- Viewing the sequenceSequence Diagram GeneratorSequence Diagram Generator
File Edit Help
ClassDiagram Pseudo Code
Tools
Modules
Associations
<<testSequence>>1. [Guard] Title->Item: create()
Sequence Diagram Mode:> Select Initiator Object
SequenceDiagram
UI- Analyzer UI- Analyzer
Sequence Diagram GeneratorSequence Diagram Generator
File Edit Help
ClassDiagram SequenceDiagram Pseudo Code
Tools
Modules
Interface
Class
Associations
Association
Aggregation
Composition
--<< Pseudo Code >>--
ItemTitle
Loan
Reservation
BorrowerInfo
-copyOf
**
-End1*
-End2
*
-End3*
-End4*
-End5
*
-End6*
-End7
*
-End8
*
1. Selected Initiator Class
2. Selected Message
Analyzer Error MessageAnalyzer Error Message
Invalid Action: No direct Association between “Item” Class and “Reservation” Class, and Indirect Associations are not satisfied
OK More Info 3. Error Message
UI- AnalyzerUI- AnalyzerSequence Diagram GeneratorSequence Diagram Generator
File Edit Help
ClassDiagram SequenceDiagram Pseudo Code
Tools
Modules
Interface
Class
Associations
Association
Aggregation
Composition
+setLoan()
Item
Loan
Reservation
BorrowerInfo
-copyOf **
-End1*
-End2
*
-End3*
-End4*
-End5
*
-End6*
-End7
*
-End8
*
Sequence Diagram GeneratorSequence Diagram Generator
File Edit Help
ClassDiagram Pseudo Code
Tools
Modules
Associations
SequenceDiagram
1. Selected Sender
LoanInterface Title Item
new(item,patron)
item:getItem()
+getItem()()-getItemFromList()()+checkIfReserved()
Title
2.SelectMessage
checkIfReserved()
Analyzer Error MessageAnalyzer Error Message
Invalid Action: No direct Association between “Item” Class and “Reservation” Class, and Indirect Associations are not satisfied
OK More Info
ScheduleSchedule
Documentation
Coding. Design. Testing. Presentation
First PresentationApril 15th
2nd PresentationJune 20th
Schedule- ContinueSchedule- Continue
Documentation
Coding.
Design.
Testing.
Presentation
Last PresentationJuly 21st
Cost EstimationCost Estimation
Using COCOMO.Using COCOMO. SLOCSLOC = 116.4 * 38 = = 116.4 * 38 = 4423.4423. Person Productivity (PM)Person Productivity (PM) = =
11.4 person-month.11.4 person-month. Development Time (TDEV)Development Time (TDEV)= =
6.3 months.6.3 months. Average Staffing = 11.4/6.3 = Average Staffing = 11.4/6.3 =
1.8 people1.8 people
For more information….For more information….
http://www.cis.ksu.edu/~ssaleh/mseproject.htm