Skip to main content
Log in

Invariant relations, invariant functions, and loop functions

  • Original Paper
  • Published:
Innovations in Systems and Software Engineering Aims and scope Submit manuscript

Abstract

The increasing criticality of software applications, the increasing size and complexity of such applications, and the increasing reliance of software engineering paradigms on third party software assets combine to place a high premium on the ability to analyze software products to an arbitrary level of thoroughness and precision. Yet despite several decades of research, the goal of analyzing the functional properties of software products to an arbitrary level of thoroughness and precision remains unfulfilled. In this paper, we discuss the use of a relation-theoretic approach inspired from Mills’ logic to analyze while loops, and we support our approach by an operational prototype tool. The proposed method and tool have applications in program comprehension, reverse engineering, program verification, software maintenance, and programmer education.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Banerjee U (1993) Loop transformations for restructuring compilers. Kluwer Academic Publishers, Boston, MA

    Book  MATH  Google Scholar 

  2. Basu SK, Misra JD (1975) Proving loop programs. IEEE Trans Softw Eng 1(1): 76–86

    MathSciNet  Google Scholar 

  3. Boudriga N, Elloumi F, Mili A (1992) The lattice of specifications: applications to a specification methodology. Form Asp Comput 4: 544–571

    Article  MATH  Google Scholar 

  4. Carbonnell ER, Kapur D (2004) Program verification using automatic generation of invariants. In: Proceedings of the international conference on theoretical aspects of computing 2004, Lecture Notes in Computer Science, vol 3407. Springer Verlag, pp 325–340

  5. Carette J, Janicki R (2007) Computing properties of numeric iterative programs by symbolic computation. Fundamentae Informatica 80(1–3): 125–146

    MathSciNet  MATH  Google Scholar 

  6. Cheatham TE, Townley JA (1976) Symbolic evaluation of programs: a look at loop analysis. In: Proceedings of ACM symposium on symbolic and algebraic computation, pp 90–96

  7. Collins RW, Walton GH, Hevner AR, Linger RC (2005) The CERT function extraction experiment: quantifying FX impact on software comprehension and verification. Technical Report CMU/SEI-2005-TN-047. Software Engineering Institute, Carnegie Mellon University

  8. Colon MA, Sankaranarayana S, Sipma HB (2003) Linear invariant generation using non linear constraint solving. In: Proceedings of the computer aided verification. CAV 2003. Lecture Notes in Computer Science, vol 2725. Springer Verlag, pp 420–432

  9. Cousot P, Cousot R (1977) Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proceedings, fourth ACM symposium on principles of programming languages. Los Angeles, CA

  10. Cousot P, Halbwachs N (1978) Automatic discovery of linear restraints among variables of a program. In: Conference record of the fifth annual ACM SIGPLAN-SIGACT symposium on the principles of programming languages, pp 84–97

  11. Denney E, Fischer B (2006) A generic annotation inference algorithm for the safety certification of automatically generated code. In: Proceedings of the fifth international conference on generative programming and component engineering, Portland, Oregon

  12. Dijkstra EW (1976) A discipline of programming. Prentice Hall, Englewood Cliffs

    MATH  Google Scholar 

  13. Dunlop D, Basili VR (1984) A heuristic for deriving loop functions. IEEE Trans Softw Eng 10(3): 275–285

    Article  MATH  Google Scholar 

  14. Ernst MD, Perkins JH, Guo PJ, McCamant S, Pacheco C, Tschantz MS, Xiao C (2006) The Daikon system for dynamic detection of likely invariants. Sci Comput Program 69: 35–45

    Article  MathSciNet  Google Scholar 

  15. Fahringer T, Scholz B (2003) Advanced symbolic analysis for compilers. Springer Verlag, Berlin

    Book  MATH  Google Scholar 

  16. Gries D (1981) The science of programming. Springer Verlag, Berlin

    Book  MATH  Google Scholar 

  17. Gulwani S, McCloskey B, Tiwari A (2008) Lifting abstract interpreters to quantified logic domains. In: 35th ACM symposium on principles of programming languages, pp 235–246. ACM, January 2008

  18. Hevner AR, Linger RC, Collins RW, Pleszkoch MG, Prowell SJ, Walton GH (2005) The impact of function extraction technology on next generation software engineering. Technical Report CMU/SEI-2005-TR-015, Software Engineering Institute, July 2005

  19. Hoare CAR (1969) An axiomatic basis for computer programming. Commun ACM 12(10): 576–583

    Article  MATH  Google Scholar 

  20. Hu L, Harman M, Hierons R, Binkley D (2004) Loop squashing transformations for amorphous slicing. In: Proceedings of the 11th working conference on reverse engineering. IEEE Computer Society

  21. Karr M (1976) Affine relationships among variables of a program. Acta Inform 6: 133–151

    Article  MathSciNet  MATH  Google Scholar 

  22. Kovacs L, Jebelean T (2004) Automated generation of loop invariants by recurrence solving in theorema. In: Petcu D, Negru V, Zaharie D, Jebelean T (eds) Proceedings of the 6th international symposium on symbolic and numeric algorithms for scientific computing (SYNASC04). Timisoara. Romania. Mirton Publisher, pp 451–464

  23. Kovacs L, Jebelean T (2005) An algorithm for automated generation of invariants for loops with conditionals. In: Petcu D (ed) Proceedings of the computer-aided verification on information systems workshop (CAVIS 2005), 7th international symposium on symbolic and numeric algorithms for scientific computing (SYNASC 2005). Department of Computer Science, West University of Timisoara. Romania, pp 16–19

  24. Linger RC, Mills HD, Witt BI (1979) Structured programming. Addison Wesley, Reading

  25. Linger RC, Pleszkoch M (2004) Improving network system security with function extraction technology for automated calculation of program behavior. In: Proceedings of the 37th annual Hawaii international conference on system science (HICSS35), Hawaii. IEEE Computer Society Press, Los Alamitos, CA

  26. Linger RC, Walton G, Hevner A, Burns L (2007) Next-generation software engineering: Function extraction for computation of software behavior. In: Proceedings of the Hawaii international conference on system sciences, HICSS-40. Kona, Hawaii. IEEE Computer Society Press, Los Alamitos, CA

  27. Louhichi A, Mraihi O, Jilani LL, Mili A (2009) Invariant assertions. invariant relations and invariant functions. In: Proceedings of the 2nd international workshop on invariant generation, York, UK

  28. Marlowe TJ, Ryder BG (1990) Properties of dataflow frameworks: a unified model. Acta Inform 28: 121–163

    Article  MathSciNet  MATH  Google Scholar 

  29. McCune W (2003) Otter 3.3 reference manual. Technical Report Technical Memorandum No 263, Argonne National Laboratory. August 2003

  30. Mili A, Aharon S, Nadkarni Ch (2009) Mathematics for reasoning about loop. Sci Comput Program 74: 989–1020

    Article  MathSciNet  MATH  Google Scholar 

  31. Mili A, Desharnais J, Gagne JR (1985) Strongest invariant functions: Their use in the systematic analysis of while statements. Acta Inform 22: 47–66

    Article  MathSciNet  Google Scholar 

  32. Mili A, Desharnais J, Mili F (1987) Relational heuristics for the design of deterministic programs. Acta Inform 24(3): 239–276

    Article  MathSciNet  MATH  Google Scholar 

  33. Mili A, Aharon S, Nadkarni C, Mraihi O, Louhichi A, Jilani LL (2009) Reflexive transitive invariant relations: a basis for computing loop functions. J Symb Comput 45: 1114–1143

    Article  MathSciNet  Google Scholar 

  34. Mills HD (1975) The new math of computer programming. Commun ACM 18(1): 43–48

    Article  MathSciNet  MATH  Google Scholar 

  35. Mraihi O, Louhichi A, Jilani LL, Desharnais J, Mili A (2012) Invariant assertions, invariant relations. and invariant functions. Sci Comput Program. doi:10.1016/j.scico.2012.05.006

  36. Pleszkoch M, Hausler P, Hevner A, Linger RC (1990) Function-theoretic principles of program understanding. In: Proceedings of the 23rd annual Hawaii international conference on system science (HICSS35), Hawaii. IEEE Computer Society Press, Los Alamitos, CA

  37. Podelski A, Rybalchenko A (2004) Transition invariants. In: Proceedings of the 19th annual symposium on logic in computer science, pp 132–144

  38. Pollack W (2005) Meeting the challenge of ultra large scale (uls) systems. Technical Report http://www.sei.cmu.edu/news-at-sei/features/2005/4/feature-2-2005-4.htm. Software Engineering Institute. Carnegie Mellon University, Pittsburgh, PA

  39. Sankaranarayana S, Sipma HB, Manna Z (2004) Non linear loop invariant generation using Groebner bases. In: Proceedings, ACM SIGPLAN principles of programming languages. POPL 2004, pp 381–329

  40. Scholz V, Fahringer T (2003) Advanced symbolic analysis of compilers. Springer Verlag, Berlin

    Google Scholar 

  41. Sharir M, Pnueli A (1981) Two approaches to inter procedural data flow analysis. In: Jones M (ed) Program flow analysis: theory and applications

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Lamia Labed Jilani.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Labed Jilani, L., Louhichi, A., Mraihi, O. et al. Invariant relations, invariant functions, and loop functions. Innovations Syst Softw Eng 8, 195–212 (2012). https://doi.org/10.1007/s11334-012-0189-0

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11334-012-0189-0

Keywords

Navigation