Skip to main content Accessibility help
×
×
Home

Calculating modules in contextual logic program refinement

  • ROBERT COLVIN (a1), IAN J. HAYES (a1) and PAUL STROOPER (a1)
Abstract

The refinement calculus for logic programs is a framework for deriving logic programs from specifications. It is based on a wide-spectrum language that can express both specifications and code, and a refinement relation that models the notion of correct implementation. In this paper we extend and generalise earlier work on contextual refinement. Contextual refinement simplifies the refinement process by abstractly capturing the context of a subcomponent of a program, which typically includes information about the values of the free variables. This paper also extends and generalises module refinement. A module is a collection of procedures that operate on a common data type; module refinement between a specification module A and an implementation module C allows calls to the procedures of A to be systematically replaced with calls to the corresponding procedures of C. Based on the conditions for module refinement, we present a method for calculating an implementation module from a specification module. Both contextual and module refinement within the refinement calculus have been generalised from earlier work and the results are presented in a unified framework.

Copyright
References
Hide All
Back, R. J. R. 1988. A calculus of refinements for program derivations. Acta Informatica 25, 593624.
Bancroft, P. and Hayes, I. J. 1993. Refining a module with opaque types. In Proceedings, 16th Australian Computer Science Conference, Brisbane, Gupta, G., Mohay, G., and Topor, R., Eds. Australian Computer Science Communications 15(1), 615–624.
Basin, D., Deville, Y., Flener, P., Hamfelt, A. and Nilsson, J. F. 2004. Synthesis of programs in computational logic. In Program Development in Computational Logic: A Decade of Research Advances in Logic-Based Program Development, M. Bruynooghe and Lau, K.-K., Eds. Lecture Notes in Computer Science, vol. 3049. Springer Verlag, pp. 3065.
Colvin, R. 2002. Contextual and data refinement for the refinement calculus for logic programs. Ph.D. thesis, School of Information Technology and Electrical Engineering, University of Queensland.
Colvin, R., Groves, L., Hayes, I. J., Hemer, D., Nickson, R. and Strooper, P. 2004. Developing logic programs from specifications using stepwise refinement. In Program Development in Computational Logic: A Decade of Research Advances in Logic-Based Program Development, Bruynooghe, M. and Lau, K.-K., Eds. Lecture Notes in Computer Science, vol. 3049. Springer Verlag, pp. 6689.
Colvin, R., Hayes, I. J., Hemer, D. and Strooper, P. 2002. Translating refined logic programs to Mercury. In Proceedings of the Twenty-Fifth Australasian Computer Science Conference, Oudshoorn, M., Ed. Conferences in Research and Practice in Information Technology, vol. 4. Australian Computer Society, pp. 3340.
Colvin, R., Hayes, I. J. and Strooper, P. 1998. Data refining logic programs. In International Refinement Workshop and Formal Methods Pacific 1998, Grundy, J., Schwenke, M., and Vickers, T., Eds. Discrete Mathematics and Theoretical Computer Science. Springer Verlag, pp. 100116.
Colvin, R., Hayes, I. J. and Strooper, P. 2000. Refining logic programs using types. In Australasian Computer Science Conference (ACSC 2000), Edwards, J., Ed. IEEE Computer Society, pp. 4350.
Colvin, R., Hayes, I. J. and Strooper, P. 2001. A technique for modular logic program refinement. In Logic Based Program Synthesis and Transformation (LOPSTR 2000), Selected Papers, Lau, K.-K., Ed. LNCS, vol. 2402. Springer, pp. 3856.
Dijkstra, E. 1976. A Discipline of Programming. Prentice-Hall.
Hayes, I. J., Colvin, R., Hemer, D., Nickson, R. and Strooper, P. A. 2002. A refinement calculus for logic programs. Theory and Practice of Logic Programming 2, 4–5 (July–September), 425460.
Hayes, I. J., Nickson, R. and Strooper, P. 1997. Refining specifications to logic programs. In Logic Program Synthesis and Transformation. Proc. of the 6th Int. Workshop, LOPSTR'96, Stockholm, Sweden, August 1996, Gallagher, J., Ed. LNCS, vol. 1207. Springer, pp. 119.
Hayes, I. J., Nickson, R., Strooper, P. and Colvin, R. 2000. A declarative semantics for logic program refinement. Tech. Rep. 00-30, Software Verification Research Centre, The University of Queensland.
Hemer, D., Colvin, R., Hayes, I. J. and Strooper, P. 2002. Don't care non-determinism in logic program refinement. In Proceeding of Computing: the Australasian Theory Symposium, Harland, J., Ed. Electronic Notes in Computer Science (ENTCS), vol. 61. Elsevier Science. http://www.elsevier.nl/locate/entcs/volume61.html.
Hemer, D., Hayes, I. J. and Strooper, P. 2001. Refinement Calculus for Logic Programming in Isabelle/HOL. In Theorem Proving in Higher Order Logics, 14th International Conference, TPHOLs 2001, Boulton, R. and Jackson, P., Eds. LNCS, vol. 2152. Springer, pp. 249264.
Hill, P. and Lloyd, J. 1994. The Gödel Programming Language. MIT Press.
Lau, K.-K. and Ornaghi, M. 1997a. Forms of logic specifications: A preliminary study. In Logic Program Synthesis and Transformation. Proc. of the 6th Int. Workshop, LOPSTR'96, Stockholm, Sweden, August 1996, Gallagher, J., Ed. LNCS, vol. 1207. Springer, pp. 295312.
Lau, K.-K. and Ornaghi, M. 1997b. The relationship between logic programs and specifications – the subset example revisited. J. Logic Programming 30, 3 (March), 239257.
Lau, K.-K., Ornaghi, M. and Tärnlund, S.-Å. 1999. Steadfast logic programs. J. Logic Programming 38, 3 (March), 259294.
Liskov, B. and Guttag, J. 1986. Abstraction and Specification in Program Development. MIT Press.
Marriot, K. and Søndergaard, H. 1988. Prolog program transformation by introduction of difference-lists. In In Proceedings International Computer Science Conference '88. IEEE Computer Society, pp. 206213.
Morgan, C. 1994. Programming from Specifications, Second ed.Prentice Hall.
Morgan, C. and Gardiner, P. 1990. Data refinement by calculation. Acta Informatica 27, 481503.
Nickson, R. and Hayes, I. J. 1997. Supporting contexts in program refinement. Science of Computer Programming 29, 3, 279302.
Partsch, H. A. 1990. Specification and Transformation of Programs. Springer-Verlag.
Read, M. and Kazmierczak, E. 1992. Formal program development in modular Prolog. In Logic Program Synthesis and Transformation. Proc. of LOPSTR'91, University of Manchester, July 1991, Clement, T. and Lau, K.-K., Eds. LNCS, vol. 1207. Springer-Verlag, pp. 6993.
Seres, S. and Spivey, M. 2000. Higher-order transformation of logic programs. In Proceedings of the Tenth International Workshop on Logic-based Program Synthesis and Transformation (LOPSTR 2000), Lau, K.-K., Ed. LNCS, vol. 2042. Springer-Verlag, pp. 5768.
Shapiro, E. 1989. The family of concurrent logic programming languages. ACM Comput. Surv. 21, 3, 413510.
Somogyi, Z., Henderson, F. and Conway, T. 1995. Mercury, an efficient purely declarative logic programming language. In Proceedings of the Eighteenth Australasian Computer Science Conference, Kotagiri, R., Ed. Australian Computer Science Communications, Glenelg, South Australia, 499512.
Srinivas, Y. V. and Jullig, R. 1995. Specware: Formal support for composing software. In Mathematics of Program Construction, Möller, B., Ed. Lecture Notes in Computer Science, vol. 947. Springer, pp. 399422.
Sterling, L. and Shapiro, E. 1986. Second edition 1994. The Art of Prolog. MIT Press.
Turski, W. M. and Maibaum, T. S. E. 1987. Specification of Computer Programs. Addison-Wesley.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Theory and Practice of Logic Programming
  • ISSN: 1471-0684
  • EISSN: 1475-3081
  • URL: /core/journals/theory-and-practice-of-logic-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *
×

Keywords

Metrics

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed