Repository navigation
jihoo 0.5.0
jihoo 0.5.0 adds dependent types in a native core: an opt-in part of the language in which
programs state contracts as types, and proofs are checked and then erased. A proved access has
no bounds check. Start with the guide.
The kernel is not verified. Its soundness rests on rejection suites, an independent evaluator
and independent reviews, which found and fixed real defects before this release. A mechanized
proof is planned after 0.5, in Lean 4. There is one known exception to the preservation of types,
which admits nothing; the specification
states it.
In a #![dependent_core] module
- Evidence about u64 indices, with their order and equality, and inductive propositions that
programs declare, proved by induction. - Refinements, data types parameterized by values, and structs whose fields name earlier fields.
- Owned buffers and heap data, each used exactly once, which the kernel checks, and freed where
their scope ends. - Borrows, whose results and proofs can be about what they read.
- Loops whose invariants are types.
inoutparameters,f(&x),x = vandold(x). A node rebuilt at its own size is reused in
place, and nothing is allocated to return a value with its container.dependent.vec, a growable vector whose contracts are types.
Limits
The core is a subset. It has no if, while, generics or comptime, elements are i64, marked and
ordinary modules cannot import each other, and a let of an owned value keeps only its type. The
guide lists the
rest.
Removed
The Horn and Agda path is gone, with jihoo emit-horn and the lib/proof library
(import proof.schematic). The existing verifier stays, and still proves unmarked programs and the
compiler's own source, but its checker is now tested rather than proved. jihoo core preserves is
new, for testing.