Packages
Pure Elixir SMT-LIB2 formal verification engine for FrameNet Semantic IR with persistent Z3 session pools.
Current section
Files
Jump to
Current section
Files
semantic_verifier
README.md
README.md
# SemanticVerifier
[](https://github.com/collective-mind/semantic_verifier/actions/workflows/ci.yml)
[](https://hex.pm/packages/semantic_verifier)
[](https://hexdocs.pm/semantic_verifier)
[](https://github.com/collective-mind/semantic_verifier/blob/main/LICENSE)
**SemanticVerifier** is a formal verification engine for FrameNet Semantic IR in Elixir, leveraging the **Z3 SMT Theorem Prover** to eliminate dead branches and enforce safety invariants before AST compilation.
---
## Key Features
* **Two-Phase Verification:** Structural checking with `NimbleOptions`, followed by first-order logic proving via `Z3`.
* **Zero-Disk Session Pool:** In-memory interactive Port pool (`z3 -in -smt2`) eliminating temporary file I/O.
* **Dead Code Detection:** Identifies unreachable branches and shadowed conditions.
* **Counter-Example Extraction:** Parses SMT `(get-model)` outputs into structured Elixir maps.
* **Self-Healing AST Engine:** Automatically prunes dead code and synthesizes missing preconditions.
---
## Requirements
Requires the **Z3 SMT Solver** CLI:
* **macOS:** `brew install z3`
* **Ubuntu/Debian:** `sudo apt-get install -y z3`
---
## Installation
Add `semantic_verifier` to `mix.exs`:
```elixir
def deps do
[
{:semantic_verifier, "~> 0.1.0"}
]
end
```