skip to main content
article

Inductive reasoning about effectful data types

Published:01 October 2007Publication History
Skip Abstract Section

Abstract

We present a pair of reasoning principles, definition and proof by rigid induction, which can be seen as proper generalizations of lazy-datatype induction to monadic effects other than partiality. We further show how these principles can be integrated into logical-relations arguments, and obtain as a particular instance a general and principled proof that the success-stream and failure-continuation models of backtracking are equivalent. As another application, we present a monadic model of general search trees, not necessarily traversed depth-first. The results are applicable to both lazy and eager languages, and we emphasize this by presenting most examples in both Haskell and SML.

References

  1. Roy L. Crole and Andrew M. Pitts. New foundations for fixpoint computations: FIX-hyperdoctrines and the FIX-logic. Information and Computation, 98:171--210, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Olivier Danvy and Kevin Millikin. Refunctionalization at work. BRICS Research Report RS-07-7, Department of Computer Science, University of Aarhus, 2007.Google ScholarGoogle Scholar
  3. Olivier Danvy, Bernd Grobauer, and Morten Rhiger. A unifying approach to goal-directed evaluation. New Generation Computing, 20(1):53--73, 2002. ISSN 0288-3635. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Andrzej Filinski. Representing layered monads. In Proceedings of the 26th ACM Symposium on Principles of Programming Languages, pages 175--188, San Antonio, Texas, January 1999. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Andrzej Filinski. On the relations between monadic semantics. Theoretical Computer Science, 375:41--75, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Marcelo Fiore and Gordon D. Plotkin. An axiomatisation of computationally adequate domain theoretic models of FPC. In Proceedings of the Ninth Symposium on Logic in Computer Science, pages 92--102, Paris, France, 1994.Google ScholarGoogle ScholarCross RefCross Ref
  7. Ralf Hinze. Deriving backtracking monad transformers. In ICFP '00: Proceedings of the 5th International Conference on Functional programming, pages 186--197. ACM Press, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Martin Hofmann. Non strictly positive datatypes for breadth first search. TYPES Forum posting, 1993. Available from http://www.seas.upenn.edu/~sweirich/types/archive/1993/msg00027.html.Google ScholarGoogle Scholar
  9. John Hughes. The design of a pretty-printing library. In Advanced Functional Programming, First International Spring School, volume 925 of LNCS, pages 53--96, 1995. Google ScholarGoogle Scholar
  10. Oleg Kiselyov, Chung-chieh Shan, Daniel P. Friedman, and Amr Sabry. Backtracking, interleaving, and terminating monad transformers. In ICFP '05: Proceedings of the 10th International conference on Functional programming, pages 192--203. ACM Press, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Daniel J. Lehmann and Michael B. Smyth. Algebraic specification of data types: A synthetic approach. Mathematical Systems Theory, 14:97--139, 1981.Google ScholarGoogle ScholarCross RefCross Ref
  12. Eugenio Moggi. Notions of computation and monads. Information and Computation, 93(1):55--92, July 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Andrew M. Pitts. Relational properties of domains. Information and Computation, 127:66--90, 1996.Google ScholarGoogle ScholarCross RefCross Ref
  14. Chris Reade. Elements of Functional Programming. Addison Wesley, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. John C. Reynolds. On the relation between direct and continuation semantics. In 2nd Colloquium on Automata, Languages and Programming, volume 14 of LNCS, pages 141--156, Saarbrücken, Germany, July 1974. Google ScholarGoogle Scholar
  16. Michael Spivey. Algebras for combinatorial search. In Workshop on Mathematically Structured Functional Programming, Kuressaare, Estonia, July 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Mitchell Wand and Dale Vaillancourt. Relating models of backtracking. In ICFP '04: Proceedings of the 9th International conference on Functional programming, pages 54--65. ACM Press, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Inductive reasoning about effectful data types

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!