Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1007/978-3-642-35873-9_10guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Automatic Inference of Necessary Preconditions

Published: 20 January 2013 Publication History

Abstract

We consider the problem of automatic precondition inference. We argue that the common notion of sufficient precondition inference i.e., under which precondition is the program correct? imposes too large a burden on callers, and hence it is unfit for automatic program analysis. Therefore, we define the problem of necessary precondition inference i.e., under which precondition, if violated, will the program always be incorrect?. We designed and implemented several new abstract interpretation-based analyses to infer atomic, disjunctive, universally and existentially quantified necessary preconditions.
We experimentally validated the analyses on large scale industrial code. For unannotated code, the inference algorithms find necessary preconditions for almost 64% of methods which contained warnings. In 27% of these cases the inferred preconditions were also sufficient, meaning all warnings within the method body disappeared. For annotated code, the inference algorithms find necessary preconditions for over 68% of methods with warnings. In almost 50% of these cases the preconditions were also sufficient. Overall, the precision improvement obtained by precondition inference counted as the additional number of methods with no warnings ranged between 9% and 21%.

References

[1]
Bouaziz, M., Fahndrich, M., Logozzo, F.: Inference of necessary field conditions with abstract interpretation. In: APLAS. LNCS 2012
[2]
Bourdoncle, F.: Abstract debugging of higher-order imperative languages. In: PLDI, pp. 46---55 1993
[3]
Bradley, A.R., Manna, Z., Sipma, H.B.: What's Decidable About Arrays? In: Emerson, E.A., Namjoshi, K.S. eds. VMCAI 2006. LNCS, vol. 3855, pp. 427---442. Springer, Heidelberg 2006
[4]
Bush, W.R., Pincus, J.D., Sielaff, D.J.: A static analyzer for finding dynamic programming errors. Softw., Pract. Exper. 307, 775---802 2000
[5]
Calcagno, C., Distefano, D., O'Hearn, P.W., Yang, H.: Footprint Analysis: A Shape Analysis That Discovers Preconditions. In: Riis Nielson, H., Filé, G. eds. SAS 2007. LNCS, vol. 4634, pp. 402---418. Springer, Heidelberg 2007
[6]
Calcagno, C., Distefano, D., O'Hearn, P.W., Yang, H.: Compositional shape analysis by means of bi-abduction. In: POPL, pp. 289---300 2009
[7]
Chandra, S., Fink, S.J., Sridharan, M.: Snugglebug: a powerful approach to weakest preconditions. In: PLDI, pp. 363---374 2009
[8]
Cousot, P., Cousot, R.: Comparing the Galois connection and widening/narrowing approaches to abstract interpretation. In: PLILP, pp. 269---295 1992
[9]
Cousot, P., Cousot, R.: Modular Static Program Analysis. In: Nigel Horspool, R. ed. CC 2002. LNCS, vol. 2304, pp. 159---178. Springer, Heidelberg 2002
[10]
Cousot, P., Cousot, R.: An abstract interpretation framework for termination. In: POPL, pp. 245---258 2012
[11]
Cousot, P., Cousot, R., Logozzo, F.: Precondition Inference from Intermittent Assertions to Contracts on Collections. In: Jhala, R., Schmidt, D. eds. VMCAI 2011. LNCS, vol. 6538, pp. 150---168. Springer, Heidelberg 2011
[12]
Cousot, P., Cousot, R., Logozzo, F.: A parametric segmentation functor for fully automatic and scalable array content analysis. In: POPL, pp. 105---118 2011
[13]
Cousot, P., Cousot, R., Logozzo, F., Barnett, M.: An abstract interpretation framework for refactoring with application to extract methods with contracts. In: OOPSLA. ACM 2012
[14]
Dahlweid, M., Moskal, M., Santen, T., Tobies, S., Schulte, W.: VCC: Contract-based modular verification of concurrent C. In: ICSE Companion, pp. 429---430 2009
[15]
Dillig, I., Dillig, T., Aiken, A.: Small Formulas for Large Programs: On-Line Constraint Simplification in Scalable Static Analysis. In: Cousot, R., Martel, M. eds. SAS 2010. LNCS, vol. 6337, pp. 236---252. Springer, Heidelberg 2010
[16]
Fähndrich, M., Logozzo, F.: Static Contract Checking with Abstract Interpretation. In: Beckert, B., Marché, C. eds. FoVeOOS 2010. LNCS, vol. 6528, pp. 10---30. Springer, Heidelberg 2011
[17]
Flanagan, C., Leino, K.R.M.: Houdini, an annotation assistant for eSC/Java. In: Oliveira, J.N., Zave, P. eds. FME 2001. LNCS, vol. 2021, pp. 500---517. Springer, Heidelberg 2001
[18]
Flanagan, C., Leino, K.R.M., Lillibridge, M., Nelson, G., Saxe, J.B., Stata, R.: Extended Static Checking for Java. In: PLDI, pp. 234---245 2002
[19]
Godefroid, P., Klarlund, N., Sen, K.: DART: directed automated random testing. In: PLDI, pp. 213---223 2005
[20]
Godefroid, P., Levin, M.Y., Molnar, D.A.: SAGE: whitebox fuzzing for security testing. Commun. ACM 553, 40---44 2012
[21]
Gulwani, S., Srivastava, S., Venkatesan, R.: Constraint-Based Invariant Inference over Predicate Abstraction. In: Jones, N.D., Müller-Olm, M. eds. VMCAI 2009. LNCS, vol. 5403, pp. 120---135. Springer, Heidelberg 2009
[22]
Gulwani, S., Tiwari, A.: Computing Procedure Summaries for Interprocedural Analysis. In: De Nicola, R. ed. ESOP 2007. LNCS, vol. 4421, pp. 253---267. Springer, Heidelberg 2007
[23]
Hackett, B., Das, M., Wang, D., Yang, Z.: Modular checking for buffer overflows in the large. In: ICSE, pp. 232---241 2006
[24]
Hoare, C.A.R.: Algorithm 63: Partition. Communications of the ACM 47, 321 1961
[25]
Hoenicke, J., Leino, K.R.M., Podelski, A., Schäf, M., Wies, T.: It's Doomed; We Can Prove It. In: Cavalcanti, A., Dams, D.R. eds. FM 2009. LNCS, vol. 5850, pp. 338---353. Springer, Heidelberg 2009
[26]
Lindahl, T., Sagonas, K.F.: Practical type inference based on success typings. In: PPDP, pp. 167---178. ACM 2006
[27]
Logozzo, F., Ball, T.: Modular and verified automatic program repair. In: OOPSLA, pp. 133---146. ACM 2012
[28]
Meyer, B.: Eiffel: The Language. Prentice Hall 1991
[29]
Moy, Y.: Sufficient Preconditions for Modular Assertion Checking. In: Logozzo, F., Peled, D.A., Zuck, L.D. eds. VMCAI 2008. LNCS, vol. 4905, pp. 188---202. Springer, Heidelberg 2008
[30]
Nori, A.V., Rajamani, S.K., Tetali, S., Thakur, A.V.: The Yogi Project: Software Property Checking via Static Analysis and Testing. In: Kowalewski, S., Philippou, A. eds. TACAS 2009. LNCS, vol. 5505, pp. 178---181. Springer, Heidelberg 2009
[31]
Podelski, A., Rybalchenko, A., Wies, T.: Heap Assumptions on Demand. In: Gupta, A., Malik, S. eds. CAV 2008. LNCS, vol. 5123, pp. 314---327. Springer, Heidelberg 2008
[32]
Popeea, C., Chin, W.-N.: Dual analysis for proving safety and finding bugs. In: SAC, pp. 2137---2143 2010
[33]
Reps, T.W., Horwitz, S., Sagiv, S.: Precise interprocedural dataflow analysis via graph reachability. In: POPL, pp. 49---61 1995
[34]
Srivastava, S., Gulwani, S.: Program verification using templates over predicate abstraction. In: PLDI, pp. 223---234 2009
[35]
Wei, Y., Furia, C.A., Kazmin, N., Meyer, B.: Inferring better contracts. In: ICSE 2011
[36]
Yorsh, G., Yahav, E., Chandra, S.: Generating precise and concise procedure summaries. In: POPL, pp. 221---234 2008

