sealmap-model
A language-neutral, deterministic model of a codebase: source files, the
symbols they define, the typed relations between them, and the ordered call
flow of every function. It is the shared vocabulary of
sealmap: language adapters produce a
Codebase, projections consume one, and neither side depends on the other.
sym:symbol ids: kind-explicit, SCIP-style, no file path (sym:cargo shop . db/Db#[Store]put().). Printing is injective and parsing is its exact inverse.- Fingerprints (
Fingerprint): every symbol carries asig_hash(its contract) and abody_hash(its implementation), so a tool can tell "unchanged", "behaviour changed" and "contract changed" apart. - Ordered collections only, so iteration order is a function of the data.
- Normalised paths (
SourcePath): relative,/-separated, no./... - Stable hashing (
ContentHash): BLAKE3 over newline-normalised text. - In-memory sources (
SourceSet), loaded from disk honouring.gitignore, so tests and embedders never need the file system.
use *;
let root = package_root;
let id = ;
let mut cb = new;
let file = new.unwrap;
cb.add_file;
cb.add_symbol;
cb.add_symbol;
cb.add_relation;
assert_eq!;
assert_eq!;
assert_eq!;
Licence
Licensed under either of Apache License, Version 2.0 or MIT licence, at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 licence, shall be dual licensed as above, without any additional terms or conditions.