On Automating the Doctrine of Double Effect