Advertisement

Partial implementations of abstract data types: A dissenting view on errors

  • Samuel Kamin
  • Myla Archer
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 173)

Abstract

We dissent from the view that all of the behavior of abstract data types, including errors, should be specified. Since most errors are based upon implementation considerations, the specifier of a data type must either anticipate all future errors which may arise in some implementation — which is impossible — or must respecify the data type each time a new implementation is written with new errors — which somewhat defeats the purpose of specification. Our solution is to do as much as possible with the idealized version of the data type, in which errors are eschewed.

We propose a new definition of “implementation” allowing an abstract data type to be implemented by a partial algebra which has the correct behavior as long as its operators are defined. To deal more readily with partial algebras, we introduce the notion of a partial algebra with pre-conditions (pap), and define the semantics of a pap to be another partial algebra. We then give various results which offer ways of proving properties of the algebra denoted by a pap from the pap. Several examples of partial implementations are given.

Data type parameterization is then considered in this context. We extend our new definition of implementation to parameterized types implementing other parameterized types, and then explore parameterized types with pre-conditions.

Keywords

Data Type Relation Symbol Partial Algebra Abstract Data Type Initial Algebra 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

6. References

  1. [1]
    E.K. Blum, F. Parisi-Presicce, Implementation of Data Types by Algebraic Methods, JCSS 27, 304–330, 1983.Google Scholar
  2. [2]
    R.M. Burstall, J.A. Goguen, The Semantics of CLEAR, A Specification Language, Proc. 1979 Copenhagen Winter School: Abstract Software Specifications, Springer-Verlag LNCS 86, 292–332, 1980.Google Scholar
  3. [3]
    H.-D. Ehrich, On the Theory of Specification, Implementation, and Parametrization of Abstract Data Types, JACM 29(1), 206–277, 1982.Google Scholar
  4. [4]
    H. Ehrig, H.-J. Kreowski, Compatibility of Parameter Passing and Implementation of Parameterized Data Types, TCS 27, 255–286, 1983.Google Scholar
  5. [5]
    H. Ehrig, H.-J. Kreowski, B. Mahr, P. Padawitz, Algebraic Implementation of Abstract Data Types, TCS 20, 209–263, 1982.Google Scholar
  6. [6]
    H. Ehrig, H.-J. Kreowski, J. Thatcher, E. Wagner, J. Wright, Parameter-Passing in Algebraic Specification Languages, in J. Staunstrup (ed.), Program Specification, Springer-Verlag LNCS 134, 332–369, 1981.Google Scholar
  7. [7]
    H. Ganzinger, Parameterized Specifications: Parameter-Passing and Implementation with Respect to Observability, ACM TOPLAS 5(3), 318–354, 1983.Google Scholar
  8. [8]
    S. Gerhart, An Experiment in Data Representation Verification, USC-ISI Report, 1979.Google Scholar
  9. [9]
    J. Goguen, Abstract Errors for Abstract Data Types, in E. Neuhold (ed.), Formal Description of Programming Concepts, North-Holland, 1978, 491–526.Google Scholar
  10. [10]
    J. Goguen, Order-Sorted Algebra: Exceptions and Error Sorts, Coercions and Overloaded Operators (Abstract), SRI Technical Report.Google Scholar
  11. [11]
    J. Goguen, J. Meseguer, Universal Realization, Persistent Interconnection and Implementation of Abstract Modules, 9th ICALP, Springer-Verlag LNCS 140, 1982.Google Scholar
  12. [12]
    J. Goguen, J. Meseguer, An Initiality Primer, SRI Report, 1983.Google Scholar
  13. [13]
    J. Goguen, J. Thatcher, E. Wagner, An Initial Algebra Approach to the Specification, Correctness and Implementation of Abstract Data Types, in R. Yeh (ed.), Current Trends in Programming Methodology IV, Prentice-Hall, 1979, 80–149.Google Scholar
  14. [14]
    G. Grätzer, Universal Algebra, Van Nostrand, 1968.Google Scholar
  15. [15]
    J. Guttag, E. Horowitz, D. Musser, Abstract Data Types and Software Validation, CACM 21, 1048–1064, 1978.Google Scholar
  16. [16]
    C.A.R. Hoare, Proof of Correctness of Data Representations, Acta Informatica 1, 271–281, 1972.Google Scholar
  17. [17]
    U. Hupbach, Abstract Implementation of Abstract Data Types, Proc. 9th MFCS, Springer-Verlag LNCS 88, 291–304, 1980.Google Scholar
  18. [18]
    C. Jones, Software Development: A Rigorous Approach, Prentice-Hall International, London, 1980.Google Scholar
  19. [19]
    S. Kamin, Final Data Types and their Specification, ACM TOPLAS 5(1), 97–123, 1983.Google Scholar
  20. [20]
    S. Kamin, S. Jefferson, M. Archer, The Role of Executable Specifications: The FASE System, Proc. IEEE Symposium on Application and Assessment of Automated tools for Software Development, November, 1983.Google Scholar
  21. [21]
    D. Knuth, Fundamental Algorithms, Addison-Wesley, 1973.Google Scholar
  22. [22]
    B. Liskov, S. Zilles, Specification Techniques for Data Abstractions, IEEE Trans. Soft. Engg. Se-1, 7–19, 1975.Google Scholar
  23. [23]
    M. Majster, Treatment of Partial Operations in the Algebric Specification Technique, Proc. IEEE Conf. on Specifications of Reliable Software, Cambridge, Mass., 190–197, 1979.Google Scholar
  24. [24]
    C.F. Nourani, Abstract Implementations and Their Correctness Proofs, JACM 30(2), 343–359, 1983.Google Scholar
  25. [25]
    H. Reichel, Initially-restricting algebraic theories, Proc. 9th MFCS, Rydzyna, Poland, Springer-Verlag LNCS 88, 504–514, 1980.Google Scholar
  26. [26]
    D. Sannella, M. Wirsing, Implementation of Parameterised Specifications, Report CSR-103-82, Dept. of Comp. Sci., U. of Edinburgh, 1982.Google Scholar
  27. [27]
    J. Thatcher, E. Wagner, J. Wright, Data Type Specification: Parameterization and the Power of Specification Techniques, 10th SIGACT Symp. on Theory of Computing, May, 119–132, 1978.Google Scholar
  28. [28]
    M. Wand, Specifications, Models, and Implementations of Data Abstractions, TCS 20(1), 3–32, 1982.Google Scholar
  29. [29]
    W. Wulf, R. London, M. Shaw, An Introduction to the Construction and Verification of ALPHARD Programs, IEEE Trans. on Software Engg. SE-2, 253–265, 1976.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1984

Authors and Affiliations

  • Samuel Kamin
    • 1
  • Myla Archer
    • 1
  1. 1.Computer Science DeptUniversity of IllinoisUrbana

Personalised recommendations