Unified Modeling and Verification of Logic Controllers for Physical Systems