Compile-time memory safety using Liquid Haskell
haskellforall.com
Compile-time memory safety using Liquid Haskell
1–9 of 9 posts
Re: Compile-time memory safety using Liquid Haskell
#2Of course, the other popular approach is to use dependent types. I've recently run up against the limits of Haskell's type system in a number of projects, so I've been playing around with Idris. It's very cool to be able to promote arbitrary functions to the type level (and higher). The potential applications for static analysis are awesome.
I recommend everyone play around with cutting-edge type systems. Doing so has really influenced the way I program and do math. Haskell is pretty far up there, especially with standard GHC extensions (DataKinds etc.). Liquid Haskell, idris, agda, etc. are even more powerful. If you're coming from a C/Python/Java/etc. background like I did, you'll be totally blown away.
Re: Compile-time memory safety using Liquid Haskell
#3The liquid Haskell constraint approach is very interesting. I have not tried it yet, but it looks like it might be quite usable. Of course, the other popular approach is to use dependent types. I've recently run up against the limits of Haskell's type system in a number of projects, so I've been playing around with Idris. It's very cool to be able to promote arbitrary functions to the type level (and higher). The pot…
Re: Compile-time memory safety using Liquid Haskell
#4The liquid Haskell constraint approach is very interesting. I have not tried it yet, but it looks like it might be quite usable. Of course, the other popular approach is to use dependent types. I've recently run up against the limits of Haskell's type system in a number of projects, so I've been playing around with Idris. It's very cool to be able to promote arbitrary functions to the type level (and higher). The pot…
There's a perspective that unifies both the Liquid Haskell-style approach and dependent types, which is "behavioral type theory". Nuprl (the longest-lived implementation of dependent type theory, starting in the early 80s and still going strong today) is an example of a behavioral type theory, for instance; it's a trivial example, though, since the behavioral types refine a unityped structural framework, but you can…
Re: Compile-time memory safety using Liquid Haskell
#5The liquid Haskell constraint approach is very interesting. I have not tried it yet, but it looks like it might be quite usable. Of course, the other popular approach is to use dependent types. I've recently run up against the limits of Haskell's type system in a number of projects, so I've been playing around with Idris. It's very cool to be able to promote arbitrary functions to the type level (and higher). The pot…
There's a perspective that unifies both the Liquid Haskell-style approach and dependent types, which is "behavioral type theory". Nuprl (the longest-lived implementation of dependent type theory, starting in the early 80s and still going strong today) is an example of a behavioral type theory, for instance; it's a trivial example, though, since the behavioral types refine a unityped structural framework, but you can…
Re: Compile-time memory safety using Liquid Haskell
#6Earlier quoted context omitted.
There's a perspective that unifies both the Liquid Haskell-style approach and dependent types, which is "behavioral type theory". Nuprl (the longest-lived implementation of dependent type theory, starting in the early 80s and still going strong today) is an example of a behavioral type theory, for instance; it's a trivial example, though, since the behavioral types refine a unityped structural framework, but you can…
NuPRL hasn't been actively developed in 30 years and was only ever of interest to small group of people working on proof assistants and pure type theory, not industrial users. LiquidHaskell is actively developed and can be used in production today for real life industrial use cases.
I am not at all telling people, "Switch from Liquid Haskell to Nuprl!". I'm providing perspective on the design space.
Re: Compile-time memory safety using Liquid Haskell
#7Earlier quoted context omitted.
There's a perspective that unifies both the Liquid Haskell-style approach and dependent types, which is "behavioral type theory". Nuprl (the longest-lived implementation of dependent type theory, starting in the early 80s and still going strong today) is an example of a behavioral type theory, for instance; it's a trivial example, though, since the behavioral types refine a unityped structural framework, but you can…
This is something I've been wanting for a long time. Liquid Haskell and these solver-based systems should just be a special tactic library with some syntactic sugar on top of a standard dependently typed language.
Re: Compile-time memory safety using Liquid Haskell
#8The liquid Haskell constraint approach is very interesting. I have not tried it yet, but it looks like it might be quite usable. Of course, the other popular approach is to use dependent types. I've recently run up against the limits of Haskell's type system in a number of projects, so I've been playing around with Idris. It's very cool to be able to promote arbitrary functions to the type level (and higher). The pot…
There's a perspective that unifies both the Liquid Haskell-style approach and dependent types, which is "behavioral type theory". Nuprl (the longest-lived implementation of dependent type theory, starting in the early 80s and still going strong today) is an example of a behavioral type theory, for instance; it's a trivial example, though, since the behavioral types refine a unityped structural framework, but you can…
Re: Compile-time memory safety using Liquid Haskell
#9Earlier quoted context omitted.
There's a perspective that unifies both the Liquid Haskell-style approach and dependent types, which is "behavioral type theory". Nuprl (the longest-lived implementation of dependent type theory, starting in the early 80s and still going strong today) is an example of a behavioral type theory, for instance; it's a trivial example, though, since the behavioral types refine a unityped structural framework, but you can…
Is there any reason to single out Nuprl for this though? We could slap SMT onto a wide range of elaborators (as it has been a stated goal for the Lean prover, and there has been attempts in Isabelle, Coq and Agda too if I recall correctly). Practical elaboration already involves a large amount of machinery that isn't reflected in kernel type theory, so I don't see why Nuprl would be better in this regard.
Lean, Coq and Agda all implement structural type theory.