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.

Highlights

  • The exponential growth of Internet of Things (IoT) devices is changing our world [1,2]

  • Max et al [14] have proposed an algorithm of refactoring for ReentrantLocks and ReentrantReadWriteLocks, as well as a refactoring tool Relocker

  • We developed an automated refactoring tool implemented as Eclipse plugins

Read more

Summary

Introduction

The exponential growth of IoT devices is changing our world [1,2]. According to a recent Gartner report [3], 8.4 billion devices including smart phones, tablets and laptops will be connected by 2020, and this number is expected to grow up to 20.4 billion by 2022. Java has become one of the most popular programming languages for IoT software development because of its capacity to handle concurrency-related problems [8]. It makes programs more complicated, error-prone, and incurs other problems. Though this tool allows automation to some extent, it relies heavily on manual selection of codes to refactor. This paper aims to realize fine-grained lock refactoring via lock splitting and lock degrading of ReentrantReadWriteLocks, and implements an automatic tool. Our refactoring method for fine-grained ReentrantReadWriteLocks is designed based on static program analysis. Our refactoring tool works on the source level to help developers implement the automated refactoring from coarse-grained locks to fine-grained ReentrantReadWriteLocks. We developed algorithms that could convert built-in monitor locks to fine-grained.

Related Work
Background
Motivating Example
Performance Evaluation
Refactoring Framework
Visitor Pattern Analysis
Lock Mode
Alias Analysis
Side Effect Analysis
Refactoring Tool
Practical Issues
Benchmarks
Results
Correctness Of Refactoring
Comparison With Relocker
Conclusions and Future Work

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.