Generating explanations for answer set programming applications