Acessibilidade / Reportar erro

Constructing recursions by similarity

Abstract

A formal specification can describe software models which are difficult to program. Transformational methods based on fold/unfold strategies have been proposed to palliate this problem. The objective of applying transformations is to filter out a new version of the specification where recursion may be introduced by a folding step. Among many problems, the "eureka" about when and how to define a new predicate is difficult to find automatically. We propose a new version of the folding rule which decides automatically how to introduce new predicates in a specification. Our method is based on finding similarities between formulas represented as parsing trees and it constitutes an assistance to the complex problem of deriving recursive specifications from non recursive ones.

specification transformation; program synthesis; correctness preservation; program specification


Full text available only in PDF format

Constructing recursions by similarity

F. J. Galán; J. M. Cañete; V. J. Diaz Madrigal

Dept. of Languages and Computer Systems. Faculty of Computer Science of Seville, Dept. de Lenguajes y Sistemas Informáticos. Av. Reina Mercedes s/n. 41012.Sevilla. fax:34 954557139, e-mail:galanm@lsi.us.es

ABSTRACT

A formal specification can describe software models which are difficult to program. Transformational methods based on fold/unfold strategies have been proposed to palliate this problem. The objective of applying transformations is to filter out a new version of the specification where recursion may be introduced by a folding step. Among many problems, the "eureka" about when and how to define a new predicate is difficult to find automatically. We propose a new version of the folding rule which decides automatically how to introduce new predicates in a specification. Our method is based on finding similarities between formulas represented as parsing trees and it constitutes an assistance to the complex problem of deriving recursive specifications from non recursive ones.

Keywords: specification transformation, program synthesis, correctness preservation, program specification.

  • [1] C. Aravindan and P. M. Dung. On the Correctness of Unfold/Fold Transformations of Normal and Extended Logic Programs. (The Journal of Logic Programming) 201-217,1995.
  • [2] A. Avellone, M. Ferrari and P. Miglioli. Synthesis of Programs in Abstract Data Types. 8th In (Proceedings of the International Workshop on Logic Program Synthesis and Transformation). LNCS 1559, Springer, 1999, pages 81-100.
  • [3] A. Bertoni, G. Mauri and P. Miglioli. On the Power of Model Theory in Specifying Abstract Data Types and in capturing their Recursiveness. (Fundamenta Informaticae), VI(2):27-170,1983.
  • [4] A. Bundy, A. Smaill and G. Wiggins. The Synthesis of Logic Programs from Inductive Proofs. In (Proceedings of Esprit Symposium on Computational Logic). Springer-Verlag, pages 135-149,1990.
  • [5] R. M. Burstall y J. Darlington. A Transformational System for Developing Recursive Programs. (Journal of the ACM) 24(1):44-67,1977.
  • [6] Y. Deville andK. K. Lau. Logic Program Synthesis. (J. Logic Programming) 19,20:321-350,1994.
  • [7] R. G. Dromey. Systematic Program Development. (IEEE Transaction of Software Engineering).14(1):12-29,1988.
  • [8] P. Flener. Logic Program Synthesis from Incomplete Information. Kluwer Academic Publishers, Massachusetts, 1995. [9] P. A. Gardner and J. C. Shepherdson. Unfold/Fold Transformations of Logic Programs. MIT Press, pages 565-583,1991.
  • [10] F. J. Galán and J. M. Cañete. Synthesis of Constructive Specifications. In (Proceedings of the I Int. Workshop on Programming and Languages). Ed. F. Orejas. Almagro, Spain, 2001.
  • [11] K. K. Lau and M. Ornaghi. On Specification Frameworks and Deductive Synthesis of Logic Programs. In (Proceedings of LOPSTR'94 and META '94). Springer-Verlag, 1994.
  • [12] E. Mendelson. Introduction to Mathematical Logic. Ed. Wadsworth & Brooks/Cole Advanced books & Software, Third edition, 1987.
  • [13] H. A. Partsch. Specification and Transformation of Programs: A Formal Approach to Software Development. Springer-Verlag 1990.
  • [14] A. Pettorossi and M. Proietti. Transformation of Logic Programs: Foundations and Techniques. (J. Logic Programming) 19,20:261-320,1994.
  • [15] M. Proietti and A. Pettorossi. An Abstract Strategy for Transforming Logic Programs. (Fundamenta Informaticae) 18:267-286,1993.
  • [16] D. R. Smith. KIDS: A Semiautomatic program development system. (IEEE Transaction of Software Engineering) 16:1024-1043,1990.
  • [17] D. Stuart Robertson, J. Agust. Pragmatics in the Synthesis of Logic Programs. In (Proceedings of the 8th Int. Workshop on Logic Program Synthesis and Transformation). LNCS 1559, Springer, pages 41-60,1999.
  • [18] Tamaki, H. and Sato, T. Unfold/Fold Transformation of Logic Programs. Proceedings of the Second International Conference on Logic Programming, Uppsala, Sweden, 1984, pp. 127-138.

Publication Dates

  • Publication in this collection
    14 Sept 2004
  • Date of issue
    Nov 2003
Sociedade Brasileira de Computação Sociedade Brasileira de Computação - UFRGS, Av. Bento Gonçalves 9500, B. Agronomia, Caixa Postal 15064, 91501-970 Porto Alegre, RS - Brazil, Tel. / Fax: (55 51) 316.6835 - Campinas - SP - Brazil
E-mail: jbcs@icmc.sc.usp.br