Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1109/ICSE.2007.63acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
Article

Path-Sensitive Inference of Function Precedence Protocols

Published: 24 May 2007 Publication History

Abstract

Function precedence protocols define ordering relations among function calls in a program. In some instances, precedence protocols are well-understood (e.g., a call to pthread mutex init must always be present on all program paths before a call to pthread mutex lock ). Oftentimes, however, these protocols are neither well-documented, nor easily derived. As a result, protocol violations can lead to subtle errors that are difficult to identify and correct. In this paper, we present CHRONICLER, a tool that applies scalable inter-procedural path-sensitive static analysis to automatically infer accurate function precedence protocols. CHRONICLER computes precedence relations based on a program's control-flow structure, integrates these relations into a repository, and analyzes them using sequence mining techniques to generate a collection of feasible precedence protocols. Deviations from these protocols found in the program are tagged as violations, and represent potential sources of bugs. We demonstrate CHRONICLER's effectiveness by deriving protocols for a collection of benchmarks ranging in size from 66K to 2M lines of code. Our results not only confirm the existence of bugs in these programs due to precedence protocol violations, but also highlight the importance of path sensitivity on accuracy and scalability.

References

[1]
{1} R. Agrawal and R. Srikant. Fast algorithms for mining association rules. In Proc. 20th Int. Conf. Very Large Data Bases, VLDB, pages 487-499, 12- 15 1994.
[2]
{2} R. Agrawal and R. Srikant. Mining sequential patterns. In Eleventh International Conference on Data Engineering, pages 3-14, 1995.
[3]
{3} R. Alur, P. Cerny, P. Madhusudan, and W. Nam. Synthesis of interface specifications for java classes. In POPL'05: Proceedings of the 32th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, 2005.
[4]
{4} G. Ammons, R. Bodik, and J. Larus. Mining specifications. In POPL'02: Proceedings of the 29th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 4-16, 2002.
[5]
{5} P. Anderson, T. Reps, and T. Teitelbaum. Design and implementation of a fine-grained software inspection tool. IEEE Trans. on Software Engineering, 29(8):721-733, August 2003.
[6]
{6} T. Ball, V. Levin, and F. Xie. Automatic creation of environment models via training. In TACAS, 2004.
[7]
{7} T. Ball and S. K. Rajamani. Automatically validating temporal safety properties of interfaces. In SPIN 2001, Workshop on Model Checking of Software, LNCS 2057, pages 103-122, May 2001.
[8]
{8} D. Burdick, M. Calimlim, J. Flannick, J. Gehrke, and T. Yiu. Mafia: A performance study of mining maximal frequent itemsets. In Workshop on Frequent Itemset Mining Implementations (FIMI'03), 2003.
[9]
{9} D. Engler, D. Chen, and A. Chou. Bugs as deviant behavior: A general approach to inferring errors in systems code. In Symposium on Operating Systems Principles, pages 57-72, 2001.
[10]
{10} M. Ernst, J. Cockrell, W. Griswold, and D. Notkin. Dynamically discovering likely program invariants to support program evolution. IEEE Transactions on Software Engineering, 27(2):1-25, February 2001.
[11]
{11} P. Godefroid. Compositional dynamic test coverage. In Proceedings of the Symposium on Principles of Programming Languages (POPL'07), Jan 2007.
[12]
{12} R. Gopalakrishna. Improving software assurance using lightweight static analysis. PhD Thesis, Purdue University, 2006.
[13]
{13} G. J. Holzmann. The SPIN Model Checker: Primer and Reference Manual. Addison-Wesley, 2004.
[14]
{14} T. Kremenek, P. Twohey, G. Back, A. Ng, and D. Engler. From uncertainty to belief: Inferring the specification within. In Seventh USENIX Symposium on Operating Systems Design and Implementation (OSDI 2006), 2006.
[15]
{15} Z. Li and Y. Zhou. Pr-miner: Automatically extracting implicit programming rules and detecting violations in large software code. In Proceedings of ESECFSE , pages 306-315, 2005.
[16]
{16} B. Livshits and T. Zimmermann. Dynamine: a framework for finding common bugs by mining software revision histories. In Proceedings of ESEC-FSE, 2005.
[17]
{17} D. Mandelin, L. Xu, R. Bodik, and D. Kimelman. Jungloid mining: helping to navigate the api jungle. In Proceedings of PLDI'05, pages 48-61, 2005.
[18]
{18} Steven Muchnick. Advanced Compiler Design and Implementation. Academic Press and Morgan Kaufmann Publishers, first edition, 1997.
[19]
{19} S. Qadeer, S. K. Rajamani, and J. Rehof. Summarizing procedures in concurrent programs. In Proceedings of the Symposium on Principles of Programming Languages (POPL'04), Jan 2004.
[20]
{20} S. Reiss and M. Renieris. Encoding program executions. In ICSE'01: Proceedings of the 23rd International Conference on Software Engineering, 2001.
[21]
{21} N. Tansalark and K. Claypool. Xsnippet: mining for sample code. In OOPSLA '06: Proceedings of the Conference on Object-oriented programming systems, languages, and applications, pages 413-430, 2006.
[22]
{22} W. Weimer and G. Necula. Mining temporal specifications for error detection. In Proceedings of Tools and Algorithms For The Construction And Analysis Of Systems (TACAS), pages 461-476, April 2005.
[23]
{23} J. Whaley, M. Martin, and M. Lam. Automatic extraction of object-oriented component interfaces. In Proceedings of the International Symposium of Software Testing and Analysis, ISSTA, 2002.
[24]
{24} Y. Xie and A. Aiken. Scalable error detection using boolean satisfiability. In POPL'05: Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 351-363, 2005.
[25]
{25} J. Yang, D. Evans, D. Bhardwaj, T. Bhat, and M. Das. Perracotta: Mining temporal api rules from imperfect traces. In Proceedings of 28th International Conference on Software Engineering (ICSE'06), May 2006.

Cited By

View all
  • (2024)Demystifying and Detecting Misuses of Deep Learning APIsProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639177(1-12)Online publication date: 20-May-2024
  • (2024)API usage templates via structural generalizationJournal of Systems and Software10.1016/j.jss.2024.111974210:COnline publication date: 1-Apr-2024
  • (2023)Lightweight precise automatic extraction of exception preconditions in java methodsEmpirical Software Engineering10.1007/s10664-023-10392-x29:1Online publication date: 26-Dec-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICSE '07: Proceedings of the 29th international conference on Software Engineering
May 2007
784 pages
ISBN:0769528287

Sponsors

Publisher

IEEE Computer Society

United States

Publication History

Published: 24 May 2007

Check for updates

Qualifiers

  • Article

Acceptance Rates

Overall Acceptance Rate 276 of 1,856 submissions, 15%

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 08 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Demystifying and Detecting Misuses of Deep Learning APIsProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639177(1-12)Online publication date: 20-May-2024
  • (2024)API usage templates via structural generalizationJournal of Systems and Software10.1016/j.jss.2024.111974210:COnline publication date: 1-Apr-2024
  • (2023)Lightweight precise automatic extraction of exception preconditions in java methodsEmpirical Software Engineering10.1007/s10664-023-10392-x29:1Online publication date: 26-Dec-2023
  • (2022)Call Me Maybe: Using NLP to Automatically Generate Unit Test Cases Respecting Temporal ConstraintsProceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering10.1145/3551349.3556961(1-11)Online publication date: 10-Oct-2022
  • (2020)BCFAProceedings of the ACM/IEEE 42nd International Conference on Software Engineering10.1145/3377811.3380435(1037-1048)Online publication date: 27-Jun-2020
  • (2020)API-misuse detection driven by fine-grained API-constraint knowledge graphProceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering10.1145/3324884.3416551(461-472)Online publication date: 21-Dec-2020
  • (2019)Investigating next steps in static API-misuse detectionProceedings of the 16th International Conference on Mining Software Repositories10.1109/MSR.2019.00053(265-275)Online publication date: 26-May-2019
  • (2017)Bug characteristics in blockchain systemsProceedings of the 14th International Conference on Mining Software Repositories10.1109/MSR.2017.59(413-424)Online publication date: 20-May-2017
  • (2016)Bugram: bug detection with n-gram language modelsProceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering10.1145/2970276.2970341(708-719)Online publication date: 25-Aug-2016
  • (2016)Monkey see, monkey do: effective generation of GUI tests with inferred macro eventsProceedings of the 25th International Symposium on Software Testing and Analysis10.1145/2931037.2931053(82-93)Online publication date: 18-Jul-2016
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media