// given a class graph, find all concrete subclasses of a given class *operation* Vertex_List* find_assoc(Vertex* v) *init* (@ new Vertex_List(); @) *wrapper* CdGraph *prefix* (@ this -> find_associated(return_val, v, this); @) *operation* void find_associated(Vertex_List* l, Vertex* v, CdGraph* cd) *init* (@ new Vertex_List(); @) *traverse* *merge* ( *from* CdGraph *to* C, *from* CdGraph *through* -> *,alternatNs,* *to* Vertex) // can replace with bypassing in this case // but this is much less intuitive => merge is a useful operator //*from* CdGraph // *bypassing* -> *,constructNs,* , // -> *,source,* //*to* {Vertex, C} *wrapper* Adjacency *prefix* (@ if (source->g_equal(v)) { @) *suffix* (@ } @) *wrapper* C *prefix* (@ l -> append((Vertex *)(v -> g_copy())); cout << "\n Vertex appended" << v; @) *wrapper* Vertex *prefix* (@ cd -> find_associated(l, this, cd); @)