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

skip to main content
10.1145/2737924.2737993acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Termination and non-termination specification inference

Published: 03 June 2015 Publication History

Abstract

Techniques for proving termination and non-termination of imperative programs are usually considered as orthogonal mechanisms. In this paper, we propose a novel mechanism that analyzes and proves both program termination and non-termination at the same time. We first introduce the concept of second-order termination constraints and accumulate a set of relational assumptions on them via a Hoare-style verification. We then solve these assumptions with case analysis to determine the (conditional) termination and non- termination scenarios expressed in some specification logic form. In contrast to current approaches, our technique can construct a summary of terminating and non-terminating behaviors for each method. This enables modularity and reuse for our termination and non-termination proving processes. We have tested our tool on sample programs from a recent termination competition, and compared favorably against state-of-the-art termination analyzers.

References

[1]
M. F. Atig, A. Bouajjani, M. Emmi, and A. Lal. Detecting Fair Nontermination in Multithreaded Programs. In CAV, 2012.
[2]
J. Berdine, B. Cook, D. Distefano, and P. W. O’Hearn. Automatic Termination Proofs for Programs with Shape-Shifting Heaps. In CAV, 2006.
[3]
J. Berdine, A. Chawdhary, B. Cook, D. Distefano, and P. W. O’Hearn. Variance analyses from invariance analyses. In POPL, 2007.
[4]
M. Bozga, R. Iosif, and F. Koneˇcný. Deciding Conditional Termination. In TACAS, 2012.
[5]
A. R. Bradley, Z. Manna, and H. B. Sipma. The Polyranking Principle. In ICALP, 2005.
[6]
M. Brockschmidt, T. Ströder, C. Otto, and J. Giesl. Automated Detection of Non-Termination and NullPointerExceptions for Java Bytecode. In FoVeOOS, 2011.
[7]
M. Brockschmidt, B. Cook, and C. Fuhs. Better termination proving through cooperation. In CAV, 2013.
[8]
H.-Y. Chen, B. Cook, C. Fuhs, K. Nimkar, and P. O’Hearn. Proving nontermination via safety. In TACAS, 2014.
[9]
W.-N. Chin, C. David, H. H. Nguyen, and S. Qin. Automated verification of shape, size and bag properties via user-defined predicates in separation logic. Science of Computer Programming, 77(9), 2012.
[10]
M. Codish, S. Genaim, M. Bruynooghe, J. Gallagher, and W. Vanhoof. One loop at a time. In Intl. Workshop on Termination (WST), 2003.
[11]
B. Cook, A. Podelski, and A. Rybalchenko. Abstraction refinement for termination. In SAS, 2005.
[12]
B. Cook, A. Podelski, and A. Rybalchenko. Termination proofs for systems code. In PLDI, 2006.
[13]
B. Cook, A. Podelski, and A. Rybalchenko. Proving thread termination. In PLDI, 2007.
[14]
B. Cook, S. Gulwani, T. Lev-Ami, A. Rybalchenko, and M. Sagiv. Proving conditional termination. In CAV, 2008.
[15]
B. Cook, D. Kroening, P. Rümmer, and C. M. Wintersteiger. Ranking Function Synthesis for Bit-Vector Relations. In TACAS, 2010.
[16]
B. Cook, A. See, and F. Zuleger. Ramsey vs. Lexicographic Termination Proving. In TACAS, 2013.
[17]
P. Cousot. Proving Program Invariance and Termination by Parametric Abstraction, Lagrangian Relaxation and Semidefinite Programming. In VMCAI, 2005.
[18]
S. Falke, D. Kapur, and C. Sinz. Termination Analysis of C Programs Using Compiler Intermediate Languages. In RTA, 2011.
[19]
P. Ganty and S. Genaim. Proving termination starting from the end. In CAV, 2013.
[20]
C. Gherghina, C. David, S. Qin, and W.-N. Chin. Structured specifications for better verification of heap-manipulating programs. In FM, 2011.
[21]
J. Giesl, M. Brockschmidt, F. Emmes, F. Frohn, C. Fuhs, C. Otto, M. Plücker, P. Schneider-Kamp, T. Ströder, S. Swiderski, and R. Thiemann. Proving Termination of Programs Automatically with AProVE. In IJCAR, 2014.
[22]
S. Grebenshchikov, N. P. Lopes, C. Popeea, and A. Rybalchenko. Synthesizing software verifiers from proof rules. In PLDI, 2012.
[23]
S. Gulwani, S. Srivastava, and R. Venkatesan. Program Analysis As Constraint Solving. In PLDI, 2008.
[24]
A. Gupta, T. A. Henzinger, R. Majumdar, A. Rybalchenko, and R.-G. Xu. Proving non-termination. In POPL, 2008.
[25]
W. R. Harris, A. Lal, A. V. Nori, and S. K. Rajamani. Alternation for Termination. In SAS, 2010.
[26]
M. Heizmann, J. Hoenicke, and A. Podelski. Termination Analysis by Learning Terminating Programs. In CAV, 2014.
[27]
M. Heizmann, D. Dietsch, J. Leike, B. Musa, and A. Podelski. Ultimate Automizer with Array Interpolation (Competition Contribution). In TACAS, 2015.
[28]
D. Jovanovic and L. M. de Moura. Solving non-linear arithmetic. In IJCAR, 2012.
[29]
D. Kroening, N. Sharygina, A. Tsitovich, and C. M. Wintersteiger. Termination Analysis with Compositional Transition Invariants. In CAV, 2010.
[30]
D. Larraz, A. Oliveras, E. Rodriguez-Carbonell, and A. Rubio. Proving termination of imperative programs using Max-SMT. In FMCAD, 2013.
[31]
D. Larraz, K. Nimkar, A. Oliveras, E. Rodriguez-Carbonell, and A. Rubio. Proving Non-termination Using Max-SMT. In CAV, 2014.
[32]
Q. L. Le, C. Gherghina, S. Qin, and W.-N. Chin. Shape Analysis via Second-Order Bi-Abduction. In CAV, 2014.
[33]
T. C. Le, C. Gherghina, A. Hobor, and W.-N. Chin. A resource-based logic for termination and non-termination proofs. In ICFEM, 2014.
[34]
C. S. Lee, N. D. Jones, and A. M. Ben-Amram. The size-change principle for program termination. In POPL, 2001.
[35]
É. Payet and F. Spoto. Experiments with Non-Termination Analysis for Java Bytecode. Electr. Notes Theor. Comput. Sci., 253(5), 2009.
[36]
C. S. Peirce. Collected papers of Charles Sanders Peirce. Harvard University Press., 1958.
[37]
A. Podelski and A. Rybalchenko. Transition Invariants. In LICS, 2004.
[38]
A. Podelski and A. Rybalchenko. A Complete Method for the Synthesis of Linear Ranking Functions. In VMCAI, 2004.
[39]
A. Podelski and A. Rybalchenko. ARMC: The Logical Choice for Software Model Checking with Abstraction Refinement. In PADL, 2007.
[40]
C. Popeea and W.-N. Chin. Inferring Disjunctive Postconditions. In ASIAN, 2006.
[41]
J. Reynolds. Separation Logic: A Logic for Shared Mutable Data Structures. In LICS, 2002.
[42]
A. Rybalchenko. Constraint Solving for Program Verification: Theory and Practice by Example. In CAV, 2010.
[43]
A. Schrijver. Theory of Linear and Integer Programming. John Wiley & Sons, New York, 1986.
[44]
T. Ströder, C. Aschermann, F. Frohn, J. Hensel, and J. Giesl. AProVE: Termination and Memory Safety of C Programs (Competition Contribution). In TACAS, 2015.
[45]
SV-COMP. The Competition on Software Verification. http://sv-comp. sosy-lab.org/2015/, 2015.
[46]
TermCOMP. The Annual International Termination Competition. http://termination-portal.org/wiki/Termination_Competition_ 2014/, 2014.
[47]
H. Velroyen and P. Rümmer. Non-termination checking for imperative programs. In TAP, 2008.

