Experimental semantic language

Semantic state and reasoning from one small grammar

I built Pangine to test whether experience, retained state, and questions can all use the same small grammar.

I originally came up with Pangine by writing down pieces of information in a semantic shape, asking questions about them, and reasoning backward from what the grammar should imply. The current prototype has canonical Concept graphs, counted exact Percept roots, working questions, and an experiment that can retain candidates reached through wider represented context. Those details are useful current behavior, not a finished language specification.

live workbenchRun a command and see its output as structure
loading engine
next idea

A named Concept is an opaque identity. Pangine does not assume what cat means.

[]the null Concept

Use the same syntax as pangine-console. Up and down recall earlier commands.

output
  []

This workbench is an experiment with making that recursive structure visible. Every command is executed by the current Rust engine compiled into the page. The session lives only in this browser tab. Like the console, the canvas shows only the latest command's output; experience stored under Percepts remains available to later commands without accumulating earlier outputs on screen. Starting over or refreshing drops the session; nothing is sent to a server or stored as learned knowledge.

Pangine does not assign a built-in ontology to names such as [cat] or [eats]. Applications decide what names mean. The engine preserves complete experience roots, derives their recursive structure when a question is asked, and matches fixed Concepts exactly while binding explicit Percepts as wildcard positions.

What the current prototype does

x is the signed coefficient of an unordered member, so x2[A] is the compact form of[A][A]. Experience currently retains exact roots and their occurrence counts. Question outputx values temporarily expose totals from those roots so the placeholder decision can run. That reuse ofx is not a definition of relevance.

Context can add an indirect candidate, and experience occurrences can affect the current choice. The prototype does not yet carry directness, route shape, or wider surroundings into that choice. Whether and how those should matter is one of the central open questions.

Start with literally nothing

The walkthrough begins at the null Concept, [], then adds one piece of grammar at a time. Every block is an actual log of Pangine input and the exact console output. The examples are written directly in Pangine.

command> []
  []
command> [cat]
  [cat]
command> [cat][cat][dog]
  x2 [cat]
  [dog]
command> [cat]->[purrs]
  {[cat]->[purrs]}
command> ['Alice'] ~= {[cat]->[purrs]}
  {[cat]->[purrs]}

From there it builds through grouping, unordered normalization, inversion, explicit multiplicity, ordered composition, mutable Percepts, exact-root experience, direct and contextual questions, current answer totals, single-source and multi-source selection, shared output identity, decision, scripts, and inspection. It finishes with a build-policy scenario that keeps two disagreeing sources separate without pretending Pangine knows which one is authoritative.

Learn Pangine from null

What remains open

I now have enough machinery to retain exact experience roots, find direct and indirect candidates, and inspect a repeatable placeholder decision. I have not settled what information the decision should use or what “relevance” should mean. The current x storage is also temporary because its floating-point representation cannot preserve arbitrarily large integer totals exactly. Scalable retrieval, persistence, sampler integration, distributed execution, and general-purpose application bindings remain open. The browser binding above is deliberately narrow: it executes Pangine and exposes a disposable graph view for this workbench.

The current ^ rule is deterministic. The operator remains the natural place to investigate a future sampler, but its inputs and behavior are not settled yet.

Try it

git clone https://github.com/caustik/pangine.git
cd pangine
cargo test --all-targets --release
cargo run --bin pangine-console

Pangine is source-available under the PolyForm Noncommercial License 1.0.0. Noncommercial use, modification, and distribution are permitted under its terms. Commercial use requires separate permission from APU Software, LLC.