摘要:AbstractReal-world PLC software is modular and composed of many different function blocks. Due to its cyclic execution, an engineer’s mental model of a single function block often exhibits state machine semantics – partitioning a block’s behaviours into different modes of operation. We propose a technique calledmode abstractionfor automatic computation of such high-level models from program semantics and investigate its impact on the overall model checking performance. To this end, we use constrained horn clauses to characterise the program semantics, mode transitions and safety goals in a compositional way. The resulting verification conditions are discharged using an SMT solver.Evaluation of our prototypical implementation on examples from the PLCopen Safety library shows the effectiveness of both the chosen formalism and mode abstraction.