Advertisement

A PROLOG environment for developing and reasoning about data types

  • Jieh Hsiang
  • Mandayam K. Srivas
Colloquium On Software Engineering Abstract Data Types In Software Development
Part of the Lecture Notes in Computer Science book series (LNCS, volume 186)

Abstract

PROLOG is a programming language based on first order logic. The feature that distinguishes PROLOG from most other programming languages is that the execution of PROLOG programs is based on subgoal reduction and unification. Unfortunately, the reliance on unification for execution has also inhibited PROLOG from utilizing some recently developed concepts in programming languages such as abstract data types. In this paper we introduce a discipline for incorporating abstract data types into PROLOG, and study the use of PROLOG as a uniform programming environment for the specification, implementation, and verification of PROLOG programs. We illustrate the application of the environment to the development of abstract data types in PROLOG.

In addition to producing executable specifications, the proposed discipline also provides automatic means of refining a specification into an implementation. We also present a PROLOG-based inductive theorem proving method for proving properties of data types and correctness of implementations.

Keywords

Data Type Logic Program Theorem Prover Unification Algorithm Predicate Symbol 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1. References

  1. [Dav82]
    R. E. Davis, “Runnable Specification as a Design Tool”, in Logic Programming, K. L. Clark and S. Tarnlund, (eds.), Academic Press, January 1982, 141–152.Google Scholar
  2. [Ehr81]
    H. Ehrig, “Algebraic Theory of Parameterized Specifications with Requirements”, 6th CAAP, 1981.Google Scholar
  3. [Fag84]
    F. Fages, “Associative-Commutative Unification”, 7th Conf. on Automated Deduction, Nappa Valley, CA, May, 1984, 194–208.Google Scholar
  4. [GTW78]
    J. A. Goguen, J. W. Thatcher and E. G. Wagner, “Initial Algebra Approach to the Specification, Correctness, and Implementation of Abstract Data Types”, in Current Trends in Programming Methodology, vol. IV Data Structuring, R. T. Yeh, (ed.), Prentice Hall (Automatic Computation Series), Englewood Cliffs, NJ, 1978.Google Scholar
  5. [GoT79]
    J. A. Goguen and J. J. Tardo, “An Introduction to OBJ: A Language for Writing and Testing Formal Algebraic Program Specifications”, Proceedings of the Conference on Specification of Reliable Software, Cambridge, MA 02139, 1979.Google Scholar
  6. [Gog82]
    J. A. Goguen, “Parameterized Programming”, Proceedings of the Workshop on Reusability in Programming, 1982.Google Scholar
  7. [GuH78]
    J. V. Guttag and J. J. Horning, “The Algebraic Specification of Abstract Data Types”, Acta Informatica, 10, 1 (1978), 27–52.Google Scholar
  8. [HaT82]
    A. Hansson and S. Tarnlund, “Program Transformation by Data Structure”, in Logic Programming, K. L. Clark and S. Tarnlund, (eds.), Academic Press, January 1982, 141–152.Google Scholar
  9. [HsS84a]
    J. Hsiang and M. K. Srivas, “On Proving First Order Inductive Properties in Horn Clauses”, Technical Report 84/75, SUNY at Stony Brook, Stony Brook, NY 11794, 1984.Google Scholar
  10. [HsS84b]
    J. Hsiang and M. K. Srivas, “A PROLOG Environment for Developing and Reasoning about Data Types”, Technical Report 84/074, SUNY at Stony Brook, Stony Brook, NY 11794, 1984.Google Scholar
  11. [HuH80]
    G. Huet and J. M. Hullot, “Proofs by Induction in Equational Theories with Constructors”, 21st IEEE Symposium on Foundations of Computer Science, 1980, 797–821.Google Scholar
  12. [HuO80]
    G. Huet and D. C. Oppen, “Equations and Rewrite Rules: A Survey”, in Formal Languages: Perspectives and Open Problems, R. Book, (ed.), Academic Press, 1980.Google Scholar
  13. [Hul80]
    J. M. Hullot, “Canonical Forms and Unification”, 5th Conference on Automated Deduction, Les Arcs, France, 1980, 318–334.Google Scholar
  14. [KaS80]
    D. Kapur and M. K. Srivas, “Expressiveness of the Operation Set of a Data Abstraction”, Seventh Annual ACM Symposium on Principles of Programming Languages, Las Vegas, Nevada, January 28–30, 1980, 139–153.Google Scholar
  15. [Kor83]
    W. A. Kornfeld, “Equality in Prolog”, Proc. 8th IJCAI, Karlsruhe, Germany, August 1983, 514–519.Google Scholar
  16. [Mis84]
    P. Mishra, “Towards a Theory of Types in Prolog”, 1984 International Symposium on Logic Programming, Atlantic City, New Jersey, Feb. 6–9, 1984, 289–298.Google Scholar
  17. [Mus80]
    D. R. Musser, “Abstract Data Types in the AFFIRM System”, IEEE, 1, 6 (Jan. 1980),.Google Scholar
  18. [Pad82]
    P. Padawitz, “Correctness, Completeness and Consistency of Equational Data Type Specifications”, in Ph.D. Thesis,, Technische Universitat, Berlin, 1982.Google Scholar
  19. [Pla84]
    D. A. Plaisted, “The Occur-Check Problem in Prolog”, 1984 International Symposium on Logic Programming, Atlantic City, New Jersey, Feb. 6–9, 1984, 272–280.Google Scholar
  20. [Sri83]
    M. K. Srivas, “A Rewrite Rule Based Approach to Program Transformation”, The Rewrite Rule Laboratory Workshop, Schenectady, NY 12345, September 1983.Google Scholar
  21. [Sti81]
    M. E. Stickel, “A Unification Algorithm for Associative-Commutative Functions”, J. ACM, 28, (1981), 233–264.Google Scholar
  22. [Sti84]
    M. E. Stickel, “A Prolog Technology Theorem Prover”, 1984 International Symposium on Logic Programming, Atlantic City, New Jersey, Feb. 6–9, 1984, 212–219.Google Scholar
  23. [SuY84]
    P. A. Subrahmanyam and J. You, “Conceptual Basis and Evaluation Strategies for Integrating Functional and Logic Programming”, 1984 International Symposium on Logic Programming, Atlantic City, New Jersey, February 6–9, 1984, 144–153.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1985

Authors and Affiliations

  • Jieh Hsiang
    • 1
  • Mandayam K. Srivas
    • 1
  1. 1.Department of Computer ScienceState University of New York at Stony BrookStony BrookUSA

Personalised recommendations