Function block diagram (FBD) is a standard programming language for programmable logic controllers (PLCs). PLCs have been widely used to develop safety-critical systems such as nuclear reactor protection systems. It is crucial to test FBD programs for such systems effectively. Research mainly focused on automated FBD test generation to achieve certain structural coverage criteria. Tests achieving a high coverage level can detect errors but fail to provide the assurance of fault detection. Mutation testing is an error-based testing technique to detect specific types of errors. To give some assurance of fault detection, this paper presents an automated test sequence generation approach using mutation testing techniques for FBD programs and the developed tool, MuFBDTester. MuFBDTester translates the given program and mutants into the input language of a satisfiability modulo theories (SMT) solver to derive a set of test sequences. The primary objective is to find the test data that can distinguish between the results of the given program and mutants. We conducted experiments with several examples including real industrial cases to evaluate the effectiveness and efficiency of our approach. The results indicate that the mutation-based test suites identified a tremendously high percentage of the artificial faults, including the faults that test suites generated to meet coverage criteria could not identify. The test suite generation time of MuFBDTester was significantly reduced compared to manual generation. When compared to coverage-based test generation time, it was sometimes longer, but reasonable considering its better fault detection effectiveness. MuFBDTester can provide highly effective test suites for FBD engineers.
FBD는 안전 필수 시스템에 사용되는 PLC를 위한 프로그래밍 언어로, FBD 프로그램의 효과적인 테스팅이 필수적이다. FBD 프로그램의 테스팅 기법은 특정 구조적 커버리지를 만족시키는 테스트 집합을 자동화해 생성하는 것에 집중되었으며, 이 방식은 오류 민감성은 높지만, 정밀도가 떨어지는 단점이 있다. 이 연구에서는 오류 기반 테스팅 기술인 뮤테이션 테스팅을 활용하여 테스팅의 정밀도를 높이는 방식을 제안하며, 이를 활용한 MuFBDTester 도구를 제시한다. 이 도구는 주어진 프로그램을 분석, 뮤턴트들을 생성하고, SMT 해결기를 활용하여 테스트 시퀀스를 생성함으로써, 주어진 프로그램과 뮤턴트를 구별하는 테스트 데이터를 찾아낸다. 실제 산업 사례를 포함한 사례연구를 진행한 결과, 이 도구의 결함 식별도가 다른 접근 방식에 비해 높은 것을 발견하였다. 테스트 집합 생성 시간은 기존 방식보다 약간 느리거나 비슷했으나, 결함 감지 수준 고려할 때 합리적이었으며, 수동적 방식에 비해 매우 빨랐다. 사례연구 결과를 종합할 때, 해당 접근 방식과 도구는 FBD 엔지니어에게 매우 효과적인 테스트 집합을 제공할 수 있다.