  The explication and the generation of explanations are prominent topics in
artificial intelligence and data science, in order to make methods and systems
more transparent and understandable for humans. This paper investigates the
problem of link analysis, specifically link prediction and anomalous link
discovery in social networks using the declarative method of Answer set
programming (ASP). Applying ASP for link prediction provides a powerful
declarative approach, e.g., for incorporating domain knowledge for explicative
prediction. In this context, we propose a novel method for generating
explanations - as offline justifications - using declarative program
transformations. The method itself is purely based on syntactic transformations
of declarative programs, e.g., in an ASP formalism, using rule instrumentation.
We demonstrate the efficacy of the proposed approach, exemplifying it in an
application on link analysis in social networks, also including domain
knowledge.
