Influence graph analysis, consistency check, diagnosis, repair and prediction