Logics and algorithms for distributed monitoring spatio-temporal properties of cyber physical systems