Skip to content

Autological Artifacts

Files that describe, contain, and interrogate themselves.

A source-grounded survey of what happens when the boundaries between program, container, index, dependency graph, and state collapse into one byte stream. The two seeds are redbean/APE — a file whose own bytes are its archive — and SELF — a file whose own bytes are its schema. The catalog exists because those two artifacts are usually described as the same idea, and the evidence says they are opposite corners of the same space.

Last reviewed: August 26, 2026

This survey answers ten questions:

  1. What does autological mean here, what are the four axes every artifact is scored on, and what do prefix-tolerant, footer-anchored, and dispatch owner mean? → Concepts
  2. How far can format superposition actually be pushed, and what does it cost? → Cosmopolitan/APE/redbean, polyglot craft, boot hybrids
  3. Which formats compose, and can that be predicted rather than catalogued?ZIP parasitism develops the tolerance partial order; boot hybrids supplies the amendment
  4. What goes wrong when two dispatchers disagree about one byte stream? → Parser differentials and LangSec
  5. What does it mean for an executable to be a database, and what does it break? → SELF/selfdb/self-httpd, with sqlelf as the precursor that changed no format at all
  6. Where does an index live, why, and what does that cost over a network? → Footer-indexed formats, range-request consumption, debug info and out-of-band indexes
  7. Who decides what a file is? → binfmt_misc, the dynamic loader, the Wasm component model
  8. How do you carry your dependencies without carrying them twice? → The Nix store, content-addressed chunking
  9. What is already known about programs that mutate themselves, and about trusting them? → Image-based systems, SQLite as an application file format, the VFS seam, embedded provenance, the threat model
  10. Why did the systems that already shipped this idea lose? → Single-level store, Plan 9 and 9P

The synthesis is in comparison.md — including a section of corrections to the premises this survey started from, five of which did not survive contact with the sources. The research agenda that remains is in open-questions.md. Methodology, and an explicit line between measured, derived, and claimed by a source, is in measurement.md.

NOTE

Scope. This tree is about the artifact's internal structure. How an artifact reaches a machine — installers, stores, notarization, update channels — is docs/research/application-packaging/'s subject, and is cross-linked rather than re-surveyed. General single-binary packaging is out of scope unless the artifact is queryable or polyglot; see what is out of scope.


Master catalog

One row per surveyed subject. M/R/C/Mu are the four axis scores — Multiplicity, Reflexivity, Closure, Mutability — each 0–3, defined in concepts and argued in each deep-dive's spine. They are ordinal judgements assigned by this survey, not measurements.

