journal article·2020-01-06Open access

An Automated Refactoring Approach to Improve IoT Software Quality

Yang Zhang, Shuai Shao, Minghan Ji, Jing Qiu, Zhihong Tian, Xiaojiang Du, Mohsen Guizani

Applied Sciences· Volume 10· Issue 1

Abstract

Internet of Things (IoT) software should provide good support for IoT devices as IoT devices are growing in quantity and complexity. Communication between IoT devices is largely realized in a concurrent way. How to ensure the correctness of concurrent access becomes a big challenge to IoT software development. This paper proposes a general refactoring framework for fine-grained read–write locking and implements an automatic refactoring tool to help developers convert built-in monitors into fine-grained ReentrantReadWriteLocks. Several program analysis techniques, such as visitor pattern analysis, alias analysis, and side-effect analysis, are used to assist with refactoring. Our tool is tested by several real-world applications including HSQLDB, Cassandra, JGroups, Freedomotic, and MINA. A total of 1072 built-in monitors are refactored into ReentrantReadWriteLocks. The experiments revealed that our tool can help developers with refactoring for ReentrantReadWriteLocks and save their time and energy.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Software System Performance and Reliability · Advanced Malware Detection Techniques · Cloud Computing and Resource Management

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

School of Information Science and Engineering, Hebei University of Science and Technology, Shijiazhuang 050000, China

Cyberspace Institute of Advanced Technology, Guangzhou University, Guangzhou 510006, China

Department of Computer and Information Sciences, Temple University, Philadelphia, PA 19122, USA

Department of Computer Science and Engineering, Qatar University, Doha 2713, Qatar

Funding

National Natural Science Foundation of China

References (38)

