planning-based approach for automating sequence diagram generation
DESCRIPTION
The slideshow I used to defend my Computer Science M.S. Thesis, which at the time of the defense had a terrible title that was later officially changed to Planning-Based Approach for Automating Sequence Diagram Generation.TRANSCRIPT
![Page 1: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/1.jpg)
Planning Messages in Sequence Diagrams and Analyzing the Consistency of Use Cases and
Class Diagrams Automatically using Design by Contract
MS Thesis Defense
Yaser Sulaiman
Advisor
Dr. Moataz Ahmed
December 29, 2012
![Page 2: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/2.jpg)
2 Photo by y.caradec
“I made this [letter] very long, because I did not have the leisure to make it shorter.”
—Blaise Pascal
title
![Page 3: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/3.jpg)
Under the right conditions, sequence diagram generation is a
planning problem
3
![Page 5: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/5.jpg)
5 Photo by Kitty Terwolbeck
Research Questions
Communiqué: A Library for Planning Messages in Sequence Diagrams
Experiments
Conclusions
Background
Sequence Diagram Generation as a Planning Problem
Literature Review
![Page 7: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/7.jpg)
7
System
Function
Behavior Structure
![Page 8: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/8.jpg)
8
System
Use Cases
State Transition Diagrams
Class Diagrams
Sequence Diagrams
![Page 9: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/9.jpg)
9
Use Case Class
Diagram Sequence Diagram
Use Case
Class Diagram
Sequence Diagram
vs.
![Page 10: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/10.jpg)
10
Design by Contract (DbC)
![Page 11: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/11.jpg)
11 Photo by my brother Maher
![Page 12: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/12.jpg)
Contracts (preconditions + postconditions) semantically specify
the relation between routines & callers
The C in DbC
12
![Page 13: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/13.jpg)
DbC (Eiffel) in Action
13
-- A pop routine of a limited-capacity -- stack. pop(): T require not empty do .. ensure not full count = old count - 1 end
![Page 14: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/14.jpg)
Object Constraint Language (OCL)
14
UML DbC OCL
![Page 15: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/15.jpg)
OCL in Action
15
-- Assuming Stack has Boolean -- isEmpty() & isFull() methods & -- integer count attribute. context Stack::pop(): T pre: not self.isEmpty() post: not self.isFull() and self.count = self.count@pre - 1
![Page 16: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/16.jpg)
Automated Planning
16
s0 a1 s1 s2 … sg
a2 a3 ag
Σ = (𝑆, 𝐴, 𝛾)
![Page 17: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/17.jpg)
17
s0 a1 s1 s2 … sg
a2 a3 ag
![Page 18: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/18.jpg)
Forward State-Space Search
18
s0 … sg
![Page 19: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/19.jpg)
Backward State-Space Search
19
s0 … sg
![Page 20: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/20.jpg)
Languages
20
Design by Contract Automated Planning
Eiffel
Object Constraint Language
Stanford Research Institute Problem Solver
Action Description Language
Planning Domain Definition Language
![Page 21: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/21.jpg)
PDDL in Action
21
(:action pop
:parameters (?s Stack)
:precondition (> (count ?s) 0)
:effect (decrease (count ?s) 1)
)
![Page 22: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/22.jpg)
22 Photo by miuenski
Sequence Diagram Generation as a Planning Problem
![Page 23: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/23.jpg)
Correspondence between Planning and DbC
23
Automated Planning Design by Contract
Initial State Use Case Preconditions
Goal Use Case Postconditions
Actions Methods
Action Preconditions Method Preconditions
Action Effects Method Postconditions
![Page 24: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/24.jpg)
States as Object Diagrams
24
![Page 25: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/25.jpg)
25
s0 a1 s1 s2 … sg
a2 a3 ag
![Page 27: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/27.jpg)
27
Paper Focus Main Idea
Liwu Li (2000) Model Generation A parser to translate a manually normalized use case to message records
Köster, Six & Winter (2001)
Consistency Analysis Using refined activity diagrams to couple use cases & class models
Li, Liu & He (2005) Consistency Analysis Using set theory & first-order logic to check consistency between the use case model & the conceptual class model
Long et al. (2005) Consistency Analysis Using a queue & BFS to detect inconsistencies between well-formed class & sequence diagrams
Chanda et al. (2009) Consistency Analysis A context-free grammar for use case, activity & class diagrams
Yue, Briand & Labiche (2010)
Model Generation A systematic review focusing on transforming textual requirements to analysis models in the context of MDD
Yue, Briand & Labiche (2010)
Model Generation A technique to automatically derive analysis models from use cases while maintaining traceability links
Ghezzi, Mocci & Salvaneschi (2010)
Consistency Analysis Using symbolic model checking to cross-validate algebraic specifications against intensional behavior models
de Sousa et al. (2010) Consistency Analysis Using the B method to automatically analyze the consistency of requirements
Vaquero et al. (2011) RE & Automated
Planning itSIMPLE: an IDE for automated planning applications
Sulaiman & Ahmed (2012)
RE & Automated Planning
Using itSIMPLE to demonstrate treating sequence diagram generation as a planning problem
![Page 28: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/28.jpg)
28
Requirements & Knowledge
Engineering
Automated Planning
Vaquero et al.
Sulaiman & Ahmed
![Page 29: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/29.jpg)
29
0: (LOGIN PROFILE) [1] 1: (ACTIVATE ACCOUNT PROFILE) [1] 2: (WITHDRAW ACCOUNT PROFILE AMOUNT) [1] 3: (LOGOUT PROFILE) [1]
Message Receiver Parameter
But what about the Sender?
![Page 31: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/31.jpg)
Q1: How can sequence diagrams be automatically generated from DbC’ed use cases and class diagrams?
Q2: How can that process be used to analyze the
consistency between use cases and class diagrams?
Q3: Which contract language should be used to enable those processes?
Q4: How do the automatically-generated sequence
diagrams compare to the manually-generated ones?
31
![Page 32: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/32.jpg)
32
Communiqué: A Library for Planning Messages in Sequence Diagrams
![Page 33: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/33.jpg)
Available on Github http://git.io/communique
33
Implemented in
Ruby
Logo by Yukihiro Matsumoto
![Page 34: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/34.jpg)
34
Use Case
Class Diagram Instance
Communiqué Sequence Diagram
![Page 35: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/35.jpg)
35
![Page 36: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/36.jpg)
36
Forward-search(s0, g) n ← [s0, the empty plan] Enqueue(n, f(n)) until queue is empty s, π ← Dequeue-min() if s satisfies g then return π applicable ← {m | precond(m) is true in s} if applicable = ϕ then next for each m ϵ applicable n ← [γ(s, m), π.m] Enqueue(n, f(n)) return failure
![Page 37: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/37.jpg)
37
s0
…
… …
sg
…
… …
…
![Page 38: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/38.jpg)
𝑓 𝑛 =
−&𝑔 𝑛 , &&&&&&&&&&&&DFS
&𝑔 𝑛 , &&&&&&&&&&&&BFS
&𝑔 𝑛 + ℎ 𝑛 , A∗
The Evaluation (or Objective) Function
38
Cost so far; depth of n; # of previous message passes
Estimated cost to goal; estimated # of remaining message passes
![Page 39: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/39.jpg)
h(n) = # objects not satisfying their goals
39
![Page 40: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/40.jpg)
h(n) is not admissible: it may overestimate the cost of reaching
the goal
40
![Page 41: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/41.jpg)
h(n) non-admissibility ⇒
planner non-optimality
41
![Page 42: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/42.jpg)
To determine the sender of a message, Communiqué uses the
links between the objects along with some rules of thumb
42
![Page 43: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/43.jpg)
Sender-Selection Assumptions
43
The Actor initiates the use case
Boundary objects interact with the Actor
Dependent objects are responsible for the objects they create
A sender must already be active
A sender must have a link to the receiver
![Page 44: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/44.jpg)
OCL-Like Ruby Expressions for Pre- & Postconditions
44
pop = DbcMethod.new(:pop) pop.precondition = Proc.new { self.is_empty? } pop.postcondition = Proc.new { @count -= 1 }
context Stack::pop(): T pre: not self.isEmpty() post: not self.isFull() and self.count = self.count@pre - 1
![Page 46: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/46.jpg)
The original models were not DbC’ed; I added what I believed to
be commonsense contracts
46
![Page 47: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/47.jpg)
Experiment #1
Simple Sequence Diagrams
47
![Page 48: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/48.jpg)
Properties Management System* – Class Diagram
48 * Aman et al. Senior Project
![Page 49: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/49.jpg)
49
Select Featured Property Delete Property Modify Announcement
Add Property Modify Property
![Page 50: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/50.jpg)
Experiment #2
More Complex Sequence Diagrams
50
![Page 51: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/51.jpg)
Weather Station System* – Class Diagram
51 * Ian Sommerville. Software Engineering
![Page 52: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/52.jpg)
Weather Station System – Sequence Diagram
52
Textbook’s Diagram Communiqué’s Output
![Page 53: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/53.jpg)
2Bwatch* – Class Diagram
53 * Bruegge and Dutoit. OOSE using UML, Patterns & Java
![Page 54: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/54.jpg)
2Bwatch – Sequence Diagram
54
![Page 55: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/55.jpg)
Did you notice something wrong?
55
![Page 56: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/56.jpg)
56
![Page 57: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/57.jpg)
I didn’t*.. until I saw Communiqué’s output
57 * After all, I’m not a software engineer
![Page 58: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/58.jpg)
58
Textbook’s Diagram Communiqué’s Output
![Page 59: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/59.jpg)
59
There is no association to support sending refresh() as
it appears in the book’s sequence diagram
![Page 60: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/60.jpg)
60
Now, what would Communiqué do?
![Page 61: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/61.jpg)
61
Textbook’s Diagram Communiqué’s New Output
![Page 63: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/63.jpg)
63
Textbook’s Diagram Communiqué’s New Output
![Page 64: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/64.jpg)
64 Photo used with permission from Laney G
“Success!”
![Page 65: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/65.jpg)
Experiment #3
Effects of Noise
65
“Irrelevant” methods
![Page 66: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/66.jpg)
66
Always applicable
Does nothing
![Page 67: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/67.jpg)
These methods has an effect similar to that of a large class diagram
67
![Page 68: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/68.jpg)
MeetingsMate* – Class Diagram
68 * Al Akel et al. Senior Project
![Page 69: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/69.jpg)
MeetingsMate – Sequence Diagram
69
![Page 70: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/70.jpg)
70
![Page 71: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/71.jpg)
71
![Page 72: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/72.jpg)
72
![Page 73: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/73.jpg)
DFS explored 𝑂(𝑚) states, but the solution was of length 𝑂(𝑚)
BFS found the optimal solution, but it explored
𝑂(𝑐𝑚) states
Best-first search explored 𝑂(𝑚) and found the optimal solution
73
# of noise methods
![Page 74: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/74.jpg)
Experiment #4
Non-Optimality of Communiqué’s Best-First Search
74
![Page 75: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/75.jpg)
h(n) non-admissibility ⇒
planner non-optimality
75
![Page 76: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/76.jpg)
76
![Page 77: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/77.jpg)
77
Optimal Diagram Communiqué’s Output
![Page 78: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/78.jpg)
78
s0 0 + 3
s2 1 + 1
s3 2 + 1
s1 1 + 3
sg1 2 + 0
satisfy_objects_1_and_2()
prepare_to_satisfy_object_3()
prepare_to_satisfy_all_objects_at_once()
satisfy_all_objects_at_once()
f(n) = g(n) + h(n)
sg2 3 + 0
satisfy_object_3()
![Page 79: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/79.jpg)
79
s0 0 + 3
s2 1 + 1
s3 2 + 1
s1 1 + 3
sg1 2 + 0
satisfy_objects_1_and_2()
prepare_to_satisfy_object_3()
prepare_to_satisfy_all_objects_at_once()
satisfy_all_objects_at_once()
f(n) = g(n) + h(n)
sg2 3 + 0
satisfy_object_3()
![Page 80: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/80.jpg)
Experiment #5
Object Instantiation
80
![Page 81: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/81.jpg)
81
Oh how meta!
![Page 82: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/82.jpg)
82
![Page 83: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/83.jpg)
Experiment #6
Failure Handling
83
![Page 84: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/84.jpg)
If Communiqué fails to find a solution, it points to possible
sources of inconsistencies
84
![Page 85: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/85.jpg)
85
![Page 86: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/86.jpg)
86
![Page 88: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/88.jpg)
88
Action Planners Message-Passing
Planner
State Representation Typically, predefined
state variables A set of objects
Specification Language
STRIPS, ADL, or PDDL OCL-like Ruby
expressions
Constraints Preconditions only Preconditions plus
semantic class relationships
Creation of New State Components
Typically, not supported Object instantiations*
Communiqué Action Planners
State Representation Typically, predefined
state variables A set of objects
Specification Language
STRIPS, ADL, or PDDL OCL - like Ruby
expressions
Constraints Preconditions only
Preconditions plus semantic class relationships
Creation of New State Components
Typically, not supported Object instantiations *
![Page 89: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/89.jpg)
Limitations*
89 * “It’s not a bug; it’s a feature.”
![Page 90: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/90.jpg)
Instantaneous State Transitions
90
![Page 91: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/91.jpg)
Sender-Selection Inaccuracies
91
Textbook’s Diagram Communiqué’s Output
![Page 92: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/92.jpg)
Non-Optimality of Communiqué’s Best-First Search
Limited Message Types
Limited Actor Support
No Support for Combined Fragments
Not Comparing States for Equality
Possible Bias in Experiments
Using Ruby for Inputs and Raw Outputs
Other Limitations
92
![Page 93: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/93.jpg)
Future Work
Handle Time Explicitly
Design a Better Heuristic
Try Other Planning Algorithms & Approaches
Use XMI for Inputs and Outputs
93
![Page 94: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/94.jpg)
…</presentation> <questions>…
94
![Page 95: Planning-Based Approach for Automating Sequence Diagram Generation](https://reader034.vdocuments.site/reader034/viewer/2022051514/54805429b4795983578b46ab/html5/thumbnails/95.jpg)
Sender-Selection Rules
1. If the message is the 1st in the sequence of message passes, select the Actor.
2. If the receiver of the message is a boundary object, select the Actor.
3. If the receiver of the message is a dependency object, select the object’s creator.
4. If the message has more than one candidate sender, select the most recently activated candidate sender.
5. If the message does not have any candidate sender, select the Actor.
95