Stereoselective syntheses of substituted pterocarpans with anti-HIV activity, and 5-aza-/5-thia-pterocarpan and 2-aryl-2,3-dihydrobenzofuran analogues.