skip to main content
10.1145/2784731.2784745acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Bounded refinement types

Published:29 August 2015Publication History

ABSTRACT

We present a notion of bounded quantification for refinement types and show how it expands the expressiveness of refinement typing by using it to develop typed combinators for: (1) relational algebra and safe database access, (2) Floyd-Hoare logic within a state transformer monad equipped with combinators for branching and looping, and (3) using the above to implement a refined IO monad that tracks capabilities and resource usage. This leap in expressiveness comes via a translation to ``ghost" functions, which lets us retain the automated and decidable SMT based checking and inference that makes refinement typing effective in practice.

References

  1. C. Barrett, A. Stump, and C. Tinelli. http://smt-lib.org.Google ScholarGoogle Scholar
  2. J. Bengtson, K. Bhargavan, C. Fournet, A. D. Gordon, and S. Maffeis. Refinement types for secure implementations. ACM TOPLAS, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Y. Bertot and P. Castéran. Coq’Art: The Calculus of Inductive Constructions. Springer Verlag, 2004.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. R.L. Constable. Implementing Mathematics with the Nuprl Proof Development System. Prentice-Hall, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. P. Cousot and R. Cousot. Abstract interpretation: a unified lattice model for the static analysis of programs. In POPL, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. J. Dunfield. Refined typechecking with Stardust. In PLPV, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. R. A. Eisenberg and S. Weirich. Dependently typed programming with singletons. In Haskell, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J.C. Filliˆatre. Proof of imperative programs in type theory. In TYPES, 1998.Google ScholarGoogle Scholar
  9. C. Fournet, M. Kohlweiss, and P-Y. Strub. Modular code-based cryptographic verification. In CCS, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. A. Guha, M. Fredrikson, B. Livshits, and N. Swamy. Verified security for browser extensions. In IEEE S & P, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. G. Kaki and S. Jagannathan. A relational framework for higher-order shape analysis. In ICFP, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. O. Kiselyov, R. Lämmel, and K. Schupke. Strongly typed heterogeneous collections. In Haskell, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. D. Leijen and E. Meijer. Domain specific embedded compilers. In DSL, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. McBride. Simulating dependent types in Haskell. In JFP, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Moore, C. Dimoulas, D. King, and S. Chong. SHILL: A secure shell scripting language. In OSDI, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. A. Nanevski, G. Morrisett, A. Shinnar, P. Govereau, and L. Birkedal. Ynot: Dependent types for imperative programs. In ICFP, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. G. Nelson. Techniques for program verification. Technical Report CSL81-10, Xerox Palo Alto Research Center, 1981.Google ScholarGoogle Scholar
  18. U. Norell. Towards a practical programming language based on dependent type theory. PhD thesis, Chalmers, 2007.Google ScholarGoogle Scholar
  19. N. Oury and W. Swierstra. The power of Pi. In ICFP, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. S. L. Peyton-Jones, D. Vytiniotis, S. Weirich, and G. Washburn. Simple unification-based type inference for GADTs. In ICFP, 2006.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. P. Rondon, M. Kawaguchi, and R. Jhala. Liquid types. In PLDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. Rushby, S. Owre, and N. Shankar. Subtypes for specifications: Predicate subtyping in pvs. IEEE TSE, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. N. Swamy, J. Weinberger, C. Schlesinger, J. Chen, and B. Livshits. Verifying higher-order programs with the dijkstra monad. In PLDI, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. UCSD Programming Systems. github.com/ucsd-progsys/ liquidhaskell/tree/master/benchmarks/icfp15.Google ScholarGoogle Scholar
  25. S. Tobin-Hochstadt and M. Felleisen. Logical types for untyped languages. In ICFP, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. H. Unno, T. Terauchi, and N. Kobayashi. Relatively complete verification of higher-order functional programs. In POPL, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. N. Vazou, P. Rondon, and R. Jhala. Abstract refinement types. In ESOP, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. N. Vazou, E. L. Seidel, and R. Jhala. Liquidhaskell: Experience with refinement types in the real world. In Haskell, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. N. Vazou, E. L. Seidel, R. Jhala, D. Vytiniotis, and S. L. Peyton Jones. Refinement types for Haskell. In ICFP, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. H. Xi and F. Pfenning. Eliminating array bound checking through dependent types. In PLDI, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Bounded refinement 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
                • Published in

                  cover image ACM Conferences
                  ICFP 2015: Proceedings of the 20th ACM SIGPLAN International Conference on Functional Programming
                  August 2015
                  436 pages
                  ISBN:9781450336697
                  DOI:10.1145/2784731
                  • cover image ACM SIGPLAN Notices
                    ACM SIGPLAN Notices  Volume 50, Issue 9
                    ICFP '15
                    September 2015
                    436 pages
                    ISSN:0362-1340
                    EISSN:1558-1160
                    DOI:10.1145/2858949
                    • Editor:
                    • Andy Gill
                    Issue’s Table of Contents

                  Copyright © 2015 ACM

                  Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 29 August 2015

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • research-article

                  Acceptance Rates

                  Overall Acceptance Rate333of1,064submissions,31%

                  Upcoming Conference

                  ICFP '24

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader