|
Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
|
The canonical exact text encoding of expression trees (ADR-0042). More...
#include <map>#include <memory>#include <ostream>#include <string>#include "bertini2/function_tree/node.hpp"Go to the source code of this file.
Classes | |
| struct | bertini::node::EncodingContext |
| Traversal state for one canonical-encoding pass: the back-reference table. More... | |
Namespaces | |
| namespace | bertini |
| namespace | bertini::node |
Functions | |
| void | bertini::node::EncodeCanonical (std::shared_ptr< Node > const &root, std::ostream &out, EncodingContext &ctx) |
| Append the canonical encoding of the DAG rooted at root to out. | |
| std::string | bertini::node::CanonicalEncoding (std::shared_ptr< Node > const &root) |
| The canonical encoding of a single tree as a string (fresh context). | |
The canonical exact text encoding of expression trees (ADR-0042).
This is the identity substrate for persistent content digests: a deterministic, bit-exact, S-expression-like encoding of a node DAG, stable across runs, compilers, and library versions. It deliberately does NOT reuse:
Format sketch (kind tags are fixed strings, never typeid):
Any change to this format is a digest-breaking change: bump the system-encoding version header (b2sysenc/<n>, see system content identity) and the golden-digest fixture in the same commit.