A method for producing a homocyclic or heterocyclic compound includes reacting a compound of formula (I) with a compound of formula (II) in presence of a base: ##STR00001## In formula (I), B is an unsaturated moiety selected from substituted or unsubstituted vinylene, ethynylene, aryleneethynylene, substituted or unsubstituted arylenevinylene, and a combination thereof, the vinylene or arylenevinylene has n (=0, 1 or 2) substituent(s) R.sup.2, G is an electron-withdrawing group, R.sup.1 is hydrogen or a substituent, and two of R.sup.1, R.sup.2 and G may joint together to form a ring. In formula (II), R.sup.3 and R.sup.4 are independently hydrogen or a substituent, R.sup.5 is an electron-withdrawing group, and two of R.sup.3, R.sup.4 and R.sup.5 may joint together to form a ring. The conjugate acid of the base has a pK.sub.a in the range of 1 to 15. |