Lightweight, practical formal verification for AI-generated code — property-based testing driven by function signatures and natural-language intent.
Part of the SIN-Code agent-engineering stack.
Full theorem proving (TLA+, Lean) is too heavy for everyday agent loops. POC brings the spirit of formal methods to the practical layer: it infers properties (invariants) a function should satisfy, renders runnable Hypothesis tests, and verifies them at runtime — turning "looks right" into "checked against hundreds of inputs".
- Property generator — infers candidate invariants (idempotence, monotonicity, length-preservation, sorted output, reversibility, purity, …) from a function's signature and name.
- Runtime verifier — executes properties with Hypothesis and reports
PASS/FAIL/SKIPPEDper property (no unsafeeval). - Spec compiler — turns declarative pre/post-conditions, or a natural-language intent, into a property test.
- CLI (
poc) for suggesting, verifying, and compiling specs.
pip install -e .
poc suggest mymodule.py my_function # print suggested Hypothesis tests
poc verify mymodule.py my_function # run runtime verification
poc from-intent "returns a non-negative, sorted list" my_functionMIT — see LICENSE.