Automatic analysis of building management systems