25 items across three tiers, structuring AffineScript’s relationship
with hyperpolymath/aggregate-library (aLib): conformance
implementation (passing aLib’s test vectors), conformance
infrastructure (runner, reporting, CI), and contributions of
affine-aware semantics back to aLib upstream.
|
Important
|
This document complements ROADMAP.adoc (language / compiler progress), bindings-roadmap.adoc (framework bindings), and stdlib-roadmap.adoc (standard library). Where this file disagrees with CAPABILITY-MATRIX.adoc or ECOSYSTEM.adoc, those documents win. Compiled 2026-05-28 from a fresh read of hyperpolymath/aggregate-library v0.1.0 + estate-wide use of the aLib methodology. |
hyperpolymath/aggregate-library is a methods repository, not a
stdlib replacement. It demonstrates how to:
-
identify a minimal overlap between systems with very different constraints,
-
express that overlap as a stable spec surface + semantics notes
conformance test suite, -
enforce reversibility through disciplined boundaries and test vectors.
The current overlap is intentionally small — 20 operations across 6 categories — chosen to stress-test the method, not to be a "shared stdlib".
| Category | Operations |
|---|---|
arithmetic |
add, subtract, multiply, divide, modulo, negate, absolute, max, min |
comparison |
(per |
logical |
(per |
string |
concat, length, reverse, substring |
collection |
contains, empty, filter, fold, length, map |
conditional |
(per |
|
Note
|
Counts above are from data/aggregate.json v1.1.0 (generated
2025-12-27, 20 total operations). When aLib publishes a new version,
this table updates here in the same PR that bumps the consumed
version.
|
Each entry carries:
-
Status —
○nothing built,◐scaffold,◑partial,●usable. -
Track —
T1implementation,T2runner/infra,T3contributions. -
Rationale — what the item delivers, and which downstream consumer benefits.
Item numbers are stable across revisions.
Implement the 20 operations in AffineScript such that aLib’s test
vectors pass. Most ops already exist in stdlib/ partially; the
work here is alignment with aLib’s signature_string, semantics, and
edge-case requirements.
| # | Item | Status | Track | Rationale |
|---|---|---|---|---|
1 |
Arithmetic-9 implementation — |
|
T1 |
|
2 |
Comparison ops — |
|
T1 |
Trait surface; pairs with |
3 |
Logical ops — |
|
T1 |
Mostly built-in operators; conformance is verifying short-circuit + truth-table behaviour matches aLib semantics. |
4 |
String-4 implementation — |
|
T1 |
|
5 |
Collection-6 implementation — |
|
T1 |
|
6 |
Conditional op — |
|
T1 |
Language built-in; verify spec semantics match. |
7 |
Edge-case coverage — implement and test NaN, infinity, overflow, empty-string, empty-list edge cases per each op’s |
|
T1 |
aLib specs intentionally leave overflow / NaN "implementation-defined" but require documented behaviour. AffineScript declares its choice here. |
8 |
Properties verification — |
|
T1 |
aLib |
9 |
Signature alignment audit — every AffineScript op’s signature matches the aLib |
|
T1 |
Mechanical comparison; ensures cross-language portability of code written against the aLib surface. |
10 |
Conformance module — |
|
T1 |
Single import point for consumers wanting the aLib surface rather than the AffineScript-idiomatic surface. Landed 2026-05-28. |
Build the machinery that runs aLib’s test vectors against AffineScript implementations and reports results. This is what makes aLib’s "method" actually testable for our language.
| # | Item | Status | Track | Rationale |
|---|---|---|---|---|
11 |
|
|
T2 |
First step; feeds every later runner item. Landed 2026-05-28 as |
12 |
Test-vector executor — iterate |
|
T2 |
Core conformance loop. |
13 |
Properties auto-checker — for each declared property (e.g. commutative), run randomized inputs and assert |
|
T2 |
Pairs with item #8; property-based testing under the hood. |
14 |
Conformance report emitter — JSON + a2ml output: per-op pass/fail, properties verified, edge cases covered |
|
T2 |
Estate convention: a2ml machine-readable; JSON for human / CI. |
15 |
CI workflow — |
|
T2 |
Stops drift; visible signal. |
16 |
Conformance badge — README badge + |
|
T2 |
Pairs with #15. |
17 |
Multi-target harness — run conformance against the native interp and the wasm codegen target, separately |
|
T2 |
Verifies that "type-checks" and "executes" are both green at the aLib surface — directly mitigates the PR #107 class of issue (check PASS / eval FAIL). |
18 |
Conformance-comparison view — side-by-side AffineScript vs reference implementations (phronesis, Rust, Haskell) where available |
|
T2 |
Pairs with |
AffineScript’s distinctive properties (affine resource types,
row-polymorphic effects, dependent types, reversibility) suggest spec
extensions that aLib doesn’t currently capture. These items propose
upstream PRs to hyperpolymath/aggregate-library.
| # | Item | Status | Track | Rationale |
|---|---|---|---|---|
19 |
Affine-witness column — |
|
T3 |
For each op, declare which inputs are consumed vs borrowed. Trivially |
20 |
Linearity / reversibility tagging — |
|
T3 |
aLib already mentions "Reversibility" in its design principles but doesn’t formalise per-op. Upstream PR; idaptik DLC use case is the motivating consumer. |
21 |
Effect-row metadata — |
|
T3 |
All current 20 ops are pure ( |
22 |
Idempotency property — formalise |
|
T3 |
aLib semantics.properties has |
23 |
Monotonicity property — |
|
T3 |
Same family as #22; missing property class. |
24 |
Affine-friendly op proposals — propose |
|
T3 |
Current |
25 |
ADR for affine extension — single ADR in aLib documenting the schema extensions in #19/#20/#21/#22/#23 + the rationale |
|
T3 |
Bundle the schema-extension items into one upstream PR with proper rationale, so aLib maintainers can review the whole shape rather than five disconnected fields. |
-
aLib is small by design. 20 ops is the entire surface today. The conformance work (T1 + T2) is therefore bounded — completable in a handful of PRs, not a multi-quarter epic.
-
T3 contributions are the higher-leverage half. AffineScript’s affine + effect + dependent type system suggests spec features aLib doesn’t yet have. Contributing the method extensions upstream is where AffineScript adds value back, not just consumes.
-
T1 items #4 and #5 are upstream-blocked on stdlib roadmap #1, #2, #8, #9 (runtime gaps for
List.++,List.len,String.concat,String.length). Don’t try to do T1 collection/string conformance before those runtime gaps close. -
Multi-target harness (T2 #17) is the antidote to the PR #107 problem. Currently
affinescript checkandaffinescript evalcan diverge; running conformance against both targets catches the gap automatically. -
aLib license is
MIT OR Palimpsest-0.8; AffineScript is MPL-2.0. Contributions upstream are spec-level (no code transfer); no license-compat issue.
| Phase | Goal | Items |
|---|---|---|
A |
Conformance scaffolding |
#10 ( |
B |
Pure ops first |
#1 (arithmetic-9) → #6 (conditional) → #2 (comparison) → #3 (logical) — these don’t need runtime list/string fixes |
C |
Collection + string ops |
Gated on stdlib roadmap A (List/String runtime). Then #4 + #5 + #7 + #8 + #9. |
D |
CI + visibility |
#15 (workflow) → #16 (badge) → #17 (multi-target) → #14 (reports) → #18 (comparison view) |
E |
Upstream contributions |
#25 (ADR draft) → #19/#20/#21/#22/#23 as one upstream PR → #24 (affine-op proposals as a follow-up) |
-
Umbrella tracker: #413 (Umbrella: aLib conformance and contributions roadmap — 25 items / 3 tracks).
-
Per-track child issues: opened lazily as work on an item starts. Reference items by their stable doc number as
alib #Nin cross-issue discussion. Filed so far:-
#416 — alib #10 (
stdlib/alib.affineconformance module); closed.
-
-
Upstream tracking:
hyperpolymath/aggregate-library(T3 items result in PRs there, not in this repo).
When an item’s status changes, update its row in this file in the same PR that lands the change; do not let the table drift.
-
ROADMAP.adoc — language / compiler progress.
-
bindings-roadmap.adoc — framework bindings (host-runtime FFI surfaces).
-
stdlib-roadmap.adoc — standard library items (runtime, RSR rewires, universals).
-
CAPABILITY-MATRIX.adoc — per-feature readiness (overrides everything).
-
aggregate-library — upstream methodology repo.
-
aLib COMPOSITION-GUIDE — the method of aggregation across phronesis/Rust/Haskell.