Logics of Programs and Their Applications