Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Two new strategies for developing loop invariants and their applications

  • Regular Papers
  • Published:
Journal of Computer Science and Technology Aims and scope Submit manuscript

Abstract

The loop invariants take a very important role in the design, proof and derivation of the algorithmic program. We point out the limitations of the traditional standard strategy for developing loop invariants, and propose two new strategies for proving the existing algorithmic program and developing new ones. The strategies use recurrence as vehicle and integrate some effective methods of designing algorithms, e. g. Dynamic Programming, Greedy and Divide- Conquer, into the recurrence relation of problem solving sequence. This lets us get straightforward an approach for solving a variety of complicated problems, and makes the standard proof and formal derivation of their algorithmic programs possible. We show the method and advantages of applying the strategies with several typical nontrivial examples.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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

Instant access to the full article PDF.

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

References

  1. Dijkstra, E. W., A Discipline of Programming. Prentice Hall, Englewood Cliffs, 1976.

    MATH  Google Scholar 

  2. Dijkstra, E. W. and van Gasteren, A. J. M. A simple fixpoint argument without the restriction to continuity.Acta Informatica, 1986, 23, 1–7.

    Article  MATH  MathSciNet  Google Scholar 

  3. Gries, D., The Science of Programming. Springer Verlag, New York, 1981.

    MATH  Google Scholar 

  4. Gries, D., A note on a standard strategy for developing loop invariants and loops.Science of Computer Programming, 1982, 2, 207–214.

    Article  MATH  MathSciNet  Google Scholar 

  5. Gries, D. and Xue, Jinyun, Generating a Random Cyclic Permutation.BIT, 1988, 28, 569–572.

    Article  MATH  MathSciNet  Google Scholar 

  6. Gries, D. and Wadkins, J., An Introduction to Proofs of Program Correctness for Teacher of College-level Introduction, Programming Courses. TR90-1102, Dept. of CS, Cornell Univ., 1990.

  7. Harel, D., Algorithmics: The Spirit of Computing. Addison-Wesley, 108–109, 1987.

  8. Denning, P., A debate on teaching computing science.CACM., 1989, 32, 1397–1414.

    Google Scholar 

  9. Linger, R. C., Mills, H. D. and Witt, B. I., Structured Programming: Theory and Practice. Reading, Mass, Addison-Wesley, 1979.

    MATH  Google Scholar 

  10. Manna, Z. and Waldinger, R., Synthesizer: Dream⇒ Program.IEEE Transaction on Software Engineering, 1979, 5, 294–328.

    Article  Google Scholar 

  11. Remmers, J., A technique for developing loop invariants.Information Processing Letters, 1984, 18, 137–139.

    Article  MathSciNet  Google Scholar 

  12. Xue, Jinyun and Gries, D., Developing a linear algorithm for cubing a cycle permutation.Science of Computer Programming, 1988, 11, 161–165.

    Article  MATH  MathSciNet  Google Scholar 

  13. Li Zhaoren, A formal method of programming and the experimental system.Chinese Journal of Computers, 1985, 8(1), 8–18.

    Google Scholar 

  14. Xue, Jinyun, On Loop Invariant and Its Developing Techniques. Proceedings of China 4th Conference On Software Engneering, 1991. (in Chinese).

  15. Aho, A., Hopcroft, J. and Ullman, J., Data Structures and Algorithms. Addison-Wesley Publishing Company, 1983.

Download references

Author information

Authors and Affiliations

Authors

Additional information

Research supported by the National Natural Science Foundation of China.

Research supported by the National Natural Science Foundation of China.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Jinyun, X. Two new strategies for developing loop invariants and their applications. J. of Compt. Sci. & Technol. 8, 147–154 (1993). https://doi.org/10.1007/BF02939477

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF02939477

Key words