Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3524482.3527655acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article
Public Access

Computing program functions

Published: 21 July 2022 Publication History

Abstract

Extracting the function of a program from a static analysis of its source code is a valuable capability in software engineering, but it has proved to be an elusive goal, due primarily to the difficulty of deriving the function of iterative statements. Several automated tools obviate this difficulty by unrolling the loops; but this is clearly an imperfect solution, especially in light of the fact that loops capture most of the computing power of a program, are the locus of most of its complexity, and the source of most of its faults. In this paper we discuss the design and ongoing implementation of an automated tool for deriving the function of a program in three steps: first, the source code is mapped onto an abstract syntax tree (AST), using standard parsing technology; then each node of the AST is mapped onto an equation between pre and post states; finally, these equations are submitted to a symbolic computation engine that extracts the final program state as a function of its initial state. Loop functions are derived by pattern matching against semantic recognizers, which capture the requisite programming knowledge and domain knowledge.

References

[1]
Nazareno Aguirre, Marcelo F. Frias, Mariano M. Moscato, T.S.E. Maibaum, and Alan Wassyng. 2009. Describing and Analyzing Behaviors over Tabular Specifications Unsing DynAlloy. In Proceedings, FASE 2009. 155--170.
[2]
Corinne Ancourt, Fabien Coelho, and François Irigoin. 2010. A Modular Static Analysis Approach to Affine Loop Invariants Detection. Electronic Notes on Theoretical Computer Science 267, 1 (2010), 3--16.
[3]
Chris Brink, Wolfram Kahl, and Gunther Schmidt. 1997. Relational Methods in Computer Science. Springer Verlag, Berlin, Germany.
[4]
C Cadar and K. Sen. 2013. Symbolic Execution for Software Testing: Three Decades Later. Commun. ACM 56 (2013), 82--90.
[5]
E. Rodriguez Carbonnell and Deepak Kapur. 2004. Program Verification Using Automatic Generation of Invariants. In Proceedings, International Conference on Theoretical Aspects of Computing 2004, Vol. 3407. Lecture Notes in Computer Science, Springer Verlag, 325--340.
[6]
M. Colon, S. Sankaranarayanan, and H. Sipma. 2003. Linear Invariant Generation Using Non-Linear Constraint Solving. In Proceedings, CAV 2003, Vol. 2725.
[7]
M. A. Colon, S. Sankaranarayana, and H. B. Sipma. 2003. Linear Invariant Generation Using Non Linear Constraint Solving. In Proceedings, Computer Aided Verification, CAV 2003 (Lecture Notes in Computer Science), Vol. 2725. Springer Verlag, 420--432.
[8]
Patrick Cousot and Radhia Cousot. 1977. Automatic Synthesis of Optimal Invariant Assertions: Mathematical Foundations. In Proceeding Proceedings of the 1977 symposium on Artificial intelligence and programming languages. ACM.
[9]
Nafi Diallo, Wided Ghardallou, Jules Desharnais, and Ali Mili. 2018. Convergence: Intergating Termination and Abort Freedom. Journal of Logic and Algebraic methods in Programming 97 (2018), 1--29.
[10]
R Dockins, A. Foltzer, J. Hendrix, B. Huffman, D. McNamee, and A. Tomb. 2016. Constructing Semantic Models of Programs with the Software Analysis Workbench. In VSTTE: Verified Software Theories, Tools and Experiments, S. Blary and M. Chechik (Eds.), Vol. 9971. Springer Verlag LNCS.
[11]
M.D. Ernst, J.H. Perkins, P.J. Guo, S. McCamant, C. Pacheco, M.S. Tscantz, and C. Xiao. 2007. The Daikon System for Dynamic Detection of Likely Invariants. Science of Computer Programming 69, 1 (2007), 35--45.
[12]
Michael D. Ernst, Jake Cockrell, William G. Griswold, and David Notkin. 2001. Dynamically Discovering Likely program Invariants to Support Program Evolution. IEEE Transactions on Software Engineering 27, 2 (2001), 99--123.
[13]
Hadar Frenkel, Orna Grumberg, Corina Pasareanu, and Sarai Sheinvald. 2020. Assume, Guarantee or Repair. In Proceedings, TACAS 2020. 211--227.
[14]
JiCheng Fu, Farokh B. Bastani, and I-Ling Yen. 2008. Automated Discovery of Loop Invariants for High Assurance Programs Synthesized Using AI Planning Techniques. In HASE 2008: 11th High Assurance Systems Engineering Symposium (December 3--5). Nanjing, China, 333--342.
[15]
Carlo A. Furia and Bertrand Meyer. 2010. Inferring Loop Invariants using Post-conditions. In Festschrift in honor of Yuri Gurevich's 70th birthday (Lecture Notes in Computer Science), Nachum Dershowitz (Ed.). Springer-Verlag.
[16]
Wided Ghardallou. 2015. Analyse de Boucles While au Moyen de Relations Invariantes. Technical Report. University of Tunis El Manar.
[17]
Wided Ghardallou, Olfa Mraihi, Asma Louhichi, Lamia Labed Jilani, Khaled Bsaies, and Ali Mili. 2012. A Versatile Concept for the Analysis of Loops. Journal of Logic and Algebraic Programming 81, 5 (May 2012), 606--622.
[18]
Sumit Gulwani. 2010. Invited Talk: Methods for Loop Invariant Generation. In Proceedings, Workshop on Invariant Generation: WING 2010. Edimburg, UK.
[19]
Ashutosh Gupta and Andrey Rybalchenko. 2009. InvGen: An Efficient Invariant Generator. In Proceedings, CAV 2009. 634--640.
[20]
Zyad Hassan, Aaron R. Bradley, and Fabio Somenzi. 2013. Better Generaliation in IC3. In Proceedings, FMCAD.
[21]
Thomas A. Henzinger, Thibaud Hottelier, and Laura Kovacs. 2008. Valigator: Verification Tool with Bound and Invariant Generation. In Proceedings, LPAR08: International Conferences on Logic for Programming, Artificial Intelligence and Reasoning. Doha, Qatar.
[22]
Radu Iosif, Marius Bozga, Filip Konecny, and Tomas Vojnar. 2010. Tool Demonstration for the FLATA Counter Automata Toolset. In Proceedings, Workshop on Invariant Generation: WING 2010. Edimburg, UK.
[23]
R. Janicki, D. L. Parnas, and J. Zucker. 1997. Tabular representations in relational documents. In Relational Methods in Computer Science, Ch. Brink, W. Kahl, and G. Schmidt (Eds.). Springer Verlag, Chapter 12, 184--196.
[24]
Ryszard Janicki, David L Parnas, and Jeffrey Zucker. 2001. Tabular Representations in Relational Documents. In Software Fundamentals, Daniel M. Hoffman and David M. Weiss (Eds.). Addison Wesley, Chapter 4.
[25]
Lamia Labed Jilani, Asma Louhich, Olfa Mraihi, and Ali Mili. 2012. Invariant Relations, Invariant Functions and Loop Functions. Innovations in Systems and Software Engineering: A NASA Journal 8, 3 (2012), 195--212.
[26]
Lamia Labed Jilani, Olfa Mraihi, Asma Louhichi, Wided Ghardallou, Khaled Bsaies, and Ali Mili. 2013. Invariant Relations and Invariant Functions: An Alternative to Invariant Assertions. Journal of Symbolic Computation 48 (May 2013), 1--36.
[27]
Laura Kovacs. 2007. Automated Invariant Generation by Algebraic Techniques for Imperative Program Verification in Theorema. Technical Report. University of Linz, Linz, Austria.
[28]
Laura Kovacs and Andrei Voronkov. 2009. Finding Loop Invariants for Programs over Arrays Using a Theorem Prover. In Proceedings, 11th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing. Timisoara, Romania.
[29]
Daniel Kroening, Natasha Sharyngina, Aliaksei Tsitovitch, and Christoph M. Wintersteiger. 2010. Termination Analysis with Compositional Transition Invariants. In Proceedings, CAV 2010: 22nd International Conference on Computer Aided Verification. Edinburg, UK.
[30]
S.K. Lahiri and R.E. Bryant. 2004. Constructing Quantified Invariants via Predicate Abstraction. In Proceedings, VMCAI. 267--281.
[31]
Ewen Maclean, Andrew Ireland, and Gudmund Grov. 2010. Synthesizing Functional Invariants in Separation Logic. In Proceedings, Workshop on Invariant Generation: WING 2010. Edimburg, UK.
[32]
K. L. McMillan. 2008. Quantified Invariant Generation using an Interpolating Saturation Prover. In Proceedings, TACAS. 413--427.
[33]
A. Mili. 2007. Reflexive Transitive Loop Invariants: A Basis for Computing Loop Functions. In First International Workshop on Invariant Generation. Hagenberg, Austria.
[34]
Olfa Mraihi, Asma Louhichi, Lamia Labed Jilani, Jules Desharnais, and Ali Mili. 2013. Invariant Assertions, Invariant Relations, and Invariant Functions. Science of Computer Programming 78, 9 (September 2013), 1212--1239.
[35]
D. L. Parnas. 1992. Tabular representation of relations. Technical Report 260. Communications Research Laboratory, Faculty of Engineering, McMaster University, Hamilton, Ontario, Canada.
[36]
Andreas Podelski and Andrey Rybalchenko. 2004. Transition Invariants. In LICS. 32--41.
[37]
Andreas Podelski and Andrey Rybalchenko. 2011. Transition Invariants and Transition Predicate Abstraction for Program Termination. In TACAS. 3--10.
[38]
S. Sankaranarayanan, H. B. Sipma, and Z. Manna. 2004. Non Linear Loop Invariant Generation Using Groebner Bases. In Proceedings, ACM SIGPLAN Principles of Programming Languages, POPL 2004. 381--329.
[39]
Jose Santos, P. Maksimovic, and Gillian Gardner. 2020. A Multi-Language Platform for Symbolic Execution. In Proceedings, PLDI '20. London, UK.
[40]
J. Stark and A. Ireland. 1998. Invariant Discovery via failed Proof Attempts. In Proceedings, 8th International Workshop on Logic Based Program Synthesis and Transformation. Manchester, UK.
[41]
E. Torlak and R. Bodik. 2014. A Lightweight Symbolic Virtual Machine for Solver-Aided Host Languages. In Proceedings, PLDI.
[42]
Florian Zuleger and Moritz Sinn. 2010. LOOPUS: A Tool for Computing Loop Bounds for C Programs. In Proceedings, Workshop on Invariant Generation: WING 2010. Edimburg, UK.

