An option to recursively remove a package and its reverse dependencies will complement the related option requested in bug 416907. It's possible to achieve an equivalent result by using emerge --deselect <packages> && emerge --depclean, but we need an automated way to determine the recursive reverse dependencies in the emerge --deselect <packages> list, and we don't want to invoke the global emerge --depclean command.
This calculation is useful for various conflict resolution strategies, since it can be used to actively eliminate packages with conflicting or unsatisfiable dependencies. It can possibly be adapted as a means to automatically constrain the scope of emerge --keep-going calculations to fit the behavior described in bug 476350.
Since emerge --depclean already builds a suitable dependency graph for this calculation, it's just a matter of performing the graph operations to determine which packages would have to be deselected, which should only be a few lines of code if expressed well.
Simply traverse graph edges from the packages that we would like to remove, and use the PackageSet iterAtomsForPackage method to pair edges with matching @selected atoms that need to be deselected.