Use cases

Complete, runnable examples: a grammar, the guide that walks you through compiling it on b3u.dev, and real code that consumes what comes back.

b3ubot — the steps that wrote a program

This use case publishes no code. It publishes the 29 step specifications and 29 retrospectives that produced a working ~39,000-line application, so you can read the input and judge the method for yourself. New here? Read Adaptive Programming — a user's guide in the documentation section first: it explains what a step file is and where its content comes from, using this use case's own step.1.txt as the worked example.

Read more · Download b3ubot-steps.zip

ccs_json — a JSON compiler from a 26-line grammar

A complete, minimal CCS use case: json.sgr describes JSON in SGDL (Source Grammar Definition Language); compiling it on b3u.dev yields ccsjson, a native JSON compiler frontend that turns JSON files into CCS SCB instances your own code can load and walk.

Read more · Download ccs_json.zip

ccs_json_bench — real SCB C++ code, measured

The companion to the ccs_json use case. That Z ends where your frontend writes .bfgr SCB instances; this one shows what consuming them from C++ looks like in practice — with real, runnable code and honest numbers against nlohmann/json and simdjson.

Read more · Download ccs_json_bench-code.zip

metta — a MeTTa frontend from a 49-line grammar

MeTTa is not an ALGOL-family language. It is s-expression based, its symbols contain characters an identifier may not, and it carries two sigil-prefixed namespaces — $variables and &space-refs — that have no counterpart in SGDL's predefined token classes. It is, in other words, exactly the kind of language a compiler-compiler built for C-like syntax should struggle with.

Read more · Download metta.zip

metta_bench — reading MeTTa SCB instances, and what it costs

The companion to the metta use case. That one ends where your frontend writes SCB binaries; this one picks up there — what it costs to produce those binaries once and read them many times, with runnable C++ that does the reading.

Read more · Download metta_bench-code.zip

metta_bench_rust — the Rust consumer, which you already have

The published MeTTa benchmark reports its headline numbers from a Rust consumer, and says plainly that the consumer language is the dominant variable. The metta_bench use case teaches the C++ one. This use case closes that gap.

Read more · Download metta_bench_rust.zip

obfuscator — a platform for protecting grammar binaries

A working transformation tool for CCS grammar binaries, shipped as an open platform: the point is not the algorithm we wrote, it is that you write your own. Around 350 lines of C++ give you a loaded runtime, a place to transform it, and a re-serializer — plus the two oracles that tell you whether your transformation was honest.

Read more · Download ccs_obfuscator-platform.zip

p2t — a Python service translated to TypeScript, and a way to check it

A working Python web service was translated into a working TypeScript one by a pipeline, not by hand. You can run the translation yourself and then run a test suite nobody here wrote against the result. One command does both. New here? The companion paper Cross-Language Translation in the documentation section is the whole story; this use case is the executable half of it.

Read more · Download p2t-pipeline.zip