time-dependent graph analyser in Prolog