Monitor for k-safety hyperproperties