计算机科学 ›› 2017, Vol. 44 ›› Issue (Z11): 348-352.doi: 10.11896/j.issn.1002-137X.2017.11A.073

• 信息安全 • 上一篇    下一篇

基于符号约束的PLC程序正确性验证

张晔,陆余良   

  1. 电子工程学院 合肥230037,电子工程学院 合肥230037
  • 出版日期:2018-12-01 发布日期:2018-12-01

ZHANG Ye and LU Yu-liang   

  • Online:2018-12-01 Published:2018-12-01

摘要: 符号约束描述了程序中的变量关系,被广泛运用于模型检测、符号执行等程序的静态分析方法中。将符号约束应用于可编程逻辑控制器(PLC)程序的正确性验证,能够发现程序中的逻辑错误。人工计算符号约束不仅冗杂枯燥,而且错误率高。针对语句表形式的PLC程序,提出一种基于符号约束的正确性验证方法,通过分析PLC源代码的控制流及数据流,构造程序的控制流图并将其转换为静态单赋值形式的三地址码,最后使用迭代计算的方法求出每个变量的符号约束。

关键词: 可编程逻辑控制器,符号约束,正确性验证,三地址码,静态单赋值

Abstract: Symbolic constraints describe the relations among variables of the program,and they are widely used in static program analysis methods such as model checking and symbol execution.The logic error in the program could be found while applying symbolic constraints to the correctness verification of the programmable logic controller (PLC)program.However,the process of manually computing symbolic constraints is not only cumbersome and boring,but also with high error rates.Aiming at the PLC program in the form of statement list (STL),a verification method based on gene-rating symbol constraint automatic was proposed.By analyzing the control flow and data flow of the PLC source code,the control flow graph of the program is constructed and the source code is converted into three address code in the form of static single assignment.Finally,the iterative method is used to find the symbol constraint of each variable.

[1] 陈钢,宋晓宇,顾明.COQ定理证明器辅助PLC程序验证和分析[J].北京大学学报(自然科学版),2010,46(1):30-34.
[2] 肖力田,顾明,孙家广.一种PLC程序语言指称语义及函数的形式化定义方法[C]∥中国智能自动化会议.2011.
[3] 陈雪琨.PLC程序的Petri网建模与分析方法研究[D].泉州:华侨大学,2013.
[4] BIALLAS S,BRAUER J,ARCADE K S.PLC:A verificationplatform for programmable logic controllers[C]∥Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering.ACM,2012:338-341.
[5] DARVAS D,APIEGO B F,VINUELA E B.PLCverif:a tool to verify PLC programs based on model checking techniques[C]∥ International Conference on Accelerator and Large Experimental Physics Control Systems.2015:911-914.
[6] ADIEGO B F,DARVAS D,VINUELA E B,et al.Applying modelchecking to industrial-sized PLC programs[J].IEEE Transactions on Industrial Informatics,2015,11(6):1400-1410.
[7] MCLAUGHLIN S E,ZONOUZ S A,POHLY D J,et al.ATrusted Safety Verifier for Process Controller Code[C]∥NDSS.2014:14.
[8] OULD BIHA S.A Formal Semantics of PLC Programs in Coq[C]∥IEEE International Computer Software and Applications Conference,COMPSAC 2011.Munich,Germany,DBLP,2011:118-127.
[9] BLECH J O,BIHA S O.On Formal Reasoning on the Semantics of PLC using Coq[J].axXiv:2013.1301:3047.
[10] IEC (International Electrotechnical Commission).IEC Standard 61131-3:Programmable controllers-Part 3[S].1993.
[11] CYTRON R,FERRANTE J,ROSEN B K,et al.EfficientlyComputing Static Single Assignment Form and the Control Dependence Graph[J].ACM Transactions on Programming Languages & Systems,1991,13(4):451-490.
[12] 西门子股份有限公司.SIMATIC S7-300和S7-400语句表 (STL)编程:参考手册[M].西门子股份有限公司,2002.

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!