Files
whetstone_DSL/editor/src/Sprint286IntegrationSummary.h
Bill b5c8b46117 Sprint 286: OperationTaxonomy + LibraryCapabilityLedger (steps 1958-1962)
Phase 6 Library Dispatch foundation. Five new headers:
- OperationDomain: dot-key hierarchy with parent traversal
- LibraryCapabilityRecord: score/APIs/weaknesses + validator
- LibraryCapabilityLedger: (library, domain) -> record registry
- OperationTaxonomy: 40+ domain tree, keyword-based classify()
- Sprint286IntegrationSummary: 8-library seed ledger + verified lookups

25/25 tests passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 09:48:30 -07:00

109 lines
4.6 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
// Step 1962: Sprint 286 Integration Summary
// Steps 19581962: OperationTaxonomy + LibraryCapabilityLedger
//
// 1958: OperationDomain — dot-key hierarchy + OperationDomainRegistry
// 1959: LibraryCapabilityRecord — score/APIs/weaknesses + validator
// 1960: LibraryCapabilityLedger — (libraryId, operationDomain) -> record registry
// 1961: OperationTaxonomy — 40+ domain tree + classify(text)
// 1962: Integration — seed 8 libraries, verify lookups
#include "LibraryCapabilityLedger.h"
#include <string>
namespace whetstone {
struct Sprint286IntegrationSummary {
int stepsCompleted = 5;
bool success = true;
std::string sprintName() const {
return "Sprint 286: OperationTaxonomy + LibraryCapabilityLedger";
}
// Seed ledger with 8 real libraries × their operation domains.
static LibraryCapabilityLedger buildSeedLedger() {
LibraryCapabilityLedger ledger;
// nlohmann_json
ledger.set({"nlohmann_json", "serialization.json", 0.92f,
{"nlohmann::json::dump()", "nlohmann::json::parse()"},
{},
false, "2026-03-02", "benchmark+api-analysis"});
// protobuf
ledger.set({"protobuf", "serialization.binary", 0.95f,
{"Message::SerializeToString()", "Message::ParseFromString()"},
{},
false, "2026-03-02", "benchmark+api-analysis"});
ledger.set({"protobuf", "serialization.json", 0.60f,
{"MessageToJsonString()", "JsonStringToMessage()"},
{"no-pretty-print", "slow-large-arrays"},
false, "2026-03-02", "benchmark+api-analysis"});
// serde_json (Rust)
ledger.set({"serde_json", "serialization.json", 0.98f,
{"serde_json::to_string()", "serde_json::from_str()"},
{},
false, "2026-03-02", "benchmark+api-analysis"});
// cublas
ledger.set({"cublas", "compute.matrix", 0.99f,
{"cublasSgemm()", "cublasDgemm()", "cublasCreate()"},
{"requires-device-memory-management", "no-automatic-handle-lifecycle"},
false, "2026-03-02", "benchmark"});
// thrust
ledger.set({"thrust", "compute.parallel", 0.97f,
{"thrust::transform()", "thrust::reduce()", "thrust::sort()"},
{},
false, "2026-03-02", "benchmark"});
// numpy
ledger.set({"numpy", "compute.matrix", 0.95f,
{"numpy.matmul()", "numpy.dot()", "numpy.linalg.solve()"},
{"cpu-only", "gil-bound"},
false, "2026-03-02", "benchmark"});
ledger.set({"numpy", "compute.statistics", 0.93f,
{"numpy.mean()", "numpy.std()", "numpy.histogram()"},
{},
false, "2026-03-02", "benchmark"});
// tokio (Rust)
ledger.set({"tokio", "network.async", 0.97f,
{"tokio::spawn()", "tokio::select!()"},
{},
false, "2026-03-02", "benchmark"});
ledger.set({"tokio", "io.stream", 0.95f,
{"tokio::io::AsyncReadExt", "tokio::io::AsyncWriteExt"},
{},
false, "2026-03-02", "api-analysis"});
// boost.asio
ledger.set({"boost.asio", "network.async", 0.91f,
{"boost::asio::io_context", "boost::asio::async_read()"},
{},
false, "2026-03-02", "benchmark"});
ledger.set({"boost.asio", "network.http.client", 0.78f,
{"boost::beast::http::async_read()", "boost::beast::tcp_stream"},
{"verbose-api", "requires-beast-for-http"},
false, "2026-03-02", "api-analysis"});
return ledger;
}
// Verify key lookups against seeded ledger.
static bool verifyLookups(const LibraryCapabilityLedger& ledger) {
// cublas/compute.matrix = 0.99
if (ledger.score("cublas", "compute.matrix") != 0.99f) return false;
// protobuf/serialization.json = 0.60 (not 0.95 — domain specificity matters)
if (ledger.score("protobuf", "serialization.json") != 0.60f) return false;
// serde_json/serialization.json = 0.98
if (ledger.score("serde_json", "serialization.json") != 0.98f) return false;
// unknown pair returns 0.0
if (ledger.score("unknown_lib", "unknown_domain") != 0.0f) return false;
return true;
}
};
} // namespace whetstone