SubjectClusterM/R/C/MuIndex anchoringDispatch ownerWhat it isLink
Cosmopolitan / APE / redbeanSuperposition3/2/3/2footer (ZIP EOCD)shell → kernelThe maximal polyglot: PE + ELF + Mach-O + shell script + MBR + ZIP, collapsing on first rundeep-dive
ZIP suffix parasitismSuperposition3/1/2/1footerconsumerThe footer index that makes every ZIP-suffixed format from JAR to APK to redbean possibledeep-dive
Polyglot craftSuperposition3/1/1/0mixed by constructionconsumerCorkami, mitra, and 23 PoC‖GTFO issues — multiplicity maximal, reflexivity zerodeep-dive
Boot-adjacent hybridsSuperposition3/1/2/0header + reserved holefirmwareAn ISO that is also an MBR disk; a PE that is also kernel + initrd + cmdline, signed as onedeep-dive
Parser differentials / LangSecSuperposition3/0/0/1footer + stream-scannedconsumerGIFAR, Master Key, Janus, MalDoc-in-PDF — the adversarial dual of every entry abovedeep-dive
SELF / selfdb / self-httpdBinary-as-database1/3/2/3header (b-tree)kernelThe executable is a SQLite database; strip/ldd/patchelf/LD_PRELOAD become SQLdeep-dive
sqlelfBinary-as-database0/2/1/0out-of-bandkernelSQL over unmodified ELF — the same reflexivity, achieved by changing no format at alldeep-dive
Format→query layersBinary-as-database1/3/0/2out-of-bandconsumerLIEF, goblin, pyelftools against the declarative grammars Kaitai and DFDLdeep-dive
Relational system surfacesBinary-as-database1/3/1/1out-of-bandconsumerosquery, Steampipe, Datasette, dsq — Datasette is self-httpd run backwardsdeep-dive
Code as a databaseBinary-as-database1/3/2/1out-of-bandconsumerCodeQL, Glean, Kythe, SCIP/LSIF, ddisasm — and why they all chose Datalogdeep-dive
binfmt_miscDispatch1/2/1/0header (256-byte window)kernelThe kernel turning a masked byte pattern into a choice of interpreterdeep-dive
The dynamic loaderDispatch1/2/1/1header + ld.so.cacheloaderld.so re-running the same symbol-resolution query at every process startdeep-dive
Wasm component model / WITDispatch1/3/2/0stream-scannedloaderImports and exports as a typed graph the binary carries — at the price of no indexdeep-dive
Footer-indexed formatsIndex anchoring2/2/0/1footerconsumerParquet, ORC, seekable zstd, eStargz — and the writer-side constraint that explains themdeep-dive
Range-request consumptionIndex anchoring0/2/1/0footer / header+b-treeconsumerDuckDB httpfs, sql.js-httpvfs, OCI, debuginfod: cost is round trips, not bytesdeep-dive
Debug info and OOB indexesIndex anchoring1/2/1/1stream-scanned + bolt-onsconsumerDWARF: five index generations, because the format shipped with no query surfacedeep-dive
The Nix store and closuresClosure0/2/3/1out-of-bandconsumerDependencies discovered by scanning bytes for hashes, never declareddeep-dive
Content addressing and chunkingClosure0/1/3/1out-of-band + footer TOCconsumerOSTree, casync/desync, OCI layers, zstd:chunked — 0.00% vs 99.88% sharing, same two artifactsdeep-dive
Image-based systemsSelf-mutation1/2/2/3headerloaderSqueak, SBCL, Emacs unexecpdumper, CRIU, Erlang — five collisions with demand pagingdeep-dive
SQLite as an app file formatSelf-mutation1/3/2/3headerconsumerThe design position SELF is a maximal instance of; Fossil is the shipped proofdeep-dive
The SQLite VFS as substrateSubstrate1/2/0/2out-of-band (negotiable)consumerOne b-tree over pread, OPFS, HTTP 206, memory — where portability actually livesdeep-dive
Embedded provenanceProvenance0/2/1/0mixed by designconsumerbuild-id, Go buildinfo, cargo-auditable, SBOM-in-binary — all opt-in, all unauthenticateddeep-dive
Threat modelTrust0/1/0/3out-of-bandkernelEvery OS primitive identifies its subject by inode or path — never by contentdeep-dive
Single-level storePrior art0/3/1/2out-of-bandkernelIBM i/OS-400, Multics, Pick, VMS RMS — the commercial system that shipped "the OS is a database"deep-dive
Plan 9 and 9PPrior art1/2/0/1out-of-bandkernelThe namespace, not the table, as the uniform interrogation interface — 13 messagesdeep-dive
Method and measurementMethod0/1/0/1out-of-bandconsumerA prescriptive protocol; explicitly reports no resultsdeep-dive

Taxonomies

The same 26 subjects, re-cut one axis at a time.

By index anchoring

Out-of-band is the most common answer — the index is more often outside the artifact than in it, and every such index is a materialized view that can go stale.

AnchoringCountSubjects
Out-of-band11sqlelf, inspection, relational, codedb, nix, chunking, vfs, threat, sls, plan9, measure
Header6SELF, binfmt, ld (+ cache), images, aff, boot (+ hole)
Footer5APE, zip, footer, range, chunking (zstd:chunked TOC)
Stream-scanned4wasm, dwarf, differentials, provenance (Go buildinfo)

By dispatch owner

DispatcherCountWhat acts on the bytes
Consumer15A library, a SQL engine, a renderer, a sniffing heuristic — no privileged arbiter
Kernel6binfmt_misc, binfmt_elf, binfmt_script, and the systems that were the OS (sls, plan9)
Loader3ld.so, a Wasm engine, a language runtime opening its own image
Firmware1BIOS El Torito / UEFI LoadImage
Shell1The shebang, and the ENOEXEC fallback that APE exploits

By axis extreme

AxisScores 3Reading
MultiplicityAPE, zip, polyglot, boot, differentialsAll five are format-superposition entries; none exceeds reflexivity 2
ReflexivitySELF, inspection, relational, codedb, wasm, aff, slsNone exceeds multiplicity 1 — see the shape of the space
ClosureAPE, nix, chunkingOne carries everything; two share everything
MutabilitySELF, images, aff, threatThe axis where signing stops working (provenance)

Milestones

When the load-bearing capabilities actually landed. Every date is established and cited on the deep-dive that owns it; entries marked are approximate there too.

