A microscopic approach to the theory of polymer ablation