Cited By

View all
  • (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)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: 25-Jul-2024
  • (2023)Data-Driven Recurrent Set Learning for Non-termination AnalysisProceedings of the 45th International Conference on Software Engineering10.1109/ICSE48619.2023.00115(1303-1315)Online publication date: 14-May-2023
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '15: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2015
630 pages
ISBN:9781450334686
DOI:10.1145/2737924
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 50, Issue 6
    PLDI '15
    June 2015
    630 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2813885
    • Editor:
    • Andy Gill
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 03 June 2015

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Bi-abductive inference
  2. Hoare logic
  3. Program termination and non-termination analysis

Qualifiers

  • Research-article

Funding Sources

Conference

PLDI '15
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)22
  • Downloads (Last 6 weeks)2
Reflects downloads up to 30 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (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)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: 25-Jul-2024
  • (2023)Data-Driven Recurrent Set Learning for Non-termination AnalysisProceedings of the 45th International Conference on Software Engineering10.1109/ICSE48619.2023.00115(1303-1315)Online publication date: 14-May-2023
  • (2023)EndWatch: A Practical Method for Detecting Non-Termination in Real-World Software2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE56229.2023.00061(686-697)Online publication date: 11-Sep-2023
  • (2022)Data-driven loop bound learning for termination analysisProceedings of the 44th International Conference on Software Engineering10.1145/3510003.3510220(499-510)Online publication date: 21-May-2022
  • (2021)Termination analysis without the tearsProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3454110(1296-1311)Online publication date: 19-Jun-2021
  • (2021)Proving non-termination by program reversalProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3454093(1033-1048)Online publication date: 19-Jun-2021
  • (2021)Lightweight Nontermination Inference with CHCsSoftware Engineering and Formal Methods10.1007/978-3-030-92124-8_22(383-402)Online publication date: 3-Dec-2021
  • (2021)Reflections on Termination of Linear LoopsComputer Aided Verification10.1007/978-3-030-81688-9_3(51-74)Online publication date: 15-Jul-2021
  • (2020)Termination analysis for evolving programs: an incremental approach by reusing certified modulesProceedings of the ACM on Programming Languages10.1145/34282674:OOPSLA(1-27)Online publication date: 13-Nov-2020
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media