add children recurs collect argument algorithm assum cycl node visit twice us known gener param current children collect collect param gen element children ad param gener list travers gener illeg state except circular refer children collect generaliz element current children gener gen collect gener gener generaliz element child gen child current children contain child gener contain gen illeg state except circular inherit occur current children add child gener add gen collect gener special model facad special child gener special special children current children special gener 