Skip to main content

HoneyC

A compiler and CLI for Dense Rune-Chain Notation — a compact symbolic notation for entities, relations, types, scopes, transforms, bounded mediator objects, placeholders, and agent-executable chains.

HoneyC turns dense rune text into an AST, normalized semantic triples, Prolog facts, Neo4j Cypher, and human-readable lenses, and it validates chains with rewrite suggestions.

RuneText → AST → Semantic Triples → Prolog → Cypher → Rendered Lenses

This is the back-end compiler in a larger system: a rule-catcher learns an emergent notation's grammar from examples; HoneyC compiles a ratified grammar into IR + lenses; domain compilers (e.g. DietC, or cognition-chain compilers for attention-chains / CoRs / skillchains) sit on top.

Install

pip install honeyc

It installs the honeyc and dietc commands. It is one of the fifteen packages of ChainCompiler; to work on it, clone the repository and run ./install.sh, which installs all fifteen editable (python3 -m pip install --no-build-isolation -e . in this folder installs it alone). The CLI's examples below (examples/) are in a clone.

CLI

honeyc parse   examples/mbr.rune
honeyc norm    examples/mbr.rune
honeyc prolog  examples/mbr.rune
honeyc cypher  examples/mbr.rune
honeyc render  examples/mbr.rune --as readable    # also: --as triples | --as prose
honeyc check   examples/mbr.rune

Core notation

One reading of every marker the grammar (src/honeyc/grammar.lark) defines. Triples are the statements honeyc norm prints for the Example, leaving out each term's own marker statement (A entity true, A symbol true, 🍯 glyph true) save in the three rows that define them. tests/test_readme_notation.py parses every example in this table and checks that it gives exactly these triples.

Marker Reads as Example Triples
[X] a named entity [A] A entity true
X a bare name: a symbol A A symbol true
a glyph a glyph — a run of characters that are neither structure nor an ASCII name (symbols.py names the known ones) 🍯 🍯 glyph true
X: T X has type T [A]: T A has_type T
|X| X is bounded — stabilized, a handleable object |[A]| A bounded true
A ⇔ B operational equivalence, both ways [A] ⇔ [B] A equiv B · B equiv A
A ⇒ B A produces B [A] ⇒ [B] A produces B
A ⇢ B A compiles to B [A] ⇢ [B] A compiles_to B
A ↦ B A maps to B [A] ↦ [B] A maps_to B
A → B A points to B [A] → [B] A points_to B
A ⟶ B A transitions to B [A] ⟶ [B] A transitions_to B
A ⟼ B A transforms into B at run time [A] ⟼ [B] A runtime_transform B
A -rel-> B the relation rel(A, B) [A] -owns-> [B] A owns B
A <rel- B the same relation rel(A, B), written the other way [A] <owns- [B] A owns B
A <rel> B the relation both ways: rel(A, B) and rel(B, A) [A] <owns> [B] A owns B · B owns A
A:{ B, C } a scope: A contains B and C (a , separates its members) [A]:{ [B], [C] } A contains B · A contains C
{ B, C } a scope with no name: its owner is _group { [B], [C] } _group contains B · _group contains C
📃 a drilldown placeholder: expand this one level deeper [A]:{ 📃 } A placeholder drilldown
${A ⇒ B} the transform from A to B as a first-class object, named xf_ and eight hex digits of a hash of its chain ${[A] ⇒ [B]} xf_… transform true · A produces B · xf_… source A · xf_… target B · xf_… operator produces
A := B A is assigned B [A] := [B] A assign B

-rel-> and <rel- are two spellings of one relation. [A] -owns-> [B] and [A] <owns- [B] both read owns(A, B); <owns> reads it both ways. A lens that writes the chain back writes each relation the way it was read.

Backbone rule: every connector but a relation advances the chain's backbone; a relation hangs its operand as a leaf off the current backbone node. So [A] -owns-> [B] ⇔ [C] reads owns(A, B) and equiv(A, C) — B does not become the left operand of the ⇔.

