Detecting and repairing anomalous evolutions in noisy environments - Logic programming formalization and complexity results