1 # Common Lisp Topic Maps — Slice 1
3 A working ANSI Common Lisp reader for the first CTM identity/default-name
4 subset, with a minimal TMDM information-item model. HyperDoc remains a possible
5 future client and is neither the codebase nor a dependency. There is no CXTM
6 canonicalizer, association/template implementation or cross-document merge engine.
8 Systems: `topic-maps` (the retained foundation), `topic-maps/tests`,
9 `topic-maps/tmdm`, `topic-maps/ctm` and `topic-maps/ctm/tests`.
10 The core reader/model uses ANSI Common Lisp; the foundation/tooling uses
11 ASDF/UIOP and Python's standard library. No Quicklisp packages are required.
13 Start with [Reading the First Five CTM Documents](docs/reading-first-five-ctm-documents.md)
14 for original sources, actual objects, normative clauses, baseline evidence and
15 copy-pasteable DESCRIBE forms. [API and boundaries](docs/slice-1-api-and-boundaries.md)
16 document the supported language, conditions, identity and report separation.
18 The pinned suite targets the **CTM draft dated 2010-03-31**. Passing it alone
19 does not establish full ISO/IEC 13250-6:2010 conformity.
23 In a new Common Lisp process, with this checkout selected:
27 (asdf:initialize-source-registry
28 '(:source-registry :ignore-inherited-configuration))
29 (asdf:load-asd #p"/Users/rgb/workspace/topic-maps/topic-maps.asd")
30 (asdf:load-system "topic-maps/ctm")
31 (asdf:load-system "topic-maps")
32 (defparameter *corpus* (topic-maps.test-foundation:discover-corpus))
33 (topic-maps.test-foundation:summarize-corpus *corpus*)
34 (topic-maps.test-foundation:select-cases *corpus* :category :invalid)
35 (topic-maps.test-foundation:select-cases *corpus* :id "ctm/in/simple.ctm")
36 (asdf:test-system "topic-maps/tests")
37 (asdf:test-system "topic-maps/ctm/tests")
38 (topic-maps.test-foundation:write-validation-report
39 *corpus* #p"/tmp/topic-maps-inventory.json")
42 Change only the checkout pathname when using another machine. The case's
43 Document IRI remains independent of that pathname. Records are inspectable
44 Common Lisp structures, with actual source/baseline pathnames and explicit
45 contracts, results, statuses, diagnostics and reviewed clauses.
47 ## Offline verification
50 # SBCL must already be installed. No network is used by this command.
51 TOPIC_MAPS_REPORT=/tmp/topic-maps-validation.json ./scripts/test.sh
54 Set `SBCL=/absolute/path/to/sbcl` if needed. The launcher starts a new process,
55 ignores system/user initialization, clears inherited ASDF source configuration
56 and writes FASLs outside the repository. It runs byte-integrity fixtures,
57 Common Lisp infrastructure checks and an independent JSON-schema/content check
58 when a report pathname is supplied. `nix develop path:.` supplies a minimal,
59 pinned SBCL/Python/Git environment; initial environment provisioning may need
60 network access, while test execution after provisioning does not.
62 The complete upstream corpus is already vendored, unchanged. If absent in a
63 source distribution, acquire it once:
66 python3 scripts/corpus.py acquire
67 python3 scripts/corpus.py verify
70 Acquisition uses the exact commit and archive digest in
71 [corpus-lock.json](references/corpus-lock.json), refuses to merge over existing
72 contents and verifies every file. Verification is offline. Valid CTM inputs
73 are selected only under `ctm/in`, invalid ones only under `ctm/invalid`, and
74 CXTM baselines only under `ctm/baseline`. Auxiliary files are reported separately.
76 ## Current validation and historical foundation
78 The complete pinned corpus remains unchanged: 231 valid CTM inputs, 42 invalid
79 inputs, 231 CXTM baselines and 22 CTM auxiliary files. Five selected semantic
80 cases pass; their imported canonical contracts remain NOT-RUN. Only
81 `ctm/invalid/prefix-undefined.ctm` is PASS under its CTM rejection contract;
82 272 imported contracts remain NOT-RUN. Unsupported constructs and I/O errors
83 cannot count as that required rejection.
85 The full launcher runs the retained 54 foundation checks, two Python integrity
86 fixtures, 100 semantic checks, imported-report validation and selected baseline
87 property evidence. A report path also produces `<path>.semantics.json` with
88 separate model observations. Both reports are deterministic across the tested
89 SBCL versions and checkout relocation. See [Slice 1 validation](docs/slice-1-validation.md),
90 [imported contracts](reports/slice-1/validation.json) and
91 [semantic observations](reports/slice-1/semantics.json).
93 [Slice 0 inventory](docs/inventory.md), [architecture](docs/architecture.md),
94 [coverage](docs/coverage.md) and [validation](docs/validation.md) remain historical
95 foundation records. Their original report/logs are preserved. Their statements
96 about absent reader/model systems describe Slice 0, not the current branch.
97 Slice 1 is built from `9c83db34eb1ba8091b004433f088056717dbaa7e` on
98 `codex/ctm-slice-1`. Slice 2 is not started automatically.