Extracting implicit programming rules: comparing static and dynamic approaches

Published in SoftwareMining 2018: Proceedings of the 7th International Workshop on Software Mining, 2018

Recommended citation: Tarannum Shaila Zaman and Tingting Yu. 2018. Extracting implicit programming rules: comparing static and dynamic approaches. In Proceedings of the 7th International Workshop on Software Mining (SoftwareMining 2018). Association for Computing Machinery, New York, NY, USA, 1–7. DOI:https://doi.org/10.1145/3242887.3242889 https://dl.acm.org/doi/abs/10.1145/3242887.3242889

Download paper here

Abstract: Programs often follow implicit programming rules, such as, function call A must be followed by function call B. Rules of such kinds are rarely documented by developers. Nevertheless, programming rules play an important role in software testing and maintenance. For example, the rules can be used as test oracles to detect violations. If a programmer can be notified of these rules before updating the source code, the chances of generating defects due to rule violations might be minimized. Prior works have used static and dynamic analysis techniques to extract implicit programming rules, but none compares the effectiveness of the two techniques. In this paper, we have undertaken an empirical study to compare the two techniques when they are being used for extracting programming rules. Our results indicate that the performance of the dynamic analysis technique depends on the number and the diversity of the traces. Moreover, the dynamic analysis technique generates more precise rules than the static analysis technique if a diverse and sufficient number of test cases are provided.