#include "pp.h" // Propagation_directive_exp : Pde | // Merge_pde | // Join_pde | // Dir_name_with_exp // *common* . void Propagation_directive_exp::bind_pde( Meta_def* finalmeta,Propagation_directive_exp* & pdexp ) { DEM_TRACE("Propagation_directive_exp","void Propagation_directive_exp::bind_pde(Meta_def* finalmeta,Propagation_directive_exp* & pdexp)"); #ifndef NOTRACE DemTrace demTraceEmptyMethod(__FILE__,__LINE__,"Propagation_directive_exp",form(" at %s , *** PREMATURELY TERMINATED *** ", this->get_type())); #endif } // Dir_name_with_exp = DemIdent . void Dir_name_with_exp::bind_pde( Meta_def* finalmeta,Propagation_directive_exp* & pdexp ) { DEM_TRACE("Dir_name_with_exp","void Dir_name_with_exp::bind_pde(Meta_def* finalmeta,Propagation_directive_exp* & pdexp)"); // variables for carrying in and out // assignments for carrying in // prefix class wrappers finalmeta->bind_pde2(this->get_inst(),pdexp); // outgoing calls // suffix class wrappers // assignments for carrying out } // Pde = "*from*" // Vertex_selector // [ Path_constraint_exp ] // Segment_List . void Pde::bind_pde( Meta_def* finalmeta,Propagation_directive_exp* & pdexp ) { DEM_TRACE("Pde","void Pde::bind_pde(Meta_def* finalmeta,Propagation_directive_exp* & pdexp)"); // variables for carrying in and out // assignments for carrying in // prefix class wrappers // outgoing calls // suffix class wrappers // assignments for carrying out } // Merge_pde = "*merge*" // "(" // Propagation_directive_exp // "," // Propagation_directive_exp // ")" . void Merge_pde::bind_pde( Meta_def* finalmeta,Propagation_directive_exp* & pdexp ) { DEM_TRACE("Merge_pde","void Merge_pde::bind_pde(Meta_def* finalmeta,Propagation_directive_exp* & pdexp)"); // variables for carrying in and out // assignments for carrying in // prefix class wrappers Propagation_directive_exp * exp1 = NULL; Propagation_directive_exp * exp2 = NULL; this->get_pde1()->bind_pde(finalmeta,exp1); this->get_pde2()->bind_pde(finalmeta,exp2); if (exp1 != NULL) this->rset_pde1((Propagation_directive_exp *)exp1->g_copy())->g_delete(); if (exp2 != NULL) this->rset_pde2((Propagation_directive_exp *)exp2->g_copy())->g_delete(); // outgoing calls // construction edge prefix wrappers this->get_pde1()->bind_pde( finalmeta , pdexp ); // construction edge suffix wrappers // construction edge prefix wrappers this->get_pde2()->bind_pde( finalmeta , pdexp ); // construction edge suffix wrappers // suffix class wrappers // assignments for carrying out } // Join_pde = "*join*" // "(" // Propagation_directive_exp // "," // Propagation_directive_exp // ")" . void Join_pde::bind_pde( Meta_def* finalmeta,Propagation_directive_exp* & pdexp ) { DEM_TRACE("Join_pde","void Join_pde::bind_pde(Meta_def* finalmeta,Propagation_directive_exp* & pdexp)"); // variables for carrying in and out // assignments for carrying in // prefix class wrappers Propagation_directive_exp * exp1 = NULL; Propagation_directive_exp * exp2 = NULL; this->get_pde1()->bind_pde(finalmeta,exp1); this->get_pde2()->bind_pde(finalmeta,exp2); if (exp1 != NULL) this->rset_pde1((Propagation_directive_exp *)exp1->g_copy())->g_delete(); if (exp2 != NULL) this->rset_pde2((Propagation_directive_exp *)exp2->g_copy())->g_delete(); // outgoing calls // construction edge prefix wrappers this->get_pde1()->bind_pde( finalmeta , pdexp ); // construction edge suffix wrappers // construction edge prefix wrappers this->get_pde2()->bind_pde( finalmeta , pdexp ); // construction edge suffix wrappers // suffix class wrappers // assignments for carrying out } // Meta_macro_def = [ Term_Commalist ] // [ Meta_edge_Commalist ] // [ Class_set_def_Amplist ] // [ Dir_meta_def_Amplist ] // [ PCP_def_Amplist ] . void Meta_macro_def::bind_pde2( DemIdent* inst_name,Propagation_directive_exp* & pdexp ) { DEM_TRACE("Meta_macro_def","void Meta_macro_def::bind_pde2(DemIdent* inst_name,Propagation_directive_exp* & pdexp)"); // variables for carrying in and out // assignments for carrying in // prefix class wrappers Propagation_directive_exp * r = NULL; if (this->get_dirs() != NULL) this->get_dirs()->find_pde(r,inst_name); if (r != NULL) pdexp = (Propagation_directive_exp *)r->g_copy(); else { cout << toolname << ": undefined propagation directive expression variable : '" << inst_name->get_val() << "' on line " << inst_name->get_line_number() << endl; exit(-1); } // outgoing calls if ( this->get_macros() != NULL ) { // construction edge prefix wrappers this->get_macros()->bind_pde2( inst_name , pdexp ); // construction edge prefix wrappers } // suffix class wrappers // assignments for carrying out } // PCP_def = PCP_def_name // "=" // PCP // ";" . void PCP_def::bind_pde2( DemIdent* inst_name,Propagation_directive_exp* & pdexp ) { DEM_TRACE("PCP_def","void PCP_def::bind_pde2(DemIdent* inst_name,Propagation_directive_exp* & pdexp)"); // variables for carrying in and out // assignments for carrying in // prefix class wrappers // outgoing calls // construction edge prefix wrappers this->get_pcp()->bind_pde2( inst_name , pdexp ); // construction edge suffix wrappers // suffix class wrappers // assignments for carrying out } // PCP : Propagation_directive_exp | // Propagation_pattern // *common* . void PCP::bind_pde2( DemIdent* inst_name,Propagation_directive_exp* & pdexp ) { DEM_TRACE("PCP","void PCP::bind_pde2(DemIdent* inst_name,Propagation_directive_exp* & pdexp)"); #ifndef NOTRACE DemTrace demTraceEmptyMethod(__FILE__,__LINE__,"PCP",form(" at %s , *** PREMATURELY TERMINATED *** ", this->get_type())); #endif } // Meta_def = + // "*constraints*" // *l // Meta_macro_def // "*end*" // - // *l. void Meta_def::bind_pde2( DemIdent* inst_name,Propagation_directive_exp* & pdexp ) { DEM_TRACE("Meta_def","void Meta_def::bind_pde2(DemIdent* inst_name,Propagation_directive_exp* & pdexp)"); // variables for carrying in and out // assignments for carrying in // prefix class wrappers // outgoing calls // construction edge prefix wrappers this->get_meta_def()->bind_pde2( inst_name , pdexp ); // construction edge suffix wrappers // suffix class wrappers // assignments for carrying out } // Propagation_pattern =
Header // [ Rename ] // [ Meta_def ] // Impl_or_loc . void Propagation_pattern::bind_pde2( DemIdent* inst_name,Propagation_directive_exp* & pdexp ) { DEM_TRACE("Propagation_pattern","void Propagation_pattern::bind_pde2(DemIdent* inst_name,Propagation_directive_exp* & pdexp)"); // variables for carrying in and out // assignments for carrying in // prefix class wrappers // outgoing calls if ( this->get_meta_def() != NULL ) { // construction edge prefix wrappers this->get_meta_def()->bind_pde2( inst_name , pdexp ); // construction edge prefix wrappers } // suffix class wrappers // assignments for carrying out } // PCP_def_Amplist ~ PCP_def { PCP_def }. . void PCP_def_Amplist::bind_pde2( DemIdent* inst_name,Propagation_directive_exp* & pdexp ) { DEM_TRACE("PCP_def_Amplist","void PCP_def_Amplist::bind_pde2(DemIdent* inst_name,Propagation_directive_exp* & pdexp)"); // variables for carrying in and out // assignments for carrying in // prefix class wrappers // outgoing calls PCP_def_list_iterator next_PCP_def(*this); PCP_def* each_PCP_def; while ( each_PCP_def = next_PCP_def() ) { // repetition edge prefix wrappers each_PCP_def->bind_pde2( inst_name , pdexp ); // repetition edge suffix wrappers } // suffix class wrappers // assignments for carrying out }