Cited By

View all
  • (2024)Localized Explanations for Automatically Synthesized Network ConfigurationsProceedings of the 23rd ACM Workshop on Hot Topics in Networks10.1145/3696348.3696888(52-59)Online publication date: 18-Nov-2024
  • (2024)Computing Precise Control Interface SpecificationsProceedings of the ACM on Programming Languages10.1145/36897438:OOPSLA2(905-934)Online publication date: 8-Oct-2024
  • (2024)Limits and Difficulties in the Design of Under-Approximation Abstract DomainsACM Transactions on Programming Languages and Systems10.1145/366601446:3(1-31)Online publication date: 10-Oct-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Guide Proceedings
VMCAI 2013: Proceedings of the 14th International Conference on Verification, Model Checking, and Abstract Interpretation - Volume 7737
January 2013
554 pages
ISBN:9783642358722

Publisher

Springer-Verlag

Berlin, Heidelberg

Publication History

Published: 20 January 2013

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 20 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Localized Explanations for Automatically Synthesized Network ConfigurationsProceedings of the 23rd ACM Workshop on Hot Topics in Networks10.1145/3696348.3696888(52-59)Online publication date: 18-Nov-2024
  • (2024)Computing Precise Control Interface SpecificationsProceedings of the ACM on Programming Languages10.1145/36897438:OOPSLA2(905-934)Online publication date: 8-Oct-2024
  • (2024)Limits and Difficulties in the Design of Under-Approximation Abstract DomainsACM Transactions on Programming Languages and Systems10.1145/366601446:3(1-31)Online publication date: 10-Oct-2024
  • (2024)Inference of Robust Reachability ConstraintsProceedings of the ACM on Programming Languages10.1145/36329338:POPL(2731-2760)Online publication date: 5-Jan-2024
  • (2024)Ill-Typed Programs Don’t EvaluateProceedings of the ACM on Programming Languages10.1145/36329098:POPL(2010-2040)Online publication date: 5-Jan-2024
  • (2024)Calculational Design of [In]Correctness Transformational Program Logics by Abstract InterpretationProceedings of the ACM on Programming Languages10.1145/36328498:POPL(175-208)Online publication date: 5-Jan-2024
  • (2024)A lightweight approach to nontermination inference using Constrained Horn ClausesSoftware and Systems Modeling (SoSyM)10.1007/s10270-024-01161-523:2(319-342)Online publication date: 1-Apr-2024
  • (2024)Property Guided Secure Configuration Space SearchInformation Security10.1007/978-3-031-75764-8_8(140-160)Online publication date: 24-Oct-2024
  • (2024)Enchanting Program Specification Synthesis by Large Language Models Using Static Analysis and Program VerificationComputer Aided Verification10.1007/978-3-031-65630-9_16(302-328)Online publication date: 24-Jul-2024
  • (2024)Formal Runtime Error Detection During Development in the Automotive IndustryVerification, Model Checking, and Abstract Interpretation10.1007/978-3-031-50524-9_1(3-26)Online publication date: 15-Jan-2024
  • Show More Cited By

View Options

View options

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media