Files
whetstone_DSL/editor/src/Sprint286IntegrationSummary.h

109 lines
4.6 KiB
C
Raw Normal View History

#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