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.
- C. Barrett, A. Stump, and C. Tinelli. http://smt-lib.org.Google Scholar
- J. Bengtson, K. Bhargavan, C. Fournet, A. D. Gordon, and S. Maffeis. Refinement types for secure implementations. ACM TOPLAS, 2011. Google ScholarDigital Library
- Y. Bertot and P. Castéran. Coq’Art: The Calculus of Inductive Constructions. Springer Verlag, 2004.Google ScholarDigital Library
- R.L. Constable. Implementing Mathematics with the Nuprl Proof Development System. Prentice-Hall, 1986. Google ScholarDigital Library
- P. Cousot and R. Cousot. Abstract interpretation: a unified lattice model for the static analysis of programs. In POPL, 1977. Google ScholarDigital Library
- J. Dunfield. Refined typechecking with Stardust. In PLPV, 2007. Google ScholarDigital Library
- R. A. Eisenberg and S. Weirich. Dependently typed programming with singletons. In Haskell, 2012. Google ScholarDigital Library
- J.C. Filliˆatre. Proof of imperative programs in type theory. In TYPES, 1998.Google Scholar
- C. Fournet, M. Kohlweiss, and P-Y. Strub. Modular code-based cryptographic verification. In CCS, 2011. Google ScholarDigital Library
- A. Guha, M. Fredrikson, B. Livshits, and N. Swamy. Verified security for browser extensions. In IEEE S & P, 2011. Google ScholarDigital Library
- G. Kaki and S. Jagannathan. A relational framework for higher-order shape analysis. In ICFP, 2014. Google ScholarDigital Library
- O. Kiselyov, R. Lämmel, and K. Schupke. Strongly typed heterogeneous collections. In Haskell, 2004. Google ScholarDigital Library
- D. Leijen and E. Meijer. Domain specific embedded compilers. In DSL, 1999. Google ScholarDigital Library
- C. McBride. Simulating dependent types in Haskell. In JFP, 2002. Google ScholarDigital Library
- S. Moore, C. Dimoulas, D. King, and S. Chong. SHILL: A secure shell scripting language. In OSDI, 2014. Google ScholarDigital Library
- A. Nanevski, G. Morrisett, A. Shinnar, P. Govereau, and L. Birkedal. Ynot: Dependent types for imperative programs. In ICFP, 2008. Google ScholarDigital Library
- G. Nelson. Techniques for program verification. Technical Report CSL81-10, Xerox Palo Alto Research Center, 1981.Google Scholar
- U. Norell. Towards a practical programming language based on dependent type theory. PhD thesis, Chalmers, 2007.Google Scholar
- N. Oury and W. Swierstra. The power of Pi. In ICFP, 2008. Google ScholarDigital Library
- S. L. Peyton-Jones, D. Vytiniotis, S. Weirich, and G. Washburn. Simple unification-based type inference for GADTs. In ICFP, 2006.Google ScholarDigital Library
- P. Rondon, M. Kawaguchi, and R. Jhala. Liquid types. In PLDI, 2008. Google ScholarDigital Library
- J. Rushby, S. Owre, and N. Shankar. Subtypes for specifications: Predicate subtyping in pvs. IEEE TSE, 1998. Google ScholarDigital Library
- N. Swamy, J. Weinberger, C. Schlesinger, J. Chen, and B. Livshits. Verifying higher-order programs with the dijkstra monad. In PLDI, 2013. Google ScholarDigital Library
- UCSD Programming Systems. github.com/ucsd-progsys/ liquidhaskell/tree/master/benchmarks/icfp15.Google Scholar
- S. Tobin-Hochstadt and M. Felleisen. Logical types for untyped languages. In ICFP, 2010. Google ScholarDigital Library
- H. Unno, T. Terauchi, and N. Kobayashi. Relatively complete verification of higher-order functional programs. In POPL, 2013. Google ScholarDigital Library
- N. Vazou, P. Rondon, and R. Jhala. Abstract refinement types. In ESOP, 2013. Google ScholarDigital Library
- N. Vazou, E. L. Seidel, and R. Jhala. Liquidhaskell: Experience with refinement types in the real world. In Haskell, 2014. Google ScholarDigital Library
- N. Vazou, E. L. Seidel, R. Jhala, D. Vytiniotis, and S. L. Peyton Jones. Refinement types for Haskell. In ICFP, 2014. Google ScholarDigital Library
- H. Xi and F. Pfenning. Eliminating array bound checking through dependent types. In PLDI, 1998. Google ScholarDigital Library
Index Terms
- Bounded refinement types
Recommendations
Refinement reflection: complete verification with SMT
We introduce Refinement Reflection, a new framework for building SMT-based deductive verifiers. The key idea is to reflect the code implementing a user-defined function into the function’s (output) refinement type. As a consequence, at uses of the ...
Refinement types for Haskell
PLPV '14: Proceedings of the ACM SIGPLAN 2014 Workshop on Programming Languages meets Program VerificationWe present LiquidHaskell (http://goto.ucsd.edu/liquid), an automatic verifier for Haskell. LiquidHaskell uses Refinement types, a restricted form of dependent types where relationships between values are encoded by decorating types with logical ...
Bounded refinement types
ICFP '15We 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 ...
Comments