Swinging data types

Syntax, semantics, and theory
  • Peter Padawitz
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1130)


Initial structures are appropriate for modelling constructor-based data types because they fit the intuition and admit inductive theorem proving. In practice, the latter requires a distinction between constructors and defined functions and an axiomatization that complies with the constructor discipline. This badly suits non- free or permutative types such as sets, bags and maps and is yet less reasonable when infinite structures like streams or processes come into play. Instead, non-free as well as infinite structures should be regarded as dynamic objects and identified through observable reactions (observers, inquiries, attributes) upon received messages (transitions, actions, methods) rather than by constructors they are built of. The intended model is based on an extensional, contextual, behavioural, observational or bisimilarity relation and given by the final object in a category of conservative structures. This enforces a hierarchical approach because the nature of attributes is to map higher-level to lower-level objects. Data types with both constructor and action sorts are split into swinging chains of specifications each of which extends its predecessor by either a constructor type or an action type. Constructor types are characterized by visible domains, inductively defined total functions, structural equality and safety conditions expressed as Horn clauses. Action types are given by hidden, but — via predecessors in the chain of specifications — observable domains, partial functions and coinductively defined behavioural equality and liveness conditions. The canonical model of a swinging specification is a chain of initial and final models. For proof-theoretical purposes action types are transformed into their Horn clause completions whereby the semantics of the whole specification reduces to a chain of initial models captured by uniform proof rules and induction principles.


