Wolfram Library Archive

Courseware Demos MathSource Technical Notes
All Collections Articles Books Conference Proceedings

Using Computer Algebra techniques for the specification, verification and synthesis of recursive programs

Nikolaj Popov
Tudor Jebelean
Journal / Anthology

Year: 2009
Volume: 79
Issue: 8
Page range: 2302-2309

We describe an innovative method for proving total correctness of tail recursive programs having a specific structure, namely programs in which an auxiliary tail recursive function is driven by a main nonrecursive function, and only the specification of the main function is provided. The specification of the auxiliary function is obtained almost fully automatically by solving coupled linear recursive sequences with constant coefficients. The process is carried out by means of CA (Computer Algebra) and AC (Algorithmic Combinatories) and is implemented in the Theorema system (using Mathematica). We demonstrate this method on an example involving polynomial expressions. Furthermore, we develop a method for synthesis of recursive programs for computing polynomial expressions of a fixed degree by means of "cheap" operations, e.g., additions, subtractions and multiplications. For a given polynomial expression, we define its recursive program in a schemewise manner. The correctness of the synthesized programs follows from the general correctness of the synthesis method. which is proven once for all, using the verification method presented in the first part of this paper. (C) 2008 IMACS. Published by Elsevier B.V. All rights reserved.


Specification and verification, Program synthesis, Computer Algebra

Translate this page: