// Check that formal parameters are not used as parameterized classes. *operation* int check_formal_classes() *init* (@ 1 @) *traverse* *from* Cd_graph *through* ->Adjacency,*,Vertex_Comma_list *to* Vertex *carry* *in* Neighbors* n = (@ this->ns @) *along* *from* Adjacency *to* Vertex *wrapper* Cd_graph *prefix* (@ cout << endl << "Checking that formal parameter classes are not used as" << endl << "\tparameterized classes on the right hand side ..." << endl; @) *wrapper* Vertex *prefix* (@ if (n->check_formal_classes1(this)) return_val = 0; @) *operation* int check_formal_classes1(Vertex* source) *init* (@ 0 @) *traverse* *from* Neighbors *to* Term *wrapper* Term *prefix* (@ if ((this->get_actual_parameters() != NULL) && (this->get_vertex()->g_equal(source))) { cout << "sem-check: error: on line " << this->find_line_number() << " formal parameter: '"; source->g_print(); cout << "' cannot be a parameterized class." << endl; return_val = 1; } @)