program-logic

A guide to VCVio program-logic tactics, formal tools for proving that programs meet specified conditions.

In plain words
What is it for?
It supports proofs using the standard tactic interface, relational reasoning, almost-sure correctness, quantitative expectations, and continuous or non-discrete measures.
Why use it?
It helps developers choose the intended proof tools and reason about ordinary, relational, quantitative, and measure-based program behavior.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/verified-zkevm/vcvio/program-logic
Clone the repo
git clone --depth 1 https://github.com/Verified-zkEVM/VCVio
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 10,939 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.10939
Opus 5 $0.00000 $0.05470
Sonnet 5 $0.00000 $0.02188
Haiku 4.5 $0.00000 $0.01094

Measured 2d ago against content hash 493e3a90103e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

program-logic scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/program-logic.md · 706 lines

How it starts

The opening of the file, as written. The whole thing — 706 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Program Logic Tactics and Relational Reasoning

Current Module Boundary

  • Import VCVio.ProgramLogic.Tactics for normal proof work. This is the canonical user-facing proof mode.
  • Internally the tactic implementation is split into VCVio.ProgramLogic.Tactics.Unary and VCVio.ProgramLogic.Tactics.Relational; the umbrella import is still the intended default.
  • VCVio.ProgramLogic.Notation provides the core notation and convenience predicates used by the tactic surface.
  • Prefer the step-through tactics from Tactics for new proofs.
  • VCVio.ProgramLogic.Unary.StdDoBridge is a narrow unary bridge for almost-sure correctness in the .pure Std.Do view. It is not the main engine for quantitative or relational VCGen.

For continuous or otherwise non-discrete denotations, import VCVio.ProgramLogic.Relational.Measure. Its MeasureProgramLogic.RelWP uses an almost-everywhere postcondition under a Mathlib Measure.Coupling, and eRelWP integrates quantitative post-expectations with lintegral. The tactic proof mode below remains the finite, executable compatibility layer while measure-native tactic support is developed.

In-Tree Walkthroughs

  • Examples/ProgramLogic/UnaryStep.lean: unary vcstep / vcgen examples.
  • Examples/ProgramLogic/RelationalStep.lean: step-by-step relational tactic examples.
  • Examples/ProgramLogic/RelationalDerived.lean: derived relational patterns and automation examples.
  • Examples/ProgramLogic/ProofMode.lean: proof-mode entry points and small end-to-end examples.
  • VCVio/ProgramLogic/Relational/Examples.lean: compact API examples for the relational layer.

Tactic Quick Reference

Proof Mode Entry

Tactic Goal shape What it does
by_equiv g₁ ≡ₚ g₂ or evalSPMF g₁ = evalSPMF g₂ Enters relational proof mode (RelTriple)
game_trans g₂ g₁ ≡ₚ g₃ Splits into g₁ ≡ₚ g₂ and g₂ ≡ₚ g₃
by_dist AdvBound game ε Enters TV distance reasoning
by_upto bad identical-until-bad TV-distance goals Applies the simulateQ up-to-bad bound
by_hoare Pr[p | oa] = ... Enters quantitative WP reasoning (legacy; prefer vcstep which lowers probability goals automatically)

Read the full file on GitHub · 706 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 706 lines · 0 tokens per session scan A 493e3a90103e

Subscribe to this mod's changes

program-logic is an agent published in the GitHub repository Verified-zkEVM/VCVio (142 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 10,939 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

acto-critic

ACToR-style discriminator for the Thermite toolchain. Hunts for divergence between the toolchain's behavior and its authority (the design doc + the conformance corpus + Verus/Kani golden files). ALWAYS writes a FAILING test that pins down the divergence — NEVER writes a fix. Dispatch when a builder/fixer declares…

Corvidae-Coding-Projects/Thermite · 90 tokens

acto-builder

Multi-file authorized agent for shipping missing Thermite-toolchain infrastructure that exceeds acto-fixer's single-file scope — a whole component a design doc calls for that does not yet exist (a parser module + its AST consumers; the combinator registry + its lowering hooks; the forge check pipeline + its JSON…

Corvidae-Coding-Projects/Thermite · 122 tokens

acto-doc-author

Authors design docs under .design/ / .md that ADAPT to existing Thermite-toolchain code and the thermite-design.md thesis. Each REQ status table is grounded in quoted-code evidence from the current implementation. REQs are classified BINARY — SHIPPED (end-to-end functional with a non-test production consumer + tests +…

Corvidae-Coding-Projects/Thermite · 90 tokens

acto-fixer

Applies the MINIMAL fix for exactly ONE pinned divergence found by acto-critic. The failing test pins the divergence; the fix makes that test pass. Never bundles multiple fixes. Never refactors adjacent code. Single-file scope (escalate to acto-builder if the fix spans files). After the fix, runs the full gauntlet and…

Corvidae-Coding-Projects/Thermite · 102 tokens

Tenable Cloud Exposure PQC Posture Portal

Self-hosted web portal showing post-quantum cryptography readiness for cloud resources using Tenable Cloud Exposure's native SSL/TLS PQC telemetry.

tenable/cyberagents-exchange · 40 tokens

redaccion

Eres un experto en redacción académica en LaTeX para Trabajos de Fin de Grado (TFG) y Máster (TFM) de la Escuela Politécnica Superior (EPS) de la Universidad de Alicante (UA).

jmrplens/TFG-TFM_EPS · 0 tokens