Oct 13, 2026 · @Maxim
The paper "First-Class Refinement Types for Scala" and the contract verifier being built for Mojo solve overlapping problems from opposite ends. The paper puts facts on types and keeps the solver small; the Mojo work puts facts on functions and uses an SMT solver. They are complementary: the paper's approach suits facts about one value, ours suits relations across a call and code that mutates memory.
The paper (Bovel, Kunčak and Odersky, EPFL) adds refinement types to Scala 3. A refinement type is a type with a predicate, so the fact travels with the value: