kirancodes.me
To Proof Maintenance & Beyond!

Symbolic execution of programmable logic controller code

Shengjian Guo, Meng Wu, Chao Wang

Abstract

Programmable logic controllers (PLCs) are specialized computers for automating a wide range of cyber-physical systems. Since these systems are often safety-critical, software running on PLCs need to be free of programming errors. However, automated tools for testing PLC software are lacking despite the pervasive use of PLCs in industry. We propose a symbolic execution based method, named SymPLC, for automatically testing PLC software written in programming languages specified in the IEC 61131-3 standard. SymPLC takes the PLC source code as input and translates it into C before applying symbolic execution, to systematically generate test inputs that cover both paths in each periodic task and interleavings of these tasks. Toward this end, we propose a number of PLC-specific reduction techniques for identifying and eliminating redundant interleavings. We have evaluated SymPLC on a large set of benchmark programs with both single and multiple tasks. Our experiments show that SymPLC can handle these programs efficiently, and for multi-task PLC programs, our new reduction techniques outperform the state-of-the-art partial order reduction technique by more than two orders of magnitude.

BibTeX
@inproceedings{Guo-al:FSE17,
  author    = {Shengjian Guo and
               Meng Wu and
               Chao Wang},
  title     = {Symbolic execution of programmable logic controller code},
  booktitle = {{ESEC/SIGSOFT} {FSE}},
  pages     = {326--336},
  publisher = {{ACM}},
  year      = {2017},
}

Related papers