Stress analysis and slope stability in strain-softening materials