Show source-provided references
1. Cloud-based approximate constrained shortest distance queries over encrypted graphs with privacy protection10.1109/TIFS.2017.2774451 ↗
2. Cloud-based Malware Detection Game for Mobile Devices with Offloading10.1109/TMC.2017.2687918 ↗
3. Current research on Internet of Things (IoT) security: A survey10.1016/j.comnet.2018.11.025 ↗
4. Tian, Z., Luo, C., Qiu, J., Du, X., and Guizani, M. (2019). A distributed deep learning system for Web attack detection on edge devices. IEEE Trans. Ind. Inform.10.1109/TII.2019.2938778 ↗
5. A data-driven method for future Internet route decision modeling10.1016/j.future.2018.12.054 ↗
6. Qiu, J., Chai, Y., Tian, Z., Du, X., and Guizani, M. (2019). Automatic Concept Extraction based on Semantic Graphs from Big Data in Smart City. IEEE Trans. Comput. Soc. Syst.10.1109/TCSS.2019.2946181 ↗
7. Qiu, J., Du, L., Zhang, D., Su, S., and Tian, Z. (2019). Nei-TTE: Intelligent Traffic Time Estimation Based on Fine-grained Time Derivation of Road Segments for Smart City. IEEE Trans. Ind. Inform.10.1109/TII.2019.2943906 ↗
8. Toward a Comprehensive Insight Into the Eclipse Attacks of Tor Hidden Services10.1109/JIOT.2018.2846624 ↗
9. Static analyses for eliminating unnecessary synchronization from Java programs
10. Removing unnecessary synchronization in Java10.1145/320385.320388 ↗
11. Tao, B., and Qian, J. (2014). Refactoring java concurrent programs based on synchronization requirement analysis. IEEE Int. Conf. Softw. Maint. Evol., 361–370.10.1109/ICSME.2014.58 ↗
12. Lea, D. (2000). Concurrent Programming in Java: Design Principles and Patterns, Addison-Wesley Professional.
13. Lock coarsening: Eliminating lock overhead in automatically parallelized object-based programs10.1006/jpdc.1998.1441 ↗
14. Schafer, M., Sridharan, M., Dolby, J., and Tip, F. (2011, January 21–28). Refactoring Java programs for flexible locking. Proceedings of the 2011 33rd International Conference on Software Engineering (ICSE), Honolulu, HI, USA.10.1145/1985793.1985804 ↗
15. Automated Refactoring for StampedLock10.1109/ACCESS.2019.2931953 ↗
16. Bavarsad, A.G., and Atoofian, E. (2013, January 1–4). Read-Write Lock Allocation in Software Transactional Memory. Proceedings of the 2013 42nd International Conference on Parallel Processing, Lyon, France.10.1109/ICPP.2013.81 ↗
17. Lock allocation10.1145/1190215.1190260 ↗
18. Lock reservation: Java locks can mostly do without atomic operations10.1145/583854.582433 ↗
19. Hofer, P., Gnedt, D., Schörgenhumer, A., and Mössenböck, H. (2016, January 12–16). Efficient tracing and versatile analysis of lock contention in Java applications on the virtual machine level. Proceedings of the 7th ACM/SPEC on International Conference on Performance Engineering, Delft, The Netherlands.10.1145/2851553.2851559 ↗
20. Refactoring Java Programs for Customizable Locks Based on Bytecode Transformation10.1109/ACCESS.2019.2919203 ↗
21. Dig, D., Marrero, J., and Ernst, M.D. (2009, January 16–24). Refactoring sequential Java code for concurrency via concurrent libraries. Proceedings of the 31st International Conference on Software Engineering, Vancouver, BC, Canada.10.1109/ICSE.2009.5070539 ↗
22. Wloka, J., Sridharan, M., and Tip, F. (2009, January 24–28). Refactoring for Reentrancy. Proceedings of the the 7th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The foundations of Software Engineering, Amsterdam, The Netherlands.10.1145/1595696.1595723 ↗
23. Transactions papers a routing-driven elliptic curve cryptography based key management scheme for heterogeneous sensor networks10.1109/TWC.2009.060598 ↗
24. Dong, P., Du, X., Zhang, H., and Xu, T. (2016, January 22–27). A detection method for a novel DDoS attack against SDN controllers by vast new low-traffic flows. Proceedings of the 2016 IEEE International Conference on Communications (ICC), Kuala Lumpur, Malaysia.10.1109/ICC.2016.7510992 ↗
25. Real-Time Lateral Movement Detection Based on Evidence Reasoning Network for Edge Computing Environment10.1109/TII.2019.2907754 ↗
26. Qiu, J., Chai, Y., Tian, Z., Du, X., and Guizani, M. (2020). Vcash: A Novel Reputation Framework for Identifying Denial of Traffic Service in Internet of Connected Vehicles. IEEE Internet Things J.
27. Security in mobile edge caching with reinforcement learning10.1109/MWC.2018.1700291 ↗
28. Wu, L., Du, X., Wang, W., and Lin, B. (2018, January 5–8). An Out-of-band Authentication Scheme for Internet of Things Using Blockchain Technology. Proceedings of the 2018 International Conference on Computing, Networking and Communications (ICNC), Maui, HI, USA.10.1109/ICCNC.2018.8390280 ↗
29. Oracle (2019, December 05). Java.util.concurrent.locks.ReentrantReadWriteLock API Specification. Available online: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html.
30. Oracle (2019, August 12). Java.util.concurrent.locks API Specification. Available online: http://download.oracle.com/javase/6/docs/api/java/util/concurrent/locks/package-summary.html.
31. A large-scale study on the usage of Java’s concurrent programming constructs10.1016/j.jss.2015.04.064 ↗
32. (2019, August 12). WALA. Available online: http://wala.sourceforge.net/wiki/index.php/Main_Page.
33. Eclipse JDT (2019, December 06). Org.eclipse.jdt.core.dom.ASTParser API Specification. Available online: https://help.eclipse.org/kepler/ntopic/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/dom/ASTParser.html.
34. (2019, December 06). HyperSQL. Available online: http://hsqldb.org/.
35. (2019, December 06). Cassandra. Available online: https://cassandra.apache.org/.
36. (2019, December 06). JGroups. Available online: http://www.jgroups.org/.
37. (2019, December 06). Freedomotic. Available online: https://freedomotic-user-manual.readthedocs.io/en/latest/index.html.
38. (2019, December 06). MINA. Available online: http://mina.apache.org/mina-project/.