Learning middleware models for verification of distributed control programs