A bounded term sitting between two backbone links is inferred as a mediator: [A] ⇔ |🍯| ⇔ [B] reads mediates(🍯, A, B) — honeyc norm prints 🍯 mediates A target=B. A relation an author names mediates ([A] -mediates-> [B]) is an ordinary relation, A mediates B. honeyc check warns of an unbounded term in a mediator's place and suggests the whole chain as it was written with that term bounded: [A] ⇔ 🍯 ⇔ [B] → [A] ⇔ |🍯| ⇔ [B], which parses back to the chain's statements plus 🍯 bounded true and the mediation.

Core example

[Mbr]: M*Boundary <is_a-🌸‍💧 ⇔ |🍯| ⇔ [Mbl]: M*Blanket <is_a-🍹

honeyc render --as triples (the statements, each term's own marker left out) →

Mbr has_type M*Boundary
🍯 bounded true
Mbl has_type M*Blanket
Mbr is_a 🌸‍💧
Mbr equiv 🍯
🍯 equiv Mbr
🍯 equiv Mbl
Mbl equiv 🍯
Mbl is_a 🍹
🍯 mediates Mbr target=Mbl

The lenses

readable writes the chain back — each relation in the spelling it was read, each known glyph with its name beside it ([🌸‍💧: Nectar]), so it is for reading; triples, prose, Prolog (honeyc prolog) and Cypher (honeyc cypher) are read from the statements.

Pipeline

parser.py     RuneText ⇢ Lark tree ⇢ AST dataclasses (ast_nodes.py)
normalize.py  AST ⇢ flat Statement triples
emit_prolog.py / emit_cypher.py   triples ⇢ facts / graph
render.py     AST/triples ⇢ readable | triples | prose
check.py      AST ⇢ warnings + suggested rewrites

Extending

  • New connector/glyph: add a terminal to grammar.lark, a handler in parser.py, a predicate in normalize._CONNECTOR_PREDICATE, and a label in the emitters / symbols.py.
  • New renderer lens: add a mode to render.render.
  • New domain compiler: consume honeyc.normalize output and add your own ontology/engine on top (this is how DietC is built).

MVP limitations

  • Cypher is emitted as text (no live Neo4j driver); Prolog is emitted as text (no embedded SWI-Prolog).
  • The third bundled example (transform_chain.rune) parses but exercises only partial transform-object semantics.
  • Unicode tokenization is permissive by design — validation happens in check.

Tests

pytest        # the parser, normalize, the emitters, the lenses, check, this README's notation table, and dietc

Metadata

Release files for honeyc 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for honeyc 0.3.1
File Size Uploaded Provenance Actions
honeyc-0.3.1.tar.gz 31.0 kB Without provenance Details for honeyc-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for honeyc 0.3.1
File Interpreter ABI Platform Actions
honeyc-0.3.1-py3-none-any.whl Python 3 none any Details for honeyc-0.3.1-py3-none-any.whl

Total release size: 60.6 kB

Release files / honeyc-0.3.1.tar.gz

Download URL honeyc-0.3.1.tar.gz
Size 31.0 kB
Tags Source
SHA-256 checksum
How to use checksums
185e2561833825c59a2d60f169d09df6584d9db772ed1072e8dea3e056fe2c37
BLAKE2b-256 checksum
How to use checksums
43c3d0b1334560c622b08bc0ffaa655727b6abbcc65f0bac852092c44b527e15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.13

Release files / honeyc-0.3.1-py3-none-any.whl

Download URL honeyc-0.3.1-py3-none-any.whl
Size 29.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b32fe41cb14fb0b9d7bf8d6b6e24eea6775efd2e674a4b89a2223b80acfb47b2
BLAKE2b-256 checksum
How to use checksums
543e5a739e9ec95b8bb0bd47bf7aed9a49c0d4726115e432b4325020dbc3ce94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.13

Security for honeyc 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page