Consider the following class dictionary: A = "b" List(B). B : C | Q | R. Q = Y. R = K. K : I | J *common* X Y. I = . J = . C = "x" List(X). X : Y. Y = "y" Z. Z = "z". Dummy = List(Y). List(S) ~ "(" S {"," S} ")". After applying cd-navigate: 1 A = "b" List(B). 2 B : C | Q | R. 3 Q = Y. 4 R = K. 5 K : I | J *common* X Y. 6 I = . 7 J = . 8 C = "x" List(X). 9 X : Y. 10 Y = "y" Z. 11 Z = "z". 12 13 Dummy = List(Y). 14 List(S) ~ "(" S {"," S} ")". A :1 B :2 1 C :8 2 Dummy :13 I :6 5 J :7 5 K :5 4 List :14 1 8 13 Q :3 2 R :4 2 X :9 5 8 Y :10 3 5 9 13 Z :11 10 Traversal directive: *from* { A } *to* { Z } Transportation directive: *from* { B } *to* { Y } Propagation graph for transportation: B : C | Q | R *common* . Q = < y > Y . R = < k > K . K : I | J *common* < x > X < y > Y . I = . J = . C = < xs > X_List . X : Y *common* . Y = . X_List ~ X { X } . Traversal directive: *from* { A } *to* { Z } Transportation directive: *from* { C } *to* { X } Propagation graph for transportation: C = < xs > X_List . X : *common* . X_List ~ X { X } . Traversal directive: *from* { A } *to* { Z } Propagation graph for traversal: A = < bs > B_List . B : C | Q | R *common* . Q = < y > Y . R = < k > K . K : I | J *common* < x > X < y > Y . I = . J = . C = < xs > X_List . X : Y *common* . Y = < z > Z . Z = . B_List ~ B { B } . X_List ~ X { X } . : A ( < bs > : B_List { : C ( < xs > : X_List { : Y ( < z > : Z ( ) ) } ) , : C ( < xs > : X_List { : Y ( < z > : Z ( ) ) , : Y ( < z > : Z ( ) ) } ) } ) b ( x ( y z ) , x ( y z , y z ) ) >> void A::f() >> void B_List::f() >> void C::f() >> void C::f(B* b_broadcast,Y_List* y_list) >> void X_List::f(B* b_broadcast,Y_List* y_list,int& count_condensed) >> void Y::f(B* b_broadcast,Y_List* y_list,int& count_condensed) >> void Y::f(B* b_broadcast,Y_List* y_list) y z = Y-object contained in x ( y z ) >> void Z::f() Z-object = z << void Z::f() << void Y::f(B* b_broadcast,Y_List* y_list) << void Y::f(B* b_broadcast,Y_List* y_list,int& count_condensed) << void X_List::f(B* b_broadcast,Y_List* y_list,int& count_condensed) collected Y_List in B is: ( y z ) count of X in C 1 << void C::f(B* b_broadcast,Y_List* y_list) << void C::f() >> void C::f() >> void C::f(B* b_broadcast,Y_List* y_list) >> void X_List::f(B* b_broadcast,Y_List* y_list,int& count_condensed) >> void Y::f(B* b_broadcast,Y_List* y_list,int& count_condensed) >> void Y::f(B* b_broadcast,Y_List* y_list) y z = Y-object contained in x ( y z , y z ) >> void Z::f() Z-object = z << void Z::f() << void Y::f(B* b_broadcast,Y_List* y_list) << void Y::f(B* b_broadcast,Y_List* y_list,int& count_condensed) >> void Y::f(B* b_broadcast,Y_List* y_list,int& count_condensed) >> void Y::f(B* b_broadcast,Y_List* y_list) y z = Y-object contained in x ( y z , y z ) >> void Z::f() Z-object = z << void Z::f() << void Y::f(B* b_broadcast,Y_List* y_list) << void Y::f(B* b_broadcast,Y_List* y_list,int& count_condensed) << void X_List::f(B* b_broadcast,Y_List* y_list,int& count_condensed) collected Y_List in B is: ( y z , y z ) count of X in C 2 << void C::f(B* b_broadcast,Y_List* y_list) << void C::f() << void B_List::f() << void A::f() Consider the following cd and the propagation pattern PP. A = "b" B. B : C. C = "x" X. X : Y. Y = "y" Z. Z = "z". Dummy = List(Y). List(S) ~ {S}. The resulting program is run on input: b x y z Find the UNKNOWNs in the following: The object graph for the input: : A ( < b > : C ( < x > : Y ( < z > : Z ( ) ) ) ) The trace: >> void A::f() >> void C::f() >> void C::f(B* b_broadcast,Y_List* y_list) >> void Y::f(B* b_broadcast,Y_List* y_list,int& count_condensed) >> void Y::f(B* b_broadcast,Y_List* y_list) y z = Y-object contained in x y z >> void Z::f() Z-object = z << void Z::f() << void Y::f(B* b_broadcast,Y_List* y_list) << void Y::f(B* b_broadcast,Y_List* y_list,int& count_condensed) collected Y_List in B is: y z count of X in C 1 << void C::f(B* b_broadcast,Y_List* y_list) << void C::f() << void A::f() The C++ program: void A::f( ) { // outgoing calls b ->f( ); } void B::f( ) { // variables for carrying in and out B* b_broadcast ; Y_List* y_list ; // assignments for carrying in b_broadcast = this; ; y_list = new Y_List(); ; // suffix blocks cout << endl << " collected Y_List in B is: " << y_list << endl; } void C::f( ) { // variables for carrying in and out B* b_broadcast ; Y_List* y_list ; // assignments for carrying in b_broadcast = this; ; y_list = new Y_List(); ; this->f( b_broadcast , y_list ); // assignments for carrying out } void B::f( B* b_broadcast,Y_List* y_list ) { // suffix blocks cout << endl << " collected Y_List in B is: " << y_list << endl; } void C::f( B* b_broadcast,Y_List* y_list ) { // variables for carrying in and out int count_condensed ; // prefix blocks count_condensed = 0; // outgoing calls x ->f( b_broadcast , y_list , count_condensed ); // suffix blocks cout << endl << " collected Y_List in B is: " << y_list << endl; cout << endl << "count of X in C " << count_condensed << endl; } void X::f( B* b_broadcast,Y_List* y_list,int& count_condensed ) { // assignments for carrying out count_condensed = count_condensed + 1; ; } void Y::f( B* b_broadcast,Y_List* y_list,int& count_condensed ) { this->f( b_broadcast , y_list ); // assignments for carrying out count_condensed = count_condensed + 1; ; } void X::f( B* b_broadcast,Y_List* y_list ) { } void Y::f( B* b_broadcast,Y_List* y_list ) { // prefix blocks y_list -> append(this); cout << endl << this << " = Y-object contained in " << b_broadcast << endl; // outgoing calls z ->f( ); } void Z::f( ) { // prefix blocks cout << endl << "Z-object = " << this << endl; } QUESTION =============================== 1 UNKNOWN, 15 points. The propagation pattern is PP and consider the customizer: ///////// A = "b" B. B : C. C = "x" X Y Z. X = "x". Y = "y". Z = "z". Dummy = List(Y). List(S) ~ {S}. ///////// When evaluating the transportation directive *from* B *to* Y in the traversal graph determined by *from* A *to* Z the propagation pattern compiler reports: propagate: evaluating transportation directives ... propagate: error : unavailable class :'Y' Give the unknown and one sentence of explanation. Find the UNKNOWNs in the following artifacts. Consider the class dictionary A = "b" B. B = "c" C. C = "x" X. X = "y" Y. Y = "z" Z. Z = "z". Dummy = List(Y). List(S) ~ "(" S {"," S} ")". This cd is used to customize the adaptive program PP and it is run on the following object: : A ( < b > : B ( < c > : C ( < x > : X ( < y > : Y ( < z > : Z ( ) ) ) ) ) ) The representation of this object as a sentence is: b c x y z z The program produces the following trace: >> void A::f() >> void B::f() >> void C::f(B* b_broadcast,Y_List* y_list) >> void X::f(B* b_broadcast,Y_List* y_list,int& count_condensed) >> void Y::f(B* b_broadcast,Y_List* y_list) z z = Y-object contained in c x y z z >> void Z::f() Z-object = z << void Z::f() << void Y::f(B* b_broadcast,Y_List* y_list) << void X::f(B* b_broadcast,Y_List* y_list,int& count_condensed) count of X in C 1 << void C::f(B* b_broadcast,Y_List* y_list) collected Y_List in B is: ( z z ) << void B::f() << void A::f() The C++ program produced by the cd and the adaptive program is: void A::f( ) { // outgoing calls b ->f( ); } void B::f( ) { B* b_broadcast ; Y_List* y_list ; // assignments for carrying in b_broadcast = this; ; y_list = new Y_List(); ; // outgoing calls c ->f( b_broadcast , y_list ); // suffix blocks cout << endl << " collected Y_List in B is: " << y_list << endl; } void C::f( B* b_broadcast,Y_List* y_list ) { // variables for carrying in and out int count_condensed ; // prefix blocks count_condensed = 0; // outgoing calls x ->f( b_broadcast , y_list , count_condensed ); // suffix blocks cout << endl << "count of X in C " << count_condensed << endl; } void X::f( B* b_broadcast,Y_List* y_list,int& count_condensed ) { // outgoing calls y ->f( b_broadcast , y_list ); // assignments for carrying out count_condensed = count_condensed + 1; ; } void Y::f( B* b_broadcast,Y_List* y_list ) { // prefix blocks y_list -> append(this); cout << endl << this << " = Y-object contained in " << b_broadcast << endl; // outgoing calls z ->f( ); } void Z::f( ) { // prefix blocks cout << endl << "Z-object = " << this << endl; } The class dictionary: Ex = A. A : B | C *common* Q. B : D | E. C = . D = F. E = . F = . has part clusters (for construction classes only): Ex = {C,D,E}. C = {Q}. D = {Q} {F} E = {Q}. F = . What are the part clusters of the following class dictionary? A = B C D. B : X | Y *common* K L. C : U | V. D : R | S. X = C D. Y = . U = B D . V = . R = B C. S = . K = . L = . A = {X,Y} {U,V} {R,S}. X = {X,Y} {R,S} {K} {L}. Y = {K} {L}. U = {X,Y} {R,S}. V = . R = {X,Y} {U,V}. S = . K = . L = .