Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.5555/1762980.1763006guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Monad-independent Hoare logic in HasCasl

Published: 07 April 2003 Publication History

Abstract

Monads have been recognized by Moggi as an elegant device for dealing with stateful computation in functional programming languages. It is thus natural to develop a Hoare calculus for reasoning about computational monads. While this has previously been done only for the state monad, we here provide a generic, monad-independent approach, which applies also to further computational monads such as exceptions, input/output, and non-determinism. All this is formalized within the logic of HASCASL, a higher-order language for functional specification and programming. Combination of monadic features can be obtained by combining their loose specifications. As an application, we prove partial correctness of Dijkstra's nondeterministic version of Euclid's algorithm in a monad with nondeterministic dynamic references.

References

[1]
K. Claessen and J. Hughes, Testing monadic code with QuickCheck, Haskell Workshop, ACM, 2002, pp. 65-77.
[2]
CoFI, The Common Framework Initiative for algebraic specification and development, electronic archives, http://www.brics.dk/Projects/CoFI.
[3]
CoFI Language Design Task Group, Casl - The CoFI Algebraic Specification Language - Summary, version 1.0, Documents/CASL/Summary, in {2}, July 1999.
[4]
E. W. Dijkstra, A discipline of programming, Prentice Hall, 1976.
[5]
J.-C. Filliâtre, Proof of imperative programs in type theory, Types for Proofs and Programs, LNCS, vol. 1657, Springer, 1999, pp. 78-92.
[6]
R. Goldblatt, Logics of time and computation, CSLI, 1992.
[7]
The Haskell mailing list, http://www.haskell.org/mailinglist.html, May 2002.
[8]
S. P. Jones, J. Hughes, L. Augustsson, D. Barton, B. Boutel, W. Burton, J. Fasel, K. Hammond, R. Hinze, P. Hudak, T. Johnsson, M. Jones, J. Launchbury, E. Meijer, J. Peterson, A. Reid, C. Runciman, and P. Wadler, Haskell 98: A non-strict, purely functional language, (1999), http://www.haskell.org/onlinereport.
[9]
C. Lüth and N. Ghani, Monads and modularity, Frontiers of Combining Systems, LNAI, vol. 2309, Springer, 2002, pp. 18-32.
[10]
S. Mac Lane, Categories for the working mathematician, Springer, 1997.
[11]
E. Moggi, Notions of computation and monads, Inform. and Comput. 93 (1991), 55-92.
[12]
P. D. Mosses, Casl: A guided tour of its design, Workshop on Abstract Datatypes, LNCS, vol. 1589, Springer, 1999, pp. 216-240.
[13]
F. Regensburger, HOLCF: Higher order logic of computable functions, Theorem Proving in Higher Order Logics, LNCS, vol. 971, 1995, pp. 293-307.
[14]
L. Schröder and T. Mossakowski, HASCASL: Towards integrated specification and development of Haskell programs, Algebraic Methodology and Software Technology, LNCS, vol. 2422, Springer, 2002, pp. 99-116.
[15]
Philip Wadler, How to declare an imperative, ACM Computing Surveys 29 (1997), 240-263.

Cited By

View all
  • (2020)Monadic W in CoqProceedings of the 24th Brazilian Symposium on Context-Oriented Programming and Advanced Modularity10.1145/3427081.3427085(25-32)Online publication date: 19-Oct-2020
  • (2013)A Relatively Complete Generic Hoare Logic for Order-Enriched EffectsProceedings of the 2013 28th Annual ACM/IEEE Symposium on Logic in Computer Science10.1109/LICS.2013.33(273-282)Online publication date: 25-Jun-2013
  • (2009)HasCaslTheoretical Computer Science10.1016/j.tcs.2008.11.020410:12-13(1217-1260)Online publication date: 20-Mar-2009
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Guide Proceedings
FASE'03: Proceedings of the 6th international conference on Fundamental approaches to software engineering
April 2003
403 pages
ISBN:3540008993
  • Editor:
  • Mauro Pezzè

Publisher

Springer-Verlag

Berlin, Heidelberg

Publication History

Published: 07 April 2003

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 08 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2020)Monadic W in CoqProceedings of the 24th Brazilian Symposium on Context-Oriented Programming and Advanced Modularity10.1145/3427081.3427085(25-32)Online publication date: 19-Oct-2020
  • (2013)A Relatively Complete Generic Hoare Logic for Order-Enriched EffectsProceedings of the 2013 28th Annual ACM/IEEE Symposium on Logic in Computer Science10.1109/LICS.2013.33(273-282)Online publication date: 25-Jun-2013
  • (2009)HasCaslTheoretical Computer Science10.1016/j.tcs.2008.11.020410:12-13(1217-1260)Online publication date: 20-Mar-2009
  • (2008)A generic complete dynamic logic for reasoning about purity and effectsProceedings of the Theory and practice of software, 11th international conference on Fundamental approaches to software engineering10.5555/1792838.1792858(199-214)Online publication date: 29-Mar-2008
  • (2007)Bootstrapping types and cotypes in HASCASLProceedings of the 2nd international conference on Algebra and coalgebra in computer science10.5555/1770730.1770762(447-461)Online publication date: 20-Aug-2007
  • (2007)Intuitionistic refinement calculusProceedings of the 8th international conference on Typed lambda calculi and applications10.5555/1770203.1770209(54-69)Online publication date: 26-Jun-2007
  • (2006)Compositional type systems for stack-based low-level languagesProceedings of the Twelfth Computing: The Australasian Theory Symposium - Volume 5110.5555/2523791.2523798(27-39)Online publication date: 16-Jan-2006
  • (2006)Proof abstraction for imperative languagesProceedings of the 4th Asian conference on Programming Languages and Systems10.1007/11924661_6(97-113)Online publication date: 8-Nov-2006
  • (2006)Completeness of global evaluation logicProceedings of the 31st international conference on Mathematical Foundations of Computer Science10.1007/11821069_39(447-458)Online publication date: 28-Aug-2006
  • (2006)Monad-Based logics for computational effectsProceedings of the 11th international conference on Algebraic Methodology and Software Technology10.1007/11784180_3(3-4)Online publication date: 5-Jul-2006
  • Show More Cited By

View Options

View options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media