Skip to content

Commit 584bd17

Browse files
Add Atlas semantic documentation graph support
1 parent d79b82b commit 584bd17

23 files changed

Lines changed: 2084 additions & 38 deletions

File tree

Experiments/PolicyLab/M0/Atlas.oct

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
package PolicyLab
2+
3+
import Atlas
4+
5+
fn AtlasDocument() -> Atlas.TableDocument {
6+
let policy = Atlas.AdvisoryPolicy() with {
7+
RequireRequirementImplementation: true
8+
RequireRequirementVerifier: true
9+
RequireInterpretationCitation: true
10+
RequireClaimSupport: true
11+
}
12+
return Atlas.TableDocument {
13+
Authorities: Atlas.AuthorityTable {
14+
ID:["Authority.US.FLSA", "Authority.US.FOIA"]
15+
Title:["Fair Labor Standards Act", "Freedom of Information Act"]
16+
URI:["https://uscode.house.gov/view.xhtml?req=granuleid:USC-prelim-title29-section207", "https://uscode.house.gov/view.xhtml?req=granuleid:USC-prelim-title5-section552"]
17+
Version:["2023", "2023"]
18+
Digest:["", ""]
19+
}
20+
Citations: Atlas.CitationTable {
21+
ID:["Citation.US.FLSA.207a1", "Citation.US.FOIA.552a6"]
22+
Authority:["Authority.US.FLSA", "Authority.US.FOIA"]
23+
Locator:["29 U.S.C. § 207(a)(1)", "5 U.S.C. § 552(a)(6)(A)(i)-(ii)"]
24+
}
25+
Requirements: Atlas.RequirementTable {
26+
ID:["Requirement.Policy.FLSA.OvertimeThreshold", "Requirement.Policy.FOIA.TimelyAppealEntersReview"]
27+
Text:["Hours above 40 in the modeled workweek enter overtime calculation.", "A timely modeled appeal enters review before disposition."]
28+
}
29+
Interpretations: Atlas.InterpretationTable {
30+
ID:["Interpretation.Policy.FLSA.WeeklyThreshold", "Interpretation.Policy.FOIA.BoundedProcedure"]
31+
Text:["Policy Lab models the weekly threshold as hours greater than 40 under its bounded assumptions.", "Policy Lab models the cited response and appeal windows with explicit supplied day indexes."]
32+
}
33+
Claims: Atlas.ClaimTable {
34+
ID:["Claim.Policy.FLSA.TimeAndAHalf", "Claim.Policy.AmendmentImpactIsLocalized"]
35+
Text:["Eligible overtime hours use one and one-half the supplied regular rate under the bounded integer-cent interpretation.", "Changing only the modeled threshold changes boundary cases and their dependent evidence without rewriting unrelated procedure."]
36+
}
37+
Symbols: Atlas.SymbolRefTable {
38+
ID:["Symbol.PolicyLab.EvaluateOvertime", "Symbol.PolicyLab.DOJAppealProcess", "Symbol.PolicyLab.WorkweekHours"]
39+
Symbol:["PolicyLab.EvaluateOvertime", "PolicyLab.DOJAppealProcess", "PolicyLab.WorkweekHours"]
40+
Kind:[Atlas.SymbolKind.Function, Atlas.SymbolKind.Flow, Atlas.SymbolKind.Concept]
41+
}
42+
Evidence: Atlas.EvidenceRefTable {
43+
ID:["Evidence.PolicyLab.ApplicantAboveThresholdReceivesOneAndOneHalfRate", "Evidence.PolicyLab.ThresholdBoundaryClassifiesOvertime", "Evidence.PolicyLab.TimelyAppealCannotSkipReview"]
44+
Evidence:["PolicyLab.ApplicantAboveThresholdReceivesOneAndOneHalfRate", "PolicyLab.ThresholdBoundaryClassifiesOvertime", "PolicyLab.TimelyAppealCannotSkipReview"]
45+
Kind:[Atlas.EvidenceKind.Fact, Atlas.EvidenceKind.Theory, Atlas.EvidenceKind.Fact]
46+
}
47+
Artifacts: Atlas.ArtifactRefTable {
48+
ID:["Artifact.PolicyLab.Audit"]
49+
Artifact:["PolicyLab.EmitPolicyLabAudit"]
50+
Output:["policy_lab_audit.md"]
51+
}
52+
Links: Atlas.LinkTable {
53+
From:[
54+
"Citation.US.FLSA.207a1",
55+
"Interpretation.Policy.FLSA.WeeklyThreshold",
56+
"Symbol.PolicyLab.EvaluateOvertime",
57+
"Symbol.PolicyLab.WorkweekHours",
58+
"Evidence.PolicyLab.ApplicantAboveThresholdReceivesOneAndOneHalfRate",
59+
"Evidence.PolicyLab.ThresholdBoundaryClassifiesOvertime",
60+
"Requirement.Policy.FLSA.OvertimeThreshold",
61+
"Requirement.Policy.FLSA.OvertimeThreshold",
62+
"Artifact.PolicyLab.Audit",
63+
"Interpretation.Policy.FOIA.BoundedProcedure",
64+
"Symbol.PolicyLab.DOJAppealProcess",
65+
"Evidence.PolicyLab.TimelyAppealCannotSkipReview",
66+
"Claim.Policy.AmendmentImpactIsLocalized"
67+
]
68+
Relation:[
69+
Atlas.Relation.Supports,
70+
Atlas.Relation.Interprets,
71+
Atlas.Relation.Implements,
72+
Atlas.Relation.Implements,
73+
Atlas.Relation.Verifies,
74+
Atlas.Relation.Verifies,
75+
Atlas.Relation.Supports,
76+
Atlas.Relation.Supports,
77+
Atlas.Relation.Explains,
78+
Atlas.Relation.Interprets,
79+
Atlas.Relation.Implements,
80+
Atlas.Relation.Verifies,
81+
Atlas.Relation.DependsOn
82+
]
83+
To:[
84+
"Requirement.Policy.FLSA.OvertimeThreshold",
85+
"Citation.US.FLSA.207a1",
86+
"Requirement.Policy.FLSA.OvertimeThreshold",
87+
"Requirement.Policy.FLSA.OvertimeThreshold",
88+
"Requirement.Policy.FLSA.OvertimeThreshold",
89+
"Requirement.Policy.FLSA.OvertimeThreshold",
90+
"Claim.Policy.FLSA.TimeAndAHalf",
91+
"Claim.Policy.AmendmentImpactIsLocalized",
92+
"Requirement.Policy.FLSA.OvertimeThreshold",
93+
"Citation.US.FOIA.552a6",
94+
"Requirement.Policy.FOIA.TimelyAppealEntersReview",
95+
"Requirement.Policy.FOIA.TimelyAppealEntersReview",
96+
"Requirement.Policy.FLSA.OvertimeThreshold"
97+
]
98+
}
99+
Policy: policy
100+
}
101+
}

