Formal Derivation of a Generic Algorithmic Program for Solving a Class of Extremum Problems

In this paper, we derive formally, using PAR method, a generic algorithmic program for solving aclass of extremum problems which can be abstract into a algebra structure called semiring. Some typicalalgorithms, such as minimal sum problem, maximal product problem, longest ascending segment problem,etc, are all instances of the generic algorithmic program. We put emphasis on the algorithmic derivationrather than the algorithmic verification. Not only embody the designer insight but also reveal the main ideasand ingenuity of these algorithms. The example in this paper confirms that PAR method is a simple andpractical approach in deriving high-trustworthy generic algorithm programs.

[1]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[2]  Douglas R. Smith Designware: Software Development by Refinement , 1999, CTCS.

[3]  S C Kleene,et al.  Representation of Events in Nerve Nets and Finite Automata , 1951 .

[4]  Jinyun Xue,et al.  Formal derivation of graph algorithmic programs using partition-and-recur , 1998, Journal of Computer Science and Technology.

[5]  薛锦云 A Unified Approach for Developing Efficient Algorithmic Programs , 1997 .

[6]  Jim Woodcock,et al.  Using Z - specification, refinement, and proof , 1996, Prentice Hall international series in computer science.

[7]  Jinyun Xue A unified approach for developing efficient algorithmic programs , 2008, Journal of Computer Science and Technology.

[8]  Jinyun Xue Developing the Generic Path Algorithmic Program and its Instantiations Using PAR Method , 2001, APLAS.

[9]  Robert W. Floyd,et al.  Assigning Meanings to Programs , 1993 .

[10]  Eric C. R. Hehner A Practical Theory of Programming , 1993, Texts and Monographs in Computer Science.

[11]  Jinyun Xue Two new strategies for developing loop invariants and their applications , 2008, Journal of Computer Science and Technology.

[12]  Cliff B. Jones,et al.  Systematic software development using VDM , 1986, Prentice Hall International Series in Computer Science.

[13]  Jinyun Xue,et al.  A Derivation and Prrof of Knuth's Binary to Decimal Conversion Program , 1997, Softw. Concepts Tools.

[14]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .