Skip to content

v0.2.0-alpha.1 — Phase 2: Agent IR Foundation

Pre-release
Pre-release

Choose a tag to compare

@krakenhavoc krakenhavoc released this 07 Mar 18:44
· 97 commits to main since this release
981762f

Phase 2: Agent IR Foundation

IntentLang now compiles .intent specs to a typed intermediate representation and verifies structural + logical correctness.

New: intent compile

Lowers intent specs to Agent IR and outputs JSON:

intent compile examples/transfer.intent

New: intent verify

Runs semantic checks, structural verification, and coherence analysis:

$ intent verify examples/transfer.intent
VERIFIED: TransferFunds — 2 function(s), 2 invariant(s), 2 struct(s)

Verification obligations:
  - Transfer modifies Account.{balance} (constrained by NoNegativeBalances)
  - Transfer must satisfy temporal property TransferConservation

What's in the IR

  • Entities → Structs with typed fields
  • Actions → Functions with params, pre/postconditions, properties
  • Invariants with quantifier expressions
  • Edge cases → Guards with conditions and actions
  • Every node carries SourceTrace for future audit bridge

Verification checks

  • Bound variable analysis (with union variant and domain function awareness)
  • old() placement (postconditions and temporal invariants only)
  • Quantifier type resolution (entities and actions)
  • Postcondition connectivity (must reference parameters)
  • Coherence analysis: invariant-action field coverage and temporal property obligations

Stats

  • 68 tests (26 checker + 14 parser + 28 IR)
  • 5 crates: intent-parser, intent-check, intent-render, intent-ir, intent-cli
  • 6 CLI commands: check, render, render-html, compile, verify

Install

cargo install --git https://github.com/krakenhavoc/IntentLang intent-cli