Counterfactuals, Logic Programming and Agent Morality

Luís Moniz Pereira, Ari Saptawijaya

Research output: Chapter in Book/Report/Conference proceedingChapterpeer-review

11 Citations (Scopus)


This paper supplies a computational model, via Logic Programming (LP), of counterfactual reasoning of autonomous agents with application to morality. Counterfactuals are conjectures about what would have happened had an alternative event occurred. The first contribution of the paper is showing how counterfactual reasoning is modeled using LP, benefiting from LP abduction and updating. The approach is inspired by Pearl’s structural causal model of counterfactuals, where causal direction and conditional reasoning are captured by inferential arrows of rules in LP. Herein, LP abduction hypothesizes background conditions from given evidence or observations, whereas LP updating frame these background conditions as a counterfactual’s context, and then imposes causal interventions on the program through defeasible LP rules. The second contribution it to apply counterfactuals to agent morality using this LP-based approach. We demonstrate its potential for specifying and querying moral issues, by examining viewpoints on moral permissibility via classic moral principles and examples taken from the literature. Application results were validated on a prototype implementing the approach on top of an integrated LP abduction and updating system supporting tabling.

Original languageEnglish
Title of host publicationLogic, Argumentation and Reasoning
PublisherSpringer Science and Business Media B.V.
Number of pages29
Publication statusPublished - 2017

Publication series

NameLogic, Argumentation and Reasoning
ISSN (Print)2214-9120
ISSN (Electronic)2214-9139


  • Abduction
  • Counterfactuals
  • Logic programming
  • Morality
  • Nonmonotonic reasoning


Dive into the research topics of 'Counterfactuals, Logic Programming and Agent Morality'. Together they form a unique fingerprint.

Cite this