Gradualizer - an experimental static type checker for Erlang (0.3.0 just out!)

Christmas came early! :christmas_tree: There has been no release since Feb 2021, that’s almost 22 months - time to fix it, so…

Gradualizer 0.2.0 is out!

Gradualizer is an experimental static type checker for Erlang with some support for gradual typing. A static type checker catches bugs in our source code thanks to type analysis.
This release comes with a number of highlights:

The full changelog is available at https://github.com/josefs/Gradualizer/blob/master/CHANGELOG.md.

It’s written in Erlang, so contributions from the community are both possible and welcome.
It doesn’t use a PLT like Dialyzer, so there’s no need to (re)generate it or cache it in CI.
It’s still experimental and the Next Big Thing on the roadmap is polymorphism support.

Gradualizer supports Erlang. Check out Gradient if you’re interested, but prefer Elixir.

P.S. If this is not the right part of the forum, please move this thread accordingly. I couldn’t find a more suitable place, since all announcement categories seem to revolve around a particular project/topic.

17 Likes

Congratulations. I’ve used Gradient to play with Gradualizer and while it wasn’t quite ready for my use, it was really interesting. Looking forward to playing with it again, when I have time.

4 Likes

This is extremely awesome, and it appears that this also has symbiosis with Dialyzer. Fixing some issues that Gradualizer pointed out ‘woke up’ Dialyzer to other issues in those type specs. Very useful!

4 Likes

Graudalizer 0.3 is out!

Gradualizer is a static/gradual typechecker for Erlang and thanks to Gradient, also for Elixir.

Just 6 months since the previous version! Isn’t it great in comparison with the 18 month gap the previous time? :wink:

The highlights of the release are:

  • Improve map exhaustiveness checking #524 by @xxdavid
  • Fix all remaining self-check errors #521 by @erszcz
  • Fix intersection-typed function calls with union-typed arguments #514 by @erszcz
  • Experimental constraint solver #450 by @erszcz

Which means that Gradualizer can now experimentally handle polymorphic code (if the --solve_constraints CLI flag or the -gradualizer([solve_contraints]) attribute is used.

Dogfooding Gradualizer, i.e. running it on itself, has also finally led to typechecking itself cleanly. This is a significant milestone, as it proves a non-trivial codebase can run without triggering any false positives. A little bit of code golf was necessary, since the typechecker still doesn’t cover 100% of the vanilla Erlang constructs, but the inconveniences are relatively small.

Thank you to all the contributors, testers, bug reporters, and users willing to try it out!

9 Likes

BTW, could we have the post title edited? Currently it says 0.2.0, which is not accurate anymore - the newest version is 0.3.0. It seems I can’t do it myself :sob:

1 Like