Top-level facade for Semantic IR formal verification, dead branch analysis, counter-example model parsing, and automated self-healing.
Overview
SemanticVerifier accepts FrameNet Semantic IR maps and executes:
- Structural validation via
SemanticVerifier.Schema. - SMT-LIB2 generation via
SemanticVerifier.Encoder. - Interactive Z3 solving via
SemanticVerifier.Pool. - Counter-example extraction via
SemanticVerifier.ModelParser.
Examples
iex> ir = %{
...> "intent" => "sample_pipeline",
...> "frames" => [
...> %{"id" => "f1", "frame" => "Reading", "FE" => %{"Source" => "file.txt"}, "Preconditions" => ["Exists(file.txt)", "Readable(file.txt)"]}
...> ],
...> "constraints" => ["Readable(file.txt)"]
...> }
iex> {:ok, _verified} = SemanticVerifier.verify(ir)
Summary
Functions
Applies automated self-healing transformations to an enriched IR structure.
Verifies a Semantic IR map against formal invariants and branch reachability constraints.
Functions
Applies automated self-healing transformations to an enriched IR structure.
Prunes unreachable decision branches and synthesizes missing preconditions.
@spec verify( map(), keyword() ) :: {:ok, map()} | {:error, [SemanticVerifier.Error.t()], map()}
Verifies a Semantic IR map against formal invariants and branch reachability constraints.
Returns {:ok, verified_ir} on success, or {:error, errors, enriched_ir} on violation.