Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Judgment prove_wf at crates/formality-rust/src/prove/prove/prove/prove_wf.rs:14

Signature:

prove_wf(_decls: Program, env: Env, assumptions: Wcs, goal: Parameter,) => Constraints

The number on each rule’s conclusion is positive coverage; the number on each premise is negative coverage. Click a number to browse the tests.

universal variables
LineCoverageSource
──────── ("universal variables")
31107(prove_wf(_decls, env, _assumptions, UniversalVar { .. }) => Constraints::none(env))
references
LineCoverageSource
36(let (lt, ty) = parameters.downcast_err::<(Lt, Ty)>()?)
371(prove_wf_recursive(decls, env, assumptions, ty) => c)
38(prove_after(decls, c, assumptions, Relation::outlives(ty, lt)) => c)
──────── ("references")
4027(prove_wf(decls, env, assumptions, RigidTy { name: RigidName::Ref(_), parameters }) => c)
raw-pointers
LineCoverageSource
45(let (ty,) = parameters.downcast_err::<(Ty,)>()?)
46(prove_wf_recursive(decls, env, assumptions, ty) => c)
──────── ("raw-pointers")
48(prove_wf(decls, env, assumptions, RigidTy { name: RigidName::Raw(_), parameters }) => c)
tuples
LineCoverageSource
52(for_all(decls, env, assumptions, parameters, &prove_wf_recursive) => c)
──────── ("tuples")
5436(prove_wf(decls, env, assumptions, RigidTy { name: RigidName::Tuple(_), parameters }) => c)
integers and booleans
LineCoverageSource
58(for_all(decls, env, assumptions, parameters, &prove_wf_recursive) => c)
──────── ("integers and booleans")
6081(prove_wf(decls, env, assumptions, RigidTy { name: RigidName::ScalarId(_), parameters }) => c)
ADT
LineCoverageSource
64(for_all(decls, env, assumptions, parameters, &prove_wf_recursive) => c)
65(let t = decls.program().adt_item_named(adt_id)?.to_adt())
66N/A(let t = t.binder.instantiate_with(parameters).unwrap())
674(prove_after(decls, c, assumptions, &t.where_clauses) => c)
──────── ("ADT")
6920(prove_wf(decls, env, assumptions, RigidTy { name: RigidName::AdtId(adt_id), parameters }) => c)
static lifetime
LineCoverageSource
──────── ("static lifetime")
741(prove_wf(_decls, env, _assumptions, LtData::Static) => Constraints::none(env))
scalar constants are always wf
LineCoverageSource
──────── ("scalar constants are always wf")
793(prove_wf(_decls, env, _assumptions, ConstData::Scalar(_)) => Constraints::none(env))
aliases
LineCoverageSource
83(prove_alias_wf(decls, env, assumptions, name, parameters) => c)
──────── ("aliases")
851(prove_wf(decls, env, assumptions, AliasTy { name, parameters }) => c)