Databases Reference
In-Depth Information
getCompaniesIterator
getAvailableFlights_C1
bookFlight_C1
hasNext
hasNext
next
6
0
1
2
3
4
5
configurationError
iterator
11
hasNext
size
add_A1_B1
findBestSolution_C1
10
7
book_C1
13
next_A0_B0
15
12
hasNext
9
8
getAvailableSeats_A1
14
next_A4_B0
book_C1
findBestCompositeSolution_C1
Legend
We added a letter that identifies the cluster before the number that rewrites a concrete
value to increase the readability of the model. The strategies used to rewrite each cluster
are:
A RelativetoAccessrewriting strategy
B RelativetoInstantiationrewriting strategy
C GlobalOrderingrewriting strategy
FIGURE 2.12: A KLFA model of the behavior of method bookFlight .
second attribute ( return.fligtNo ) of the two transitions from state 8 to state
9. The resulting automaton indicates that new values are always introduced
at that point of the execution (due to the presence of label B0 ), thus a new
flight number is produced every time the loop through states 7, 8, 9, and 10
is covered.
Similarly, KLFA used the relative to access strategy to rewrite the first
attribute ( return.availSeats ) associated with the transitions from state 8 to
state 9. The symbolic values show that return.availSeats can be associated
with either a new value (symbolic value equals to A0) or a value observed two
iterations before (symbolic value equals to A4).
The transition from state 10 to state 7 shows that the two attributes
of event add , object.flightNo and object.availSeats , are always equal
to attributes return.fligthNo and return.availSeats associated with the
event next ( A1 and B1 denote the reuse of concrete values).
Finally, transitions from state 0 to state 1, from state 12 to state 13,
and from state 13 to state 15 show an example of attributes rewritten with
Global Ordering. Symbols associated with these values show that persons ,
return.seats , and solution.seats have the same values across all execu-
tions.
 
Search WWH ::




Custom Search