DateEventPage
1965-11Multics segments described at FJCC — one address space over memory and disksls
1978VAX/VMS RMS 1.0; ETXTBSY in V7 Unixsls, threat
1980Smalltalk-80 images; IBM System/38 shipsimages, sls
1982Emacs unexec — dumping a running process back into an executableimages
1986-12ECMA-119 (ISO 9660) reserves Logical Sectors 0–15 — hole-tolerance, on purposeboot
1988-06AS/400 announced (OS/400 V1R1): single-level store + TIMI + integrated databasesls
1989PKZIP 0.9 and APPNOTE.TXT — the footer index the whole catalog turns onzip
1993-07-27DWARF 2, including .debug_pubnames — the first of five index generationsdwarf
1995ELF dynamic linking in Linux; El Torito 1.0ld, boot
1997binfmt_misc in Linux 2.1.43; HTTP byte ranges standardised (RFC 2068, January)binfmt, range
2002-049P2000 ships with Plan 9 Fourth Editionplan9
2003-03-13Nix's first commit — dependencies discovered by scanning, never declarednix
2004-06-18SQLite 3.0.0; the file format has been backwards-compatible ever sinceaff
2007build-id lands in Fedora 8; sqlite3_vfs ships in SQLite 3.5.0provenance, vfs
2011DFDL v1.0; OSTree's first commit; the term LangSec is coinedinspection, chunking, differentials
2013Parquet 1.0.0 and ORC; PoC‖GTFO 0x00 (2013-08-05)footer, polyglot
2013-05-20SQLite 3.7.17 adds xFetch/xUnfetch — mapped pages are shared between processesaff
2016OpenBSD pledge (5.9); Kaitai Struct compiler 0.2threat, inspection
2017casync (January); seekable zstd 0.1.0 (2017-11-04); DWARF 5 .debug_nameschunking, footer, dwarf
2019debuginfod (elfutils 0.178); fs-verity (Linux 5.4); Wasm 1.0 W3C Recommendationdwarf, threat, wasm
2020-08-24APE announced — the maximal artifact of the format-level strategyape
2020Emacs 27.1 replaces unexec with pdumper, after ASLR and PIE broke itimages
2021Landlock (Linux 5.13); sql.js-httpvfs and DuckDB httpfs; OCI distribution-spec v1.0threat, range
2023-03-09sqlelf's first commit — SQL over ELF, changing no formatsqlelf
2023systemd ukify (253); SLSA v1.0 (2023-04-19); in-toto Attestation v1boot, provenance
2024-05-06The sqlelf paper submitted (arXiv:2405.03883)sqlelf
2024-08-17redbean 3.0.0ape
2026-07-09SELF's first commit; the repository is made public 2026-08-23self

WARNING

SELF's repository has been public for three days at the time of this review, and its first commit is seven weeks old. Several of its claims — including the startup cost model and the page-sharing loss — have never been measured by anyone, its own DESIGN.md included. Treat every SELF performance figure in this tree as the project's claim, not as a result.


Runnable examples

Six single-file D programs, compiled and run by the repository's ci helper on every pass, each establishing one structural claim from first principles rather than asserting it:

ExampleWhat it proves
zip-eocd-scan.dBuilds a shell-script + ZIP polyglot with prefix-biased offsets, then enumerates it reading 0.3% of the file; a system unzip independently agrees
magic-superposition.dRuns ten recognizers over four buffers at once — superposition is independent predicates with no arbiter
sqlite-header-probe.dDecodes application_id at offset 68 and page_size at 16, from a synthesized SELF header and a real database
binfmt-magic-match.dThe kernel's magic+mask+offset predicate, transcribed; two ELF headers differing in one byte, separated by the mask
elf-note-buildid.dReads its own build-id from /proc/self/exe — and shows that emitting one is an opt-in link option
relocation-join.dThe loader as a query engine: LD_PRELOAD as one inserted row that changes 4 of 8 resolutions, plus the same query in SQL and Datalog

Suggested reading paths

"I want the argument, not the catalog."conceptscomparisonopen-questions. About an hour; the corrections section in the middle of comparison is the part that changed as a result of the research.

"I came for redbean / APE."APEZIP parasitismpolyglot craftparser differentialsboot hybrids.

"I came for SELF."SELFsqlelfSQLite as an app file formatbinfmt_miscthe VFS seammeasurement. Read the threat model before forming an opinion about deploying it.

"I want to know whether this is actually new."Single-level storePlan 9image-based systemscomparison § thesis 2. Short answer: no, and the reasons the predecessors lost are better documented than the current wave admits.

"I have to make a format decision."concepts § tolerancefooter-indexed formatsrange-request consumptiondebug info. The writer-side constraint in footer-indexed-formats is the one that will decide it.

"I need to measure something."measurement, and nothing else first.

Sources

Each deep-dive owns its own primary sources and pinned citations; this umbrella cites none of its own. Grounding state at the last review: 590 GitHub blob citations across the tree, 495 verified to resolve at their pinned commit against local clones (ci --check-blob-paths), every GitHub URL pinned to a 40-character SHA (ci --check-vcs-urls), and 154 individually-recorded claims that could not be verified, each either dropped or explicitly marked on the page that raised it.