Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Logical and computational aspects of programming with sets/bags/lists

  • Functional Programming (Session 2)
  • Conference paper
  • First Online:
Automata, Languages and Programming (ICALP 1991)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 510))

Included in the following conference series:

Abstract

We study issues that arise in programming with primitive recursion over non-free datatypes such as lists, bags and sets. Programs written in this style can lack a meaning in the sense that their outputs may be sensitive to the choice of input expression. We are, thus, naturally lead to a set-theoretic denotational semantics with partial functions. We set up a logic for reasoning about the definedness of terms and a deterministic and terminating evaluator. The logic is shown to be sound in the model, and its recursion free fragment is shown to be complete for proving definedness of recursion free programs. The logic is then shown to be as strong as the evaluator, and this implies that the evaluator is compatible with the provable equivalence between different set (or bag, or list) expression . Oftentimes,the same non-free datatype may have different presentations, and it is not clear a priori whether programming and reasoning with the two presentations are equivalent. We formulate these questions, precisely, in the context of alternative presentations of the list, bag, and set datatypes and study some aspects of these questions. In particular, we establish back-and-forth translations between the two presentations, from which it follows that they are equally expressive, and prove results relating proofs of program properties, in the two presentations.

The authors are partially supported by ONR Grant NOOO14-88-K-0634, by NSF Grant CCR-90-57570, and by an IBM Graduate Fellowship.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. M.P. Atkinson and O.P. Buneman. Types and Persistence in Database Programming Languages. ACM Computing Surveys, June 1987.

    Google Scholar 

  2. J. Backus. Can Programming Be Liberated from the von Neumann style? A Functional Style and its Algebra of Programs. Communications of the ACM, 21:613–641, august 1978.

    Google Scholar 

  3. H. P. Barendregt. The Lambda Calculus: Its Syntax and Semantics. Volume 103 of Studies in Logic and the Foundations of Mathematics, North-Holland, Amsterdam, second edition, 1984.

    Google Scholar 

  4. R. Bird and P. Wadler. Introduction to Functional Programming. Series in Computer Science, Prentice Hall International, 1988.

    Google Scholar 

  5. [Breazu-Tannen et al., 1991] V. Breazu-Tannen, P. Buneman, and S. Naqvi. Structural Recursion as a Query Language. Unpublished Manuscript, University of Pennsylvania. 1991.

    Google Scholar 

  6. P. Buneman, A. Jung, and A. Ohori. Using Powerdomains to Generalize Relational Databases. Theoretical Computer Science, august 1989.

    Google Scholar 

  7. E. F. Codd. A Relational Model For Large Shared Databank. Communications of the ACM, 13(6):377–387, 1970.

    Google Scholar 

  8. J. Y. Girard, Y. Lafont, and P. Taylor. Typed Lambda Calculus. Cambridge University Press, 1989.

    Google Scholar 

  9. C. A. Gunter. Sets and the semantics of bounded non-determinism. Unpublished manuscript, University of Cambridge. 1986.

    Google Scholar 

  10. E. Moggi. Categories of Partial Morphisms and the λ p -calculus. In Proceedings of the Category Theory and Computer Programming, Springer-Verlag, 1985.

    Google Scholar 

  11. A. Ohori, P. Buneman, and V. Breazu-Tannen. Database Programming in Machiavelli — a Polymorphic Language with Static Type Inference. In Proceedings of the ACM SIGMOD conference, pages 46–57, May–June 1989.

    Google Scholar 

  12. J.W. Schmidt. Some High Level Language Constructs for Data of Type Relation. ACM Transactions on Database Systems, 2(3):247–261, september 1977.

    Google Scholar 

  13. J. T. Schwartz, R. B. K. Dewar, E. Dubinsky, and E. Schonberg. Programming with Sets: An Introduction to SETL. Springer-Verlag, New York, 1986.

    Google Scholar 

  14. P. Wadler. Views: A Way For Pattern Matching to Cohabit with Data Abstraction. In Proceedings of the Conference on the Principles of Programming Languages, pages 307–313, 1987.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Javier Leach Albert Burkhard Monien Mario Rodríguez Artalejo

Rights and permissions

Reprints and permissions

Copyright information

© 1991 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Breazu-Tannen, V., Subrahmanyam, R. (1991). Logical and computational aspects of programming with sets/bags/lists. In: Albert, J.L., Monien, B., Artalejo, M.R. (eds) Automata, Languages and Programming. ICALP 1991. Lecture Notes in Computer Science, vol 510. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-54233-7_125

Download citation

  • DOI: https://doi.org/10.1007/3-540-54233-7_125

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-54233-9

  • Online ISBN: 978-3-540-47516-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics