Computer Science ›› 2017, Vol. 44 ›› Issue (11): 91-97.doi: 10.11896/j.issn.1002-137X.2017.11.014

Previous Articles     Next Articles

Deriving Invariants from Database Transactions

ZENG Hong-chi, PENG Xin and ZHAO Wen-yun   

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

Abstract: As the basic unit of data processing and concurrency control,database transaction is widely used in business logic of software applications.It is a significant method in software maintenance for monitoring internal state to derive invariants and establish corresponding data contracts based on data collected from database transactions at runtime.Currently,in the field of invariant derivation,most researches and tools are just based on deriving invariants from source code, while there is lack of researches on deriving invariants from data.To solve this problem,this paper firstly introduced an algorithm for deriving invariants in the form of algebraic equations.Moreover,a prototyping tool was designed and implemented to collect data from database transactions at runtime and derive invariants among these data.With experiments,the prototyping tool is proved to be effective both on accuracy and performance,which fills the gap of inva-riants derivation based on data.

Key words: Database transaction,Invariant derivation,Algebraic equation

[1] WANG H Z.Quality management of big data:problems andprogress [J].Science & Technology Review,2014(34):78-84.(in Chinese) 王宏志.大数据质量管理:问题与研究进展[J].科技导报,2014(34):78-84.
[2] PERKINS J H,KIM S,LARSEN S,et al.Automatically patching errors in deployed software[C]∥Proceedings of the ACM SIGOPS 22nd Symposium on Operating systems Principles.ACM,2009:87-102.
[3] 吴世忠.软件漏洞分析技术[M].北京:科学出版社,2014:26-28.
[4] MEYER B.Design by Contract[M].Prentice Hall,2002 .
[5] MEYER B.Eiffel:The Language[M].Prentice-Hall,Inc., 1992:20-30.
[6] LEAVENS G T,BAKER A L,RUBY C.Preliminary Design of JML:A behavioral interface specification language for Java[J].ACM SIGSOFT Software Engineering Notes,2006,31(3):1-38.
[7] SCHILLER T W,DONOHUE K,COWARD F,et al.Case stu-dies and tools for contract specifications[C]∥Proceedings of the 36th International Conference on Software Engineering.ACM,2014:596-607.
[8] ERNST M D,COCKRELL J,GRISWOLD W G,et al.Dynamically discovering likely program invariants to support program evolution[J].IEEE Transactions on Software Engineering,2001,27(2):99-123.
[9] LEMIEUX C.Mining temporal properties of data invariants[C]∥2015 IEEE/ACM 37th IEEE International Conference on Software Engineering (ICSE).IEEE,2015:751-753.
[10] HANGAL S,LAM M S.Tracking down software bugs using automatic anomaly detection[C]∥Proceedings of the 24th International Conference on Software Engineering.ACM,2002:291-301.
[11] ERNST M D,PERKINS J H,GUO P J,et al.The Daikon system for dynamic detection of likely invariants[J].Science of Computer Programming,2007,69(1):35-45.
[12] 金路.高等数学(第3版上)[M].北京:高等教育出版社,2008.
[13] NGUYEN T V,KAPUR D,WEIMER W,et al.Using dynamic analysis to discover polynomial and array invariants[C]∥2012 34th International Conference on Software Engineering (ICSE).IEEE,2012:683-693.
[14] P6Spy.
[15] 蔡雪焘.Java开发利器:Hibermate开发及整合应用大全(珍藏版)[M].北京:清华大学出版社,2006:579-583.
[16] COBB J,JONES J A,KAPFHAMMER G M,et al.Dynamic invariant detection for relational databases[C]∥Proceedings of the Ninth International Workshop on Dynamic Analysis.ACM,2011:12-17.

No related articles found!
Full text



[1] LEI Li-hui and WANG Jing. Parallelization of LTL Model Checking Based on Possibility Measure[J]. Computer Science, 2018, 45(4): 71 -75, 88 .
[2] XIA Qing-xun and ZHUANG Yi. Remote Attestation Mechanism Based on Locality Principle[J]. Computer Science, 2018, 45(4): 148 -151, 162 .
[3] LI Bai-shen, LI Ling-zhi, SUN Yong and ZHU Yan-qin. Intranet Defense Algorithm Based on Pseudo Boosting Decision Tree[J]. Computer Science, 2018, 45(4): 157 -162 .
[4] WANG Huan, ZHANG Yun-feng and ZHANG Yan. Rapid Decision Method for Repairing Sequence Based on CFDs[J]. Computer Science, 2018, 45(3): 311 -316 .
[5] SUN Qi, JIN Yan, HE Kun and XU Ling-xuan. Hybrid Evolutionary Algorithm for Solving Mixed Capacitated General Routing Problem[J]. Computer Science, 2018, 45(4): 76 -82 .
[6] ZHANG Jia-nan and XIAO Ming-yu. Approximation Algorithm for Weighted Mixed Domination Problem[J]. Computer Science, 2018, 45(4): 83 -88 .
[7] WU Jian-hui, HUANG Zhong-xiang, LI Wu, WU Jian-hui, PENG Xin and ZHANG Sheng. Robustness Optimization of Sequence Decision in Urban Road Construction[J]. Computer Science, 2018, 45(4): 89 -93 .
[8] LIU Qin. Study on Data Quality Based on Constraint in Computer Forensics[J]. Computer Science, 2018, 45(4): 169 -172 .
[9] ZHONG Fei and YANG Bin. License Plate Detection Based on Principal Component Analysis Network[J]. Computer Science, 2018, 45(3): 268 -273 .
[10] SHI Wen-jun, WU Ji-gang and LUO Yu-chun. Fast and Efficient Scheduling Algorithms for Mobile Cloud Offloading[J]. Computer Science, 2018, 45(4): 94 -99, 116 .