Cited By

View all
  • (2023)Air Conditioning Systems Fault Detection and Diagnosis-Based Sensing and Data-Driven ApproachesEnergies10.3390/en1612472116:12(4721)Online publication date: 15-Jun-2023
  • (2023)Provably Correct Software: Don't Leave Earth Without ItAIAA SCITECH 2023 Forum10.2514/6.2023-2471Online publication date: 16-Jan-2023

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
FormaliSE '22: Proceedings of the IEEE/ACM 10th International Conference on Formal Methods in Software Engineering
May 2022
137 pages
ISBN:9781450392877
DOI:10.1145/3524482
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 ACM 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

In-Cooperation

  • IEEE CS

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 21 July 2022

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Java
  2. invariant relations
  3. program functions
  4. program verification
  5. symbolic execution

Qualifiers

  • Research-article

Funding Sources

Conference

FormaliSE '22
Sponsor:

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)62
  • Downloads (Last 6 weeks)7
Reflects downloads up to 30 Aug 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Air Conditioning Systems Fault Detection and Diagnosis-Based Sensing and Data-Driven ApproachesEnergies10.3390/en1612472116:12(4721)Online publication date: 15-Jun-2023
  • (2023)Provably Correct Software: Don't Leave Earth Without ItAIAA SCITECH 2023 Forum10.2514/6.2023-2471Online publication date: 16-Jan-2023

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media