Skip to main content

Module infer

Module infer 

Source
Expand description

Contract inference engine.

Scans a crate’s public API, matches against existing contract equations, and suggests bindings + new contracts for unbound functions.

Three matching strategies:

  1. Name match: function name ≈ equation name (Levenshtein + stemming)
  2. Module match: module path maps to contract tier/domain
  3. Signature match: parameter types imply domain (f32 slices → kernel)

Structs§

ContractSuggestion
A suggestion to create a new contract for a function with no match.
InferResult
Result of running inference on a crate.
InferredBinding
A suggested binding for an unbound function.

Enums§

MatchStrategy
How a match was produced.

Functions§

format_binding_entry
Generate a binding.yaml entry for an inferred binding.
format_contract_stub
Generate a contract YAML stub for a new contract suggestion.
infer
Run inference: scan crate, match against contracts, suggest bindings.