Experiments/PolicyLab/M0/policy_lab_m0.oct

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,6 @@ record AppealOutcome {
100100
Explanation: String
101101
}
102102

103-
record SourceMapTable {
104-
RuleID: String[]
105-
Authority: String[]
106-
Section: String[]
107-
Interpretation: String[]
108-
Symbol: String[]
109-
Facts: String[]
110-
}
111-
112103
fn AdmitWorkweekHours(raw: Int) -> WorkweekHours ! Error {
113104
return WorkweekHours(raw) ?
114105
}
@@ -274,17 +265,6 @@ fn ResolveRuleEffects(effects: RuleEffect[]) -> ConflictResult {
274265
}
275266
}
276267

277-
fn BuildSourceMap() -> SourceMapTable {
278-
return SourceMapTable {
279-
RuleID:["PL-A-DOMAIN-1", "PL-A-207A1", "PL-A-213A1", "PL-B-APPEAL-90", "PL-B-DECISION-20"]
280-
Authority:["Experiment domain", "Fair Labor Standards Act", "Fair Labor Standards Act", "Freedom of Information Act", "Freedom of Information Act"]
281-
Section:["Structural assumption", "29 U.S.C. 207(a)(1)", "29 U.S.C. 213(a)(1)", "5 U.S.C. 552(a)(6)(A)(i)", "5 U.S.C. 552(a)(6)(A)(ii)"]
282-
Interpretation:["Elapsed whole hours 0 through 168", "Whole-hour covered employment only", "Caller supplies already-classified exemption status", "Elapsed calendar-day index; day 90 is timely", "Supplied working-day index; day 20 is on time"]
283-
Symbol:["WorkweekHours", "EvaluateOvertime", "Section213A1ExceptionApplies", "DOJAppealProcess", "DecisionTimelinessForWorkingDay"]
284-
Facts:["InvalidWorkweekHoursAreRejected", "ThresholdBoundaryClassifiesOvertime", "DisqualifyingExceptionOverridesBaseRule", "AppealDeadlineBoundaryIsExplicit", "AppealDecisionTimelinessBoundaryIsExplicit"]
285-
}
286-
}
287-
288268
fn DecisionTimelinessForWorkingDay(day: Int) -> DecisionTimeliness {
289269
if day <= 20 {
290270
return DecisionTimeliness.OnTime
@@ -380,12 +360,10 @@ fn BuildPolicyAuditMarkdown() -> String[] {
380360
}
381361
let decision = EvaluateOvertime(sample)
382362
let history = RunSampleAppealHistory()
383-
let sourceMap = BuildSourceMap()
384363
let settings = Markdown.KeyValueTable(
385364
["specimen_a", "specimen_b", "law_status", "rounding", "convergence"],
386365
["FLSA overtime, bounded", "DOJ FOIA administrative appeal, bounded", "executable interpretation, not law", "explicit half-cent ceiling", "static/runtime forms remain separate"]
387366
)
388-
let sourceTable = Markdown.Table(sourceMap)
389367
let trace = Markdown.KeyValueTable(
390368
["coverage", "exception", "threshold", "overtime_hours", "overtime_cents", "final"],
391369
[decision.Trace[0], decision.Trace[1], decision.Trace[2], String.From<Int>(decision.OvertimeHours), String.From<Int>(decision.OvertimeCompensationCents), decision.Trace[4]]
@@ -399,7 +377,7 @@ fn BuildPolicyAuditMarkdown() -> String[] {
399377
Markdown.H1("Policy Lab M0 audit"),
400378
Markdown.Paragraph("Research artifact only. This is an executable interpretation of cited authority, not legal advice or an authoritative statement of law."),
401379
Markdown.Section("Experiment",[settings]),
402-
Markdown.Section("Source map",[sourceTable]),
380+
Markdown.Section("Traceability",[Markdown.Paragraph("The package's canonical AtlasDocument links authorities, citations, bounded interpretations, requirements, implementation symbols, Facts, Theories, and this audit Artifact. Use oct atlas explain for the compiled source map.")]),
403381
Markdown.Section("Substantive decision trace",[trace]),
404382
Markdown.Section("Procedural history",[historyTable]),
405383
Markdown.Section("Exceptions and conflicts",[Markdown.Paragraph("The FLSA probe evaluates assumed coverage, then an explicit section 213(a)(1) exemption, then the hour threshold. Synthetic conflict probes return ConflictingRules instead of relying on first-match order.")]),

Experiments/PolicyLab/M0/policy_lab_m0.octest

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -270,17 +270,6 @@ fn ProceduralHistoryRecordsNoticeAppealReviewAndDecision() -> Void {
270270
Assert.Equal(first[4], second[4], "same case produces deterministic history")
271271
}
272272

273-
/// PL-SOURCE-MAP: every major implemented rule has authority and Fact linkage.
274-
[Fact]
275-
fn SourceMapRetainsRuleAuthorityAndFactNames() -> Void {
276-
let map = BuildSourceMap()
277-
Assert.Equal(5, Len(map.RuleID), "source map row count")
278-
Assert.Equal("PL-A-207A1", map.RuleID[1], "substantive rule ID")
279-
Assert.Equal("29 U.S.C. 207(a)(1)", map.Section[1], "exact substantive section")
280-
Assert.Equal("PL-B-APPEAL-90", map.RuleID[3], "procedural rule ID")
281-
Assert.Equal("AppealDeadlineBoundaryIsExplicit", map.Facts[3], "source-to-Fact linkage")
282-
}
283-
284273
/// PL-ARTIFACT: the explanation source is deterministic before filesystem write.
285274
[Fact]
286275
fn ExplanationArtifactSourceIsDeterministic() -> Void {

Experiments/PolicyLab/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ change; current authority must be checked before any real-world use.
5555
## Corpus
5656

5757
- `M0/policy_lab_m0.oct` — records, enums, refined Concepts, policy functions,
58-
explicit exception/conflict logic, templates, captured callables, source map,
58+
explicit exception/conflict logic, templates, captured callables, Atlas graph,
5959
Octomata procedure, and deterministic artifact builder.
6060
- `M0/policy_lab_m0.octest` — normative Facts, boundary Theories, negative
6161
propositions, amendment cases, procedural invariants, history, and artifact.
@@ -86,7 +86,9 @@ out/test-artifacts/experiments_policy_lab_m0/policy_lab_audit.md
8686

8787
## Known ambiguities and gaps
8888

89-
- Literate source-law proximity and first-class provenance are absent.
89+
- Literate source-law proximity remains absent; first-class project provenance
90+
now lives in the package's ordinary `AtlasDocument()` and is checked by
91+
`oct atlas verify`.
9092
- Money, currency, calendar date, working-day, and holiday types are absent from
9193
the core surface used here.
9294
- Default/exception priority and conflict resolution are ordinary explicit code,

Experiments/PolicyLab/manifest.oct

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ fn Manifest() -> PackageManifest {
2323
Date: "2026-08-30"
2424
Dependencies:[
2525
Dependency {Name: "OctStd" VersionRequirement: "0.1.0"},
26-
Dependency {Name: "Algorithms" VersionRequirement: "0.1.0"}
26+
Dependency {Name: "Algorithms" VersionRequirement: "0.1.0"},
27+
Dependency {Name: "Atlas" VersionRequirement: "0.1.0"}
2728
]
2829
}
2930
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package RiemannAtlas
2+
3+
import Atlas
4+
5+
fn AtlasDocument() -> Atlas.Document {
6+
return Atlas.Document {
7+
Authorities:[
8+
Atlas.Authority {ID: "Authority.Riemann.M23Report" Title: "M23 certified variable-radius two-atom local optimum" URI: "https://github.com/yuechen-li-dev/Riemann/blob/7afc3c35a50610459a63088e88a91ebe86aa7d79/docs/m23-variable-radius-local-optimum.md" Version: "7afc3c35a50610459a63088e88a91ebe86aa7d79" Digest: "sha256:44cfcfa5c961143edd804317a4f4baf22ad0a3a3f0b9faaf1059c96670155453"},
9+
Atlas.Authority {ID: "Authority.Riemann.M24Report" Title: "M24 global control of the contact-preserving two-atom component" URI: "https://github.com/yuechen-li-dev/Riemann/blob/7afc3c35a50610459a63088e88a91ebe86aa7d79/docs/m24-two-atom-component-control.md" Version: "7afc3c35a50610459a63088e88a91ebe86aa7d79" Digest: "sha256:bbd09ce3660491c63148a96fc953a6c8f954b46750331062d9517e0301ecf65b"},
10+
Atlas.Authority {ID: "Authority.Riemann.M25Report" Title: "M25 B1 control and component optimum" URI: "https://github.com/yuechen-li-dev/Riemann/blob/7afc3c35a50610459a63088e88a91ebe86aa7d79/docs/m25-b1-component-global-optimum.md" Version: "7afc3c35a50610459a63088e88a91ebe86aa7d79" Digest: "sha256:68eb81168bce0e243e62f60217778a59cc6b153875295e573e2a016d28d883c5"}
11+
]
12+
Citations:[
13+
Atlas.Citation {ID: "Citation.Riemann.M23.Outcome" Authority: "Authority.Riemann.M23Report" Locator: "Outcome and certified optimizer sections"},
14+
Atlas.Citation {ID: "Citation.Riemann.M24.ResidualWindow" Authority: "Authority.Riemann.M24Report" Locator: "Outcome and final residual-window conclusion"},
15+
Atlas.Citation {ID: "Citation.Riemann.M25.Composition" Authority: "Authority.Riemann.M25Report" Locator: "M23/M24/M25 composition and whole-line feasibility sections"}
16+
]
17+
Requirements:[]
18+
Interpretations:[]
19+
Claims:[
20+
Atlas.Claim {ID: "Claim.Riemann.M23.LocalStationaryOptimizer" Text: "M23 establishes the bounded local stationary optimizer used by the later component argument."},
21+
Atlas.Claim {ID: "Claim.Riemann.M24.OutsideWindowExclusion" Text: "M24 excludes improving candidates outside the bounded residual window used by the component argument."},
22+
Atlas.Claim {ID: "Claim.Riemann.M25.B1GlobalWindowControl" Text: "M25 supplies B1 control across the remaining bounded global window."},
23+
Atlas.Claim {ID: "Claim.Riemann.ContactPreservingTwoAtomComponentGlobalOptimum" Text: "The completed M23-M25 chain establishes the named contact-preserving two-atom component optimum; it is not a proof of the Riemann Hypothesis."}
24+
]
25+
Symbols:[]
26+
Evidence:[]
27+
Artifacts:[]
28+
Links:[
29+
Atlas.Link {From: "Citation.Riemann.M23.Outcome" Relation: Atlas.Relation.Supports To: "Claim.Riemann.M23.LocalStationaryOptimizer"},
30+
Atlas.Link {From: "Citation.Riemann.M24.ResidualWindow" Relation: Atlas.Relation.Supports To: "Claim.Riemann.M24.OutsideWindowExclusion"},
31+
Atlas.Link {From: "Citation.Riemann.M25.Composition" Relation: Atlas.Relation.Supports To: "Claim.Riemann.M25.B1GlobalWindowControl"},
32+
Atlas.Link {From: "Citation.Riemann.M25.Composition" Relation: Atlas.Relation.Supports To: "Claim.Riemann.ContactPreservingTwoAtomComponentGlobalOptimum"},
33+
Atlas.Link {From: "Claim.Riemann.ContactPreservingTwoAtomComponentGlobalOptimum" Relation: Atlas.Relation.DerivedFrom To: "Claim.Riemann.M23.LocalStationaryOptimizer"},
34+
Atlas.Link {From: "Claim.Riemann.ContactPreservingTwoAtomComponentGlobalOptimum" Relation: Atlas.Relation.DerivedFrom To: "Claim.Riemann.M24.OutsideWindowExclusion"},
35+
Atlas.Link {From: "Claim.Riemann.ContactPreservingTwoAtomComponentGlobalOptimum" Relation: Atlas.Relation.DerivedFrom To: "Claim.Riemann.M25.B1GlobalWindowControl"},
36+
Atlas.Link {From: "Claim.Riemann.M25.B1GlobalWindowControl" Relation: Atlas.Relation.DependsOn To: "Claim.Riemann.M24.OutsideWindowExclusion"},
37+
Atlas.Link {From: "Claim.Riemann.M24.OutsideWindowExclusion" Relation: Atlas.Relation.DependsOn To: "Claim.Riemann.M23.LocalStationaryOptimizer"}
38+
]
39+
Policy: Atlas.Policy {
40+
RequireRequirementImplementation: false
41+
RequireRequirementVerifier: false
42+
RequireInterpretationCitation: false
43+
RequireClaimSupport: false
44+
}
45+
}
46+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package RiemannAtlas
2+
3+
[Fact]
4+
fn GlobalComponentClaimNamesThreeDerivedInputsWithoutClaimingFullRHProof() -> Void {
5+
let document = AtlasDocument()
6+
Assert.Equal(Len(document.Claims), 4, "three inputs plus the bounded component claim")
7+
Assert.Equal(Len(document.Authorities), 3, "commit-pinned M23-M25 reports")
8+
Assert.Equal(Len(document.Links), 9, "four source supports, three derivations, and two dependency links")
9+
Assert.True(document.Claims[3].Text != "The Riemann Hypothesis is proved.", "scope remains bounded")
10+
}

Experiments/RiemannAtlas/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Riemann Atlas M0 slice
2+
3+
This is a deliberately narrow handoff graph for the M23 local optimizer, M24
4+
outside-window exclusion, M25 B1 global control, and the resulting named
5+
component optimum supplied in the Atlas M0 brief.
6+
7+
The local Riemann checkout was inspected at commit
8+
`7afc3c35a50610459a63088e88a91ebe86aa7d79`. Its three milestone reports are
9+
commit-pinned Authorities with SHA-256 digests and precise Citations. The
10+
implementation, Go certificates, and separate Oct experiment packages are not
11+
part of this loaded Oct project, so M0 does not create string-only SymbolRef or
12+
EvidenceRef nodes for them: doing so would defeat resolution validation. The
13+
claim dependency graph remains useful and honest, while cross-package/repository
14+
Atlas federation is recorded as future work rather than simulated here.
15+
16+
The final claim is explicitly component-scoped and makes no claim of a proof of
17+
the Riemann Hypothesis.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package Manifest
2+
3+
record PackageManifest {
4+
Name: String
5+
Version: String
6+
Description: String
7+
Authors: String[]
8+
Date: String
9+
Dependencies: Dependency[]
10+
}
11+
12+
record Dependency {Name: String VersionRequirement: String}
13+
14+
fn Manifest() -> PackageManifest {
15+
return PackageManifest {
16+
Name: "RiemannAtlas"
17+
Version: "0.1.0"
18+
Description: "Atlas M0 handoff graph for the completed external Riemann M23-M25 slice"
19+
Authors:["Codex"]
20+
Date: "2026-08-30"
21+
Dependencies:[Dependency {Name: "Atlas" VersionRequirement: "0.1.0"}]
22+
}
23+
}

Language/reference/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ Start with [00-overview.md](./00-overview.md).
4949
- [34 octagon](./tooling/34-octagon.md)
5050
- [35 CLI](./tooling/35-cli.md)
5151
- [36 VSCode en-human view](./tooling/36-vscode.md)
52+
- [37 Atlas semantic documentation graphs](./tooling/37-atlas.md)

0 commit comments

Comments
 (0)