Logic Program Action Type Horn Clause Constructor Type Algebraic Specification 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    S. Abramsky, C.-H. Luke Ong, Full Abstraction in the Lazy λ-Calculus, Information and Computation 105 (1993) 159–267Google Scholar
  2. 2.
    K.R. Apt, Logic Programming, in: J. van Leeuwen, ed., Handbook of Theoretical Computer Science, Elsevier (1990) 493–574Google Scholar
  3. 3.
    J.C.M. Baeten, W.P. Weijland, Process Algebra Cambridge University Press 1990Google Scholar
  4. 4.
    M. Barr, Terminal Coalgebras in Well-founded Set Theory, Theoretical Computer Science 114 (1993) 299–315Google Scholar
  5. 5.
    J.A. Bergstra, J.V. Tucker, Top-down Design and the Algebra of Communicating Processes, Science of Computer Programming 5 (1985) 171–199Google Scholar
  6. 6.
    M. Bidoit, R. Hennicker, Behavioural Theories and the Proof of Behavioural Properties, Report LIENS-95-5, DMI, LIENS Paris 1995Google Scholar
  7. 7.
    M. Bidoit, R. Hennicker, M. Wirsing, Behavioural and Abstractor Specifications, Science of Computer Programming 25 (1995) 149–186Google Scholar
  8. 8.
    R. Bird, Ph. Wadler, Introduction to Functional Programming, Prentice Hall 1988Google Scholar
  9. 9.
    S.L. Bloom, Varieties of Ordered Algebras, J. Computer and System Sciences 13 (1976) 200–212Google Scholar
  10. 10.
    Y. Chen, M.J. O'Donnell, Infinite Terms and Infinite Rewritings, Proc. CTRS '90, Springer LNCS 516 (1990) 115–126Google Scholar
  11. 11.
    R. Cockett, T. Fukushima, About Charity, Report, University of Calgary 1992Google Scholar
  12. 12.
    H. Ehrig, B. Mahr, Fundamentals of Algebraic Specification 1, Springer 1985Google Scholar
  13. 13.
    H. Ehrig, F. Parisi-Presicce, P. Boehm, C. Riekhoff, C. Dimitrovici, M. Grosse-Rhode, Combining Data Type and Recursive Process Specifications Using Projection Algebras, Theoretical Computer Science 71 (1990) 347–380Google Scholar
  14. 14.
    V. Giarratana, F. Gimona, U. Montanari, Observability Concepts in Abstract Data Type Specifications, Proc. MFCS '76, Springer LNCS 45 (1976) 576–587Google Scholar
  15. 15.
    J.A. Goguen, R. Diaconescu, Towards an Algebraic Semantics for the Object Paradigm, Proc. 9th ADT Workshop, Springer LNCS 785 (1994) 1–29Google Scholar
  16. 16.
    J.A. Goguen, J. Meseguer, Eqlog: Equality, Types, and Generic Modules for Logic Programming, in: D. DeGroot, G. Lindstrom, Logic Programming: Functions, Relations, and Equations, Prentice-Hall (1986) 295–363Google Scholar
  17. 17.
    J.A. Goguen, J.W. Thatcher, E.G. Wagner, An Initial Algebra Approach to the Specification, Correctness and Implementation of Abstract Data Types, in: R. Yeh, ed., Current Trends in Programming Methodology 4, Prentice-Hall (1978) 80–149Google Scholar
  18. 18.
    J.A. Goguen, J.W. Thatcher, E.G. Wagner, J.B. Wright, Initial Algebra Semantics and Continuous Algebras, J. ACM 24 (1977) 68–95Google Scholar
  19. 19.
    A.D. Gordon, A Tutorial on Co-induction and Functional Programming, Proc. Functional Programming Glasgow 1994, Springer (1995) 78–95Google Scholar
  20. 20.
    J.V. Guttag, J.J. Horning, Larch: Languages and Tools for Formal Specification, Springer 1993Google Scholar
  21. 21.
    T. Hagino, Codatatypes in ML, J. Symbolic Computation 8 (1989) 629–650Google Scholar
  22. 22.
    R. Hennicker, Context Induction: A Proof Principle for Behavioural Abstractions, Formal Aspects of Computing (1991) 326–345Google Scholar
  23. 23.
    S. Hölldobler, Foundations of Equational Logic Programming, Springer (1989)Google Scholar
  24. 24.
    J. Jaffar, J.-L. Lassez, M.J. Maher, A Theory of Complete Logic Programs with Equality, J. Logic Programming 3 (1984) 211–223Google Scholar
  25. 25.
    J. Jaffar, J.-L. Lassez, Constraint Logic Programming, Proc. POPL '87 (1987) 111–119Google Scholar
  26. 26.
    J.-P. Jouannaud, H. Kirchner, Completion of a Set of Rules Modulo a Set of Equations, SIAM J. Computing 15 (1986) 1155–1194Google Scholar
  27. 27.
    S. Kamin, Final Data Type Specifications: A New Data Type Specification Method, ACM TOPLAS 5 (1983) 97–123Google Scholar
  28. 28.
    J.-L. Lassez, V.L. Nguyen, E.A. Sonenberg, Fixed Point Theorems and Semantics: A Folk Tale, Information Processing Letters 14 (1982) 112–116Google Scholar
  29. 29.
    D.J. Lehmann, M.B. Smyth, Algebraic Specification of Data Types: A Synthetic Approach, Mathematical Systems Theory 14 (1981) 97–139Google Scholar
  30. 30.
    M.R. Levy, T.S.E. Maibaum, Continuous Data Types, SIAM J. Computing 11 (1982) 201–216Google Scholar
  31. 31.
    J. Loeckx, K. Sieber, The Foundations of Program Verification, 2nd ed., Teubner 1987Google Scholar
  32. 32.
    Z. Manna, Mathematical Theory of Computation, McGraw-Hill 1974Google Scholar
  33. 33.
    J. Meseguer, J.A. Goguen, Initiality, Induction and Computability, in: M. Nivat, J. Reynolds, eds., Algebraic Methods in Semantics, Cambridge University Press (1985) 459–541Google Scholar
  34. 34.
    R. Milner, Communication and Concurrency, Prentice-Hall (1989)Google Scholar
  35. 35.
    B. Möller, On the Algebraic Specification of Infinite Objects: Ordered and Continuous Models of Algebraic Types, Acta Informatics 22 (1984) 537–578Google Scholar
  36. 36.
    J.H. Morris, Another Recursion Induction Principle, Communications ACM 14 (1971) 351–354Google Scholar
  37. 37.
    P. Nivela, F. Orejas, Initial Behaviour Semantics for Algebraic Specifications, Proc. 5th ADT Workshop, Springer LNCS 332 (1988) 184–207Google Scholar
  38. 38.
    M. Nivat, On the Interpretation of Recursive Polyadic Program Schemes, Symposia Mathematica 15 (1975) 255–281Google Scholar
  39. 39.
    P. Padawitz, Equational Data Type Specifications and Recursive Program Schemes, Proc. Formal Description of Programming Concepts II, North-Holland (1983) 305–328Google Scholar
  40. 40.
    P. Padawitz, Computing in Horn Clause Theories, Springer 1988Google Scholar
  41. 41.
    P. Padawitz, Deduction and Declarative Programming, Cambridge University Press 1992Google Scholar
  42. 42.
    P. Padawitz, Expander: A System for Testing and Verifying Functional-Logic Programs, Report No. 522/1994, FB Informatik, Universität Dortmund 1994Google Scholar
  43. 43.
    P. Padawitz, Inductive Theorem Proving for Design Specifications, Report No. 533/1994, FB Informatik, Universität Dortmund 1994, to appear in J. Symbolic ComputationGoogle Scholar
  44. 44.
    P. Padawitz, Swinging Data Types: The Dielectic between Actions and Constructors, Report FB Informatik, Universität Dortmund 1995, available from Scholar
  45. 45.
    H. Reichel, An Approach to Object Semantics based on Terminal Coalgebras, Report, Fakultät Informatik, TU Dresden 1994Google Scholar
  46. 46.
    R. Reiter, On Closed World Data Bases, Proc. Logic and Data Bases, Plenum Press (1978)Google Scholar
  47. 47.
    J. Rutten, A Structural Coinduction Theorem, Proc. MFPS '93, Springer LNCS 802 (1993) 83–102Google Scholar
  48. 48.
    D. Sannella, A. Tarlecki, On Observational Equivalence and Algebraic Specification, J. Computer and System Sciences 34 (1987) 150–178Google Scholar
  49. 49.
    D. Scott, Outline of a Mathematical Theory of Computation, Proc. Information Sciences and Systems, Princeton (1970) 169–176Google Scholar
  50. 50.
    M. Stickel, Automated Deduction by Theory Resolution, J. Automated Reasoning 1 (1985) 333–356Google Scholar
  51. 51.
    A. Tarlecki, M. Wirsing, Continuous Abstract Data Types, Fundamenta Informaticae 9 (1986) 95–126Google Scholar
  52. 52.
    M. Wand, Final Algebra Semantics and Data Type Extensions, J. Computer and System Sciences 19 (1979) 27–44Google Scholar
  53. 53.
    M. Wirsing, P. Pepper, H. Partsch, W. Dosch, M. Broy, On Hierarchies of Abstract Data Types, Acta Informatica 20 (1983) 1–33Google Scholar
  54. 54.
    M. Wirsing, Algebraic Specification, in: J. van Leeuwen, ed., Handbook of Theoretical Computer Science, Elsevier (1990) 675–788Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Peter Padawitz
    • 1
  1. 1.Fachbereich InformatikUniversität DortmundGermany

Personalised recommendations