Factory map generation and circular dependency detection.