Automatic Annotations for Typed Clojure + clojure.spec

Write tests, get types!

This page summarises my work on automatic annotation generation.

Tutorial

This post describes how to generate your own specs and types!

Library annotations

Here I will list a bunch of libraries we have generated annotations for. They don't type check, but the idea is they're very close--- and with good alias names! Last updated: 3rd April 2017

startrek-clojure

Generated core.typed

Manually type checked diff

clojure.spec

math.combinatorics

Generated core.typed

Manually type checked diff

clojure.spec

fs

Generated core.typed

Manually type checked diff

clojure.spec

data.json

Generated core.typed

Manually type checked diff

clojure.spec

data.xml

Generated core.typed

Manually type checked diff

clojure.spec

mini.occ

Generated core.typed

Manually type checked diff

clojure.spec

clojurescript

Generated core.typed

Manually type checked diff

clojure.spec

cheshire

Generated core.typed

Manually type checked diff

clojure.spec

clj-time

Generated core.typed

Manually type checked diff

clojure.spec

slingshot

Generated core.typed

Manually type checked diff

clojure.spec

Blog posts

Introducing automatic annotations

Basics of automatic annotations

Inferring function types

Talks

Clojure Conj 2017 talk: Tool-assisted spec Development [Video, Abstract, PDF, Keynote]

PL Wonks September 22nd 2017 talk: Space-Efficient Runtime Tracking [Video, Abstract, PDF, Keynote]

Gradual Typing Across the Spectrum 2017 talk: Squash the work! Inferring Useful Types and Contracts via Dynamic Analysis [PDF, Keynote]

Gradual Typing Across the Spectrum 2016 talk: Inferring Structural Types from Tests [PDF, Keynote]