Towards Ethical Machines Via Logic Programming