  We propose a theoretical framework for R-parity violation. It is realized by
a class of Calabi--Yau compactification of Heterotic string theory. Trilinear
R-parity violation in superpotential is either absent or negligibly small
without an unbroken symmetry, due to a selection rule based on charge counting
of a spontaneously broken U(1) symmetry. Although such a selection rule cannot
be applied in general to non-renormalizable operators in the low-energy
effective superpotential, it is valid for terms trilinear in low-energy degrees
of freedom, and hence can be used as a solution to the dimension-4 proton decay
problem in the minimal supersymmetric standard model. Bilinear R-parity
violation is generated, but there are good reasons why they are small enough to
satisfy its upper bounds from neutrino mass and washout of baryon/lepton
asymmetry. All R-parity violating dimension-5 operators can be generated. In
this theoretical framework, nucleons can decay through squark-exchange diagrams
combining dimension-5 and bilinear R-parity violating operators. B-L breaking
neutron decay is predicted.
