Consider the following propagation directive: *from* EquationSystem *through* -> * , var , * *to* Variable Find the UNKNOWNs in the propagation graph: EquationSystem = < eqs > Equation_List . Equation = < var > Variable . Variable = . Equation_List ~ { Equation } . Consider the following propagation directive: *from* EquationSystem *bypassing* -> Equation , var , Variable *to* Variable Find the UNKNOWNs in the propagation graph: EquationSystem = < eqs > Equation_List . Equation = < exp > Exp . Exp : FunctionCall | Variable *common* . FunctionCall = < args > Exp_CommaList . Variable = . Equation_List ~ { Equation } . Exp_CommaList ~ Exp { Exp } . Consider the following propagation directive (for traversal): *from* EquationSystem *through* -> Equation , var , Variable *to* Variable and the corresponding transportation directive: *from* EquationSystem *to* Variable Find the UNKNOWNs in the following transportation graph: EquationSystem = < eqs > Equation_List . Equation = < var > Variable . Variable = . Equation_List ~ { Equation } . Consider the following propagation directive (for traversal): *from* { EquationSystem } *bypassing* -> Equation , var , Variable *to* { Variable } and the corresponding transportation directive: *from* { Equation } *to* { Variable } Find the UNKNOWNs in the following transportation graph: Equation = < exp > Exp . Exp : FunctionCall | Variable *common* . FunctionCall = < args > Exp_CommaList . Variable = . Exp_CommaList ~ Exp { Exp } . Consider the propagation pattern: *operation* void f(ostream& strm) *traverse* *from* EquationSystem *through* -> *,var,* *to* Variable *carry* *in* EquationSystem* c *along* *from* EquationSystem *to* Variable *at* EquationSystem c =(@ this @) *wrapper* Variable *prefix* (@ strm << this << "\t:" << this->get_variableName()->get_line_number() << "\t"; c->g(this,strm); strm << "\n";@) *operation* void g(Variable* v,ostream& strm) *traverse* *from* EquationSystem *bypassing* -> *,var,* *to* Variable *carry* *in* Equation* eq *along* *from* Equation *to* Variable *at* Equation eq = (@ this @) *wrapper* ~> Equation_List, Equation *prefix* (@ cout << "going through next equation " << each_Equation << endl; @) *wrapper* Variable *prefix* (@ cout << endl << this << " from " << eq << " compared with " << v << endl; if (this->g_equal(v)) { strm << "used on " << this->get_variableName()->get_line_number() << "\n"; } @) and the following input object: EquationSystem HAS 1 PART( Equation_List HAS 4 ELEMENTS{ Equation HAS 2 PARTS( Variable HAS 1 PART( DemIdent a ) Number HAS 1 PART( DemNumber 1 )) Equation HAS 2 PARTS( Variable HAS 1 PART( DemIdent b ) Number HAS 1 PART( DemNumber 2 )) Equation HAS 2 PARTS( Variable HAS 1 PART( DemIdent c ) FunctionCall HAS 2 PARTS( Function HAS 1 PART( DemIdent f ) Exp_CommaList HAS 2 ELEMENTS{ Variable HAS 1 PART( DemIdent a ) FunctionCall HAS 2 PARTS( Function HAS 1 PART( DemIdent g ) Exp_CommaList HAS 1 ELEMENT{ Variable HAS 1 PART( DemIdent b )})})) Equation HAS 2 PARTS( Variable HAS 1 PART( DemIdent d ) FunctionCall HAS 2 PARTS( Function HAS 1 PART( DemIdent h ) Exp_CommaList HAS 3 ELEMENTS{ Number HAS 1 PART( DemNumber 1 ) Variable HAS 1 PART( DemIdent c ) Number HAS 1 PART( DemNumber 6 )}))}) Displaying the copied object as a tree: : EquationSystem ( < eqs > : Equation_List { : Equation ( < var > : Variable ( < variableName > : DemIdent "a" ) < exp > : Number ( < n > : DemNumber "1" ) ) , : Equation ( < var > : Variable ( < variableName > : DemIdent "b" ) < exp > : Number ( < n > : DemNumber "2" ) ) , : Equation ( < var > : Variable ( < variableName > : DemIdent "c" ) < exp > : FunctionCall ( < fn > : Function ( < functionName > : DemIdent "f" ) < args > : Exp_CommaList { : Variable ( < variableName > : DemIdent "a" ) , : FunctionCall ( < fn > : Function ( < functionName > : DemIdent "g" ) < args > : Exp_CommaList { : Variable ( < variableName > : DemIdent "b" ) } ) } ) ) , : Equation ( < var > : Variable ( < variableName > : DemIdent "d" ) < exp > : FunctionCall ( < fn > : Function ( < functionName > : DemIdent "h" ) < args > : Exp_CommaList { : Number ( < n > : DemNumber "1" ) , : Variable ( < variableName > : DemIdent "c" ) , : Number ( < n > : DemNumber "6" ) } ) ) } ) The object in sentence form: a = 1. b = 2. c = *call* f(a,*call* g(b)). d = *call* h(1, c, 6). >> void EquationSystem::f(ostream& strm) >> void Equation_List::f(ostream& strm,EquationSystem* c) >> void Equation::f(ostream& strm,EquationSystem* c) >> void Variable::f(ostream& strm,EquationSystem* c) a :2 >> void EquationSystem::g(Variable* v,ostream& strm) >> void Equation_List::g(Variable* v,ostream& strm) going through next equation a = 1 . >> void Equation::g(Variable* v,ostream& strm) >> void Number::g(Variable* v,ostream& strm,Equation* eq) << void Number::g(Variable* v,ostream& strm,Equation* eq) << void Equation::g(Variable* v,ostream& strm) going through next equation b = 2 . >> void Equation::g(Variable* v,ostream& strm) >> void Number::g(Variable* v,ostream& strm,Equation* eq) << void Number::g(Variable* v,ostream& strm,Equation* eq) << void Equation::g(Variable* v,ostream& strm) going through next equation c = *call* f ( a , *call* g ( b ) ) . >> void Equation::g(Variable* v,ostream& strm) >> void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) >> void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) >> void Variable::g(Variable* v,ostream& strm,Equation* eq) a from c = *call* f ( a , *call* g ( b ) ) . compared with a used on 4 << void Variable::g(Variable* v,ostream& strm,Equation* eq) >> void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) >> void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) >> void Variable::g(Variable* v,ostream& strm,Equation* eq) b from c = *call* f ( a , *call* g ( b ) ) . compared with a << void Variable::g(Variable* v,ostream& strm,Equation* eq) << void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) << void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) << void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) << void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) << void Equation::g(Variable* v,ostream& strm) going through next equation d = *call* h ( 1 , c , 6 ) . >> void Equation::g(Variable* v,ostream& strm) >> void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) >> void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) >> void Number::g(Variable* v,ostream& strm,Equation* eq) << void Number::g(Variable* v,ostream& strm,Equation* eq) >> void Variable::g(Variable* v,ostream& strm,Equation* eq) c from d = *call* h ( 1 , c , 6 ) . compared with a << void Variable::g(Variable* v,ostream& strm,Equation* eq) >> void Number::g(Variable* v,ostream& strm,Equation* eq) << void Number::g(Variable* v,ostream& strm,Equation* eq) << void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) << void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) << void Equation::g(Variable* v,ostream& strm) << void Equation_List::g(Variable* v,ostream& strm) << void EquationSystem::g(Variable* v,ostream& strm) << void Variable::f(ostream& strm,EquationSystem* c) << void Equation::f(ostream& strm,EquationSystem* c) >> void Equation::f(ostream& strm,EquationSystem* c) >> void Variable::f(ostream& strm,EquationSystem* c) b :3 >> void EquationSystem::g(Variable* v,ostream& strm) >> void Equation_List::g(Variable* v,ostream& strm) going through next equation a = 1 . >> void Equation::g(Variable* v,ostream& strm) >> void Number::g(Variable* v,ostream& strm,Equation* eq) << void Number::g(Variable* v,ostream& strm,Equation* eq) << void Equation::g(Variable* v,ostream& strm) going through next equation b = 2 . >> void Equation::g(Variable* v,ostream& strm) >> void Number::g(Variable* v,ostream& strm,Equation* eq) << void Number::g(Variable* v,ostream& strm,Equation* eq) << void Equation::g(Variable* v,ostream& strm) going through next equation c = *call* f ( a , *call* g ( b ) ) . >> void Equation::g(Variable* v,ostream& strm) >> void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) >> void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) >> void Variable::g(Variable* v,ostream& strm,Equation* eq) a from c = *call* f ( a , *call* g ( b ) ) . compared with b << void Variable::g(Variable* v,ostream& strm,Equation* eq) >> void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) >> void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) >> void Variable::g(Variable* v,ostream& strm,Equation* eq) b from c = *call* f ( a , *call* g ( b ) ) . compared with b used on 4 << void Variable::g(Variable* v,ostream& strm,Equation* eq) << void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) << void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) << void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) << void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) << void Equation::g(Variable* v,ostream& strm) going through next equation d = *call* h ( 1 , c , 6 ) . >> void Equation::g(Variable* v,ostream& strm) >> void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) >> void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) >> void Number::g(Variable* v,ostream& strm,Equation* eq) << void Number::g(Variable* v,ostream& strm,Equation* eq) >> void Variable::g(Variable* v,ostream& strm,Equation* eq) c from d = *call* h ( 1 , c , 6 ) . compared with b << void Variable::g(Variable* v,ostream& strm,Equation* eq) >> void Number::g(Variable* v,ostream& strm,Equation* eq) << void Number::g(Variable* v,ostream& strm,Equation* eq) << void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) << void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) << void Equation::g(Variable* v,ostream& strm) << void Equation_List::g(Variable* v,ostream& strm) << void EquationSystem::g(Variable* v,ostream& strm) << void Variable::f(ostream& strm,EquationSystem* c) << void Equation::f(ostream& strm,EquationSystem* c) >> void Equation::f(ostream& strm,EquationSystem* c) >> void Variable::f(ostream& strm,EquationSystem* c) c :4 >> void EquationSystem::g(Variable* v,ostream& strm) >> void Equation_List::g(Variable* v,ostream& strm) going through next equation a = 1 . >> void Equation::g(Variable* v,ostream& strm) >> void Number::g(Variable* v,ostream& strm,Equation* eq) << void Number::g(Variable* v,ostream& strm,Equation* eq) << void Equation::g(Variable* v,ostream& strm) going through next equation b = 2 . >> void Equation::g(Variable* v,ostream& strm) >> void Number::g(Variable* v,ostream& strm,Equation* eq) << void Number::g(Variable* v,ostream& strm,Equation* eq) << void Equation::g(Variable* v,ostream& strm) going through next equation c = *call* f ( a , *call* g ( b ) ) . >> void Equation::g(Variable* v,ostream& strm) >> void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) >> void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) >> void Variable::g(Variable* v,ostream& strm,Equation* eq) a from c = *call* f ( a , *call* g ( b ) ) . compared with c << void Variable::g(Variable* v,ostream& strm,Equation* eq) >> void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) >> void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) >> void Variable::g(Variable* v,ostream& strm,Equation* eq) b from c = *call* f ( a , *call* g ( b ) ) . compared with c << void Variable::g(Variable* v,ostream& strm,Equation* eq) << void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) << void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) << void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) << void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) << void Equation::g(Variable* v,ostream& strm) going through next equation d = *call* h ( 1 , c , 6 ) . >> void Equation::g(Variable* v,ostream& strm) >> void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) >> void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) >> void Number::g(Variable* v,ostream& strm,Equation* eq) << void Number::g(Variable* v,ostream& strm,Equation* eq) >> void Variable::g(Variable* v,ostream& strm,Equation* eq) c from d = *call* h ( 1 , c , 6 ) . compared with c used on 5 << void Variable::g(Variable* v,ostream& strm,Equation* eq) >> void Number::g(Variable* v,ostream& strm,Equation* eq) << void Number::g(Variable* v,ostream& strm,Equation* eq) << void Exp_CommaList::g(Variable* v,ostream& strm,Equation* eq) << void FunctionCall::g(Variable* v,ostream& strm,Equation* eq) << void Equation::g(Variable* v,ostream& strm) << void Equation_List::g(Variable* v,ostream& strm) << void EquationSystem::g(Variable* v,ostream& strm) << void Variable::f(ostream& strm,EquationSystem* c) rest deleted Given the following sentence A = 1. B = 2. C = 3. Z = *call* f(A, *call* g(B), *call* h(*call* i(C))). find the UNKNOWNs in the following object: : EquationSystem ( < eqs > : Equation_List { : Equation ( < var > : Variable ( < variableName > : DemIdent "A" ) < exp > : Number ( < n > : DemNumber "1" ) ) , : Equation ( < var > : Variable ( < variableName > : DemIdent "B" ) < exp > : Number ( < n > : DemNumber "2" ) ) , : Equation ( < var > : Variable ( < variableName > : DemIdent "C" ) < exp > : Number ( < n > : DemNumber "3" ) ) , : Equation ( < var > : Variable ( < variableName > : DemIdent "Z" ) < exp > : FunctionCall ( < fn > : Function ( < functionName > : DemIdent "f" ) < args > : Exp_CommaList { : Variable ( < variableName > : DemIdent "A" ) , : FunctionCall ( < fn > : Function ( < functionName > : DemIdent "g" ) < args > : Exp_CommaList { : Variable ( < variableName > : DemIdent "B" ) } ) , : FunctionCall ( < fn > : Function ( < functionName > : DemIdent "h" ) < args > : Exp_CommaList { : FunctionCall ( < fn > : Function ( < functionName > : DemIdent "i" ) < args > : Exp_CommaList { : Variable ( < variableName > : DemIdent "C" ) } ) } ) } ) ) } ) Consider the following propagation pattern *operation* void f(ostream& strm) *traverse* *from* EquationSystem *through* -> *,var,* *to* Variable *carry* *in* EquationSystem* c *along* *from* EquationSystem *to* Variable *at* EquationSystem c =(@ this @) *wrapper* Variable *prefix* (@ strm << this << "\t:" << this->get_variableName()->get_line_number() << "\t"; c->g(this,strm); strm << "\n";@) *operation* void g(Variable* v,ostream& strm) *traverse* *from* EquationSystem *bypassing* -> *,var,* *to* Variable *carry* *in* Equation* eq *along* *from* Equation *to* Variable *at* Equation eq = (@ this @) *wrapper* ~> Equation_List, Equation *prefix* (@ cout << "going through next equation " << each_Equation << endl; @) *wrapper* Variable *prefix* (@ cout << endl << this << " from " << eq << " compared with " << v << endl; if (this->g_equal(v)) { strm << "used on " << this->get_variableName()->get_line_number() << "\n"; } @) Find the UNKNOWNs in the following C++ program: void EquationSystem::f( ostream& strm ) { // variables for carrying in and out EquationSystem* c ; // assignments for carrying in c = this ; // outgoing calls eqs ->f( strm , c ); } void Equation::f( ostream& strm, EquationSystem* c ) { // outgoing calls var ->f( strm , c ); } void Variable::f( ostream& strm, EquationSystem* c ) { // prefix blocks strm << this << "\t:" << this->get_variableName()->get_line_number() << "\t"; c->g(this,strm); strm << "\n"; } void Equation_List::f( ostream& strm, EquationSystem* c ) { // outgoing calls Equation_list_iterator next_Equation(*this); Equation* each_Equation; while ( each_Equation = next_Equation() ) { each_Equation->f( strm , c ); } } void EquationSystem::g( Variable* v,ostream& strm ) { // outgoing calls eqs ->g( v , strm ); } void Equation::g( Variable* v,ostream& strm ) { // variables for carrying in and out Equation* eq ; // assignments for carrying in eq = this ; // outgoing calls exp ->g( v , strm , eq ); } void Exp::g( Variable* v,ostream& strm, Equation* eq ) { } void Number::g( Variable* v,ostream& strm, Equation* eq ) { } void FunctionCall::g( Variable* v,ostream& strm, Equation* eq ) { // outgoing calls args ->g( v , strm , eq ); } void Variable::g( Variable* v,ostream& strm, Equation* eq ) { cout << endl << this << " from " << eq << " compared with " << v << endl; if (this->g_equal(v)) { strm << "used on " << this->get_variableName()->get_line_number() << "\n"; } } void Equation_List::g( Variable* v,ostream& strm ) { // outgoing calls Equation_list_iterator next_Equation(*this); Equation* each_Equation; while ( each_Equation = next_Equation() ) { cout << "going through next equation " << each_Equation << endl; each_Equation->g( v , strm ); } } void Exp_CommaList::g( Variable* v,ostream& strm, Equation* eq ) { // outgoing calls Exp_list_iterator next_Exp(*this); Exp* each_Exp; while ( each_Exp = next_Exp() ) { each_Exp->g( v , strm , eq ); } }