Skip to content

Riku-Tono/dunglang_federation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

41 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DungLang Federation 4.0

prototype / demo / showcase β€” not a complete compiler or formal proof.

DungLang Federation 4.0 is a unified showcase version of the DungLang Federation prototype line. It combines the core Federation 1.0 bridge idea with the Civilization v2/v2.1/v3.0 simulation layers: event history, history rewriting, constitution, elections, civilization metrics, and myth generation.

Older versions are kept in /versions as development history.


Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Frontends                                              β”‚
β”‚  DungLang 🦍  /  ScatLang πŸ’©  /  SeaIR 🌊  /  YakiimoIR 🍠 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Odor IR  (shared intermediate representation)          β”‚
β”‚  OdorZeroExpr / OdorSuccExpr / Var / OdorAdd / …        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  CEK Cave Machine                                       β”‚
β”‚  State(Control, Env, Kont) β†’ OdorSink                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Civilization Stack                                     β”‚
β”‚  CivilizationStore β†’ ConstitutionFederation             β”‚
β”‚  ElectionSystem β†’ MythGenerator β†’ CivilizationMetrics   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β–Ό
              outputs/dunglang_federation_4_0_report.json

Modules

Module From Description
Odor IR + CEK Cave Machine Federation 1.0 Multiple frontends compile to a shared IR, executed by a CEK-style machine
OdorSink / DiplomaticEvent Federation 1.0 Odor observation, cross-tribe diplomatic events, banana GC
Error Federation Federation 1.0 Representative-case check: same IR β†’ same error shape across frontends
OdorOptimizer Civilization v2.0 Constant-folding pass on odor levels (zero_elim / local_only / diplomatic_violation_const)
Ghost Odor / BananaRewrite Civilization v2.1 2PC ghost odor events; temporal history rewriting with banana tokens
OdorTypeInference / WitnessCouncil Civilization v2.2 Static odor type inference demo; artifact witness council with philosopher-gorilla exclusion
Constitution Federation Civilization v3.0 Four constitutional articles; violation events emitted on breach
Election System Civilization v3.0 Council elections with policy factions; verdict for Ghost Odor changes by ruling coalition
CivilizationMetrics Civilization v3.0 Stability / diplomatic tension / philosophy pollution / myth pressure dashboard
MythGenerator Civilization v3.0 Erased official history β†’ legend β†’ myth β†’ religion pipeline

Version History

Version Highlight
Federation 1.0 Odor IR bridge Β· CEK Cave Machine Β· Error Federation representative cases
Civilization v2.0 OdorOptimizer Β· Kont Federation Β· History Federation
Civilization v2.1 Temporal Banana Rewrite Β· Ghost Odor Archaeology Β· Causality Leak Detector
Civilization v2.2 OdorTypeInference Β· TwoPhaseCommit Β· WitnessCouncil
Civilization v3.0 Constitution Federation Β· Election System Β· CivMetrics Β· MythGenerator
Federation 4.0 Unified public showcase of all layers

Older versions are preserved in /versions.


Running

python dunglang_federation_4_0.py

Output: outputs/dunglang_federation_4_0_report.json

The report contains five top-level sections:

meta              version info, disclaimer, history
cek_demos         CEK machine runs across all four frontends
odor_optimizer    constant-fold results for representative odor levels
error_federation  paired error-shape checks (trace_equal / error_equal / surface_diff)
civilization      full civilization run: constitution, election, rewrites, metrics, myths, replay

Replay Viewer

dunglang_civilization_replay_viewer.html is a browser-based dual-pane timeline viewer for civilization events (built for v2.1, compatible with Federation 4.0 event shapes).

It shows official history and secret log side by side, with filter buttons per event kind (odor πŸ’¨, diplomatic 🌍, ghost πŸ‘», rewrite πŸ“œπŸ”₯, gc 🍌) and a configurable replay speed.

Open the file directly in a browser β€” no server needed.


Scope and Limitations

This project is a prototype / demo / showcase.

  • The DungLang frontend is a mapping from v0.7 event structures to Odor IR β€” not a full DungLang parser.
  • Error Federation checks representative cases only. It is not a full formal equivalence proof across distinct syntax parsers.
  • BananaGC runs as a post-execution Sink operation in this demo, not as a native CEK instruction.
  • The philosopher-gorilla exception comparison runs the same IR under two frontend names β€” a minimal surface-diff check, not a cross-parser proof.

Mottos

Different notation on the surface. Same plumbing underground. β€” ウホ πŸͺ¨

Success is the same. Failure is the same. History disappears. Myth remains. β€” ウホ πŸ“œπŸ”₯

About

Different notation on the surface. Same plumbing underground. β€” ウホ πŸͺ¨ Success is the same. Failure is the same. History disappears. Myth remains. β€” ウホ πŸ“œ

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors