Andy.CK.Patterns
1.0.0
dotnet add package Andy.CK.Patterns --version 1.0.0
NuGet\Install-Package Andy.CK.Patterns -Version 1.0.0
<PackageReference Include="Andy.CK.Patterns" Version="1.0.0" />
<PackageVersion Include="Andy.CK.Patterns" Version="1.0.0" />
<PackageReference Include="Andy.CK.Patterns" />
paket add Andy.CK.Patterns --version 1.0.0
#r "nuget: Andy.CK.Patterns, 1.0.0"
#:package Andy.CK.Patterns@1.0.0
#addin nuget:?package=Andy.CK.Patterns&version=1.0.0
#tool nuget:?package=Andy.CK.Patterns&version=1.0.0
Andy Computable Knowledge
A .NET 10 implementation blueprint for a symbolic computational knowledge engine inspired by the public architectural principles behind Wolfram|Alpha and Wolfram Language.
This package is an implementation specification, not a claim of compatibility with or reproduction of proprietary Wolfram algorithms, datasets, parsers, ranking logic, or presentation rules.
Status
1.0.0. The engine answers a question asked in words, end to end, and can say where every number came from.
$ andy-ck "population density of France in 1990"
**88.0847 people per square kilometer**
*Exact:* 56709000/643801 People/Kilometers^2
*Approximately:* 88.0847 People/Kilometers^2
*Sources:* andy.ck.sample.geography (illustrative sample data, no onward licence)
| Phase | Packages |
|---|---|
| 1 — symbolic substrate | Andy.CK.Expressions |
| 2 — evaluation and patterns | Andy.CK.Symbols, Andy.CK.Patterns, Andy.CK.Evaluation |
| 3 — numerics and algebra | Andy.CK.Numerics, Andy.CK.Algebra |
| 4 — calculus and numerical methods | Andy.CK.Calculus |
| 5 — units and time | Andy.CK.Units, Andy.CK.Time |
| 6 — knowledge platform | Andy.CK.Entities, Andy.CK.Knowledge.Schema, Andy.CK.Knowledge.Store, Andy.CK.Knowledge.Provenance |
| 7 — interpretation | Andy.CK.Language |
| 8 — planning and execution | Andy.CK.Planning, Andy.CK.Execution |
| 9 — presentation | Andy.CK.Presentation |
| 10 — domains | Andy.CK.Domains.Abstractions, .Geography, .Demographics, .Economics |
| platform | Andy.CK.Platform (settings, identity and permission seams, telemetry) |
| worker isolation | Andy.CK.Workers (signed envelope protocol, sandbox policy, out-of-process host — ADR-005) |
| entry points | Andy.CK.Engine, Andy.CK.Cli (andy-ck) |
Not included at 1.0
The engine is complete and the pipeline runs end to end, but a deployment needs more than an engine. These are named in each module's Boundary section rather than half-built:
| Missing | Where it would go |
|---|---|
| Persistence — no SQL, Parquet, or search index | ADR-006; a file-backed journal ships and StoreConformance pins the semantics any adapter must reproduce |
| Ingestion — no source adapters, parsers, review queue, or publication workflow | docs/07-data/01-ingestion-pipeline.md; domain data is compiled into its package |
Worker isolation — Andy.CK.Workers runs an evaluation in a child process with a signed envelope, a sandbox policy, and forced termination on wall-clock or output breach; in-process execution (Andy.CK.Execution) is still the default. Genuinely enforced: process isolation, forced kill, wall-clock and output budgets. Carried but not enforced (no portable .NET API exists): CPU and memory caps, network denial, read-only mounts, child-process denial, credential scoping — these need cgroups, Job Objects, or a container runtime. No lease/retry, and no signing infrastructure to issue the signatures the protocol verifies |
ADR-005, docs/08-security/02-worker-sandbox.md |
| HTTP API | docs/06-interfaces/03-api-contract.md; the engine is a library and a CLI |
| Andy Auth and Andy RBAC | seams exist (Principal, IPermissionPolicy); the services do not |
| PNG, LaTeX, PDF, and redaction by entitlement | docs/05-modules/11-presentation.md; SVG is implemented (SvgReportRenderer, FunctionPlot) |
| Package signing and tenant load policy | manifests carry signature metadata; nothing signs or verifies |
The shipped domain data is a deliberately illustrative sample of 24 entities under clearly-marked sample sources — enough to exercise the engine end to end, and not a dataset to answer real questions from.
What the engine will not do
These are load-bearing decisions, each enforced by tests:
- It does not guess. A question no grammar form matches is reported as unrecognized. A property applied to the wrong kind of entity is rejected with its reason. A value the store does not hold leaves the query unevaluated.
- It does not fabricate provenance. Every answer carries the sources it rests on. The shipped datasets are illustrative approximations under clearly-marked sample sources — never attributed to a statistical office that did not publish them.
- It does not lose exactness quietly. Exact input gives exact output; an irrational result stays symbolic until
Nasks for digits; an inexact operand is what makes an operation inexact, and it is recorded when it happens. - It does not invent conversions. Dollars and euros are separate dimensions, because an exchange rate is an observation on a date, not a definition.
- It does not read the clock. Recording instants, load instants, and as-of times are supplied by the caller, so the same query gives the same answer on any machine at any time.
- It does not need a language model.
ICandidateProposermarks where one may propose candidates under ADR-003; nothing implements it, and every golden query is answered without one.
Quick start
var engine = ComputableKnowledgeEngine.Create(
loadedAt: DateTimeOffset.Parse("2026-07-01T00:00:00Z"),
new GeographyDomain(), new DemographicsDomain(), new EconomicsDomain());
var report = engine.Ask("GDP per capita of Germany versus France");
Console.WriteLine(new MarkdownReportRenderer().Render(report));
Getting started
Requires the .NET 10 SDK (see global.json).
If dotnet reports that .NET 10 is not installed when it is, the SDK is probably installed somewhere other than the one on your PATH — a per-user install under ~/.dotnet alongside a system one under /usr/local/share/dotnet, say. global.json pins the 10.0 band, so a dotnet that resolves to an older install reports the SDK as missing rather than falling back. Point the shell at the right one:
export DOTNET_ROOT="$HOME/.dotnet"
export PATH="$HOME/.dotnet:$PATH"
dotnet --version # should print 10.0.x
./run-example does this for you and runs any of the examples: ./run-example lists them, ./run-example geometry runs one, ./run-example all runs every one.
dotnet restore
dotnet build -c Release
dotnet test -c Release
The engine has no runtime dependencies. Every package references only the base class library; the sole PackageReference in src/ is Microsoft.SourceLink.GitHub, which is build-time only. The exact numerics, algebra, calculus, statistics, and number theory are implemented here rather than taken from a numerics library, because those libraries are double-precision and the point of this one is exactness.
Benchmarks are development-time only, and are the one place a third-party dependency (BenchmarkDotNet) is allowed:
dotnet run -c Release --project benchmarks/Andy.CK.Benchmarks
dotnet run -c Release --project benchmarks/Andy.CK.Benchmarks -- --filter '*Numerics*'
Committed numbers are in docs/09-testing/03-performance-baseline.md.
See CONTRIBUTING.md for conventions and docs/INDEX.md for the documentation entry point.
Goals
The project provides a modular foundation for:
- typed symbolic expressions;
- immutable expression DAGs;
- deterministic evaluation;
- rule and pattern-based rewriting;
- exact and arbitrary-precision arithmetic;
- symbolic algebra and calculus;
- numerical computation;
- quantities, dimensions, dates, uncertainty, and missing values;
- computable entity knowledge;
- natural-language interpretation into typed symbolic programs;
- query planning and isolated execution;
- provenance-aware result composition;
- extensible computational domains.
Document map
| Area | Location |
|---|---|
| Product scope | docs/00-overview |
| Requirements | docs/01-requirements |
| Architecture | docs/02-architecture |
| Decisions | docs/03-adrs |
| Domain model | docs/04-domain-model |
| Module specifications | docs/05-modules |
| Interfaces and schemas | docs/06-interfaces |
| Data and ingestion | docs/07-data |
| Security | docs/08-security |
| Testing | docs/09-testing |
| Operations | docs/10-operations |
| Delivery plan | docs/11-delivery |
| Worked examples | docs/12-examples |
| Governance | docs/13-governance |
Repository structure
andy-computable-knowledge/
├── README.md
├── docs/
├── examples/ runnable counterparts to docs/12-examples
├── benchmarks/ BenchmarkDotNet; development-time only
├── src/
│ ├── Andy.CK.Algebra
│ ├── Andy.CK.Calculus
│ ├── Andy.CK.Cli
│ ├── Andy.CK.Domains.Abstractions
│ ├── Andy.CK.Domains.Demographics
│ ├── Andy.CK.Domains.Economics
│ ├── Andy.CK.Domains.Geography
│ ├── Andy.CK.Engine
│ ├── Andy.CK.Entities
│ ├── Andy.CK.Evaluation
│ ├── Andy.CK.Execution
│ ├── Andy.CK.Expressions
│ ├── Andy.CK.Finance
│ ├── Andy.CK.Geometry
│ ├── Andy.CK.Knowledge.Persistence
│ ├── Andy.CK.Knowledge.Provenance
│ ├── Andy.CK.Knowledge.Schema
│ ├── Andy.CK.Knowledge.Store
│ ├── Andy.CK.Language
│ ├── Andy.CK.Numerics
│ ├── Andy.CK.Patterns
│ ├── Andy.CK.Planning
│ ├── Andy.CK.Platform
│ ├── Andy.CK.Presentation
│ ├── Andy.CK.Statistics
│ ├── Andy.CK.Symbols
│ ├── Andy.CK.Time
│ ├── Andy.CK.Units
│ └── Andy.CK.Workers
└── tests/
Twenty-nine packages, none with a runtime dependency.
Two more are named in the design and deliberately absent: Andy.CK.Api awaits
the HTTP surface, and Andy.CK.Knowledge.Ingestion awaits the pipeline of
docs/07-data/01-ingestion-pipeline.md. Andy.CK.Workers — ADR-005's worker
isolation — now exists (the envelope protocol, the sandbox policy, and an
out-of-process host); see the "Not included at 1.0" table above for exactly
what it does and does not enforce. Each remaining gap is a boundary rather
than an omission — see the table above and the open issues.
An earlier plan also named Andy.CK.Types, Andy.CK.Rewriting,
Andy.CK.LinearAlgebra and Andy.CK.Optimization. The first three exist as
capabilities inside Andy.CK.Symbols, Andy.CK.Patterns and Andy.CK.Calculus
respectively, where they turned out to belong; optimization is not implemented at
all.
Recommended implementation sequence
- symbolic substrate;
- evaluator;
- pattern compiler;
- numeric tower;
- algebra and calculus;
- units and time;
- entity knowledge;
- ingestion;
- semantic interpretation;
- planning and execution;
- result composition;
- domain expansion.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Andy.CK.Expressions (>= 1.0.0)
-
net8.0
- Andy.CK.Expressions (>= 1.0.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Andy.CK.Patterns:
| Package | Downloads |
|---|---|
|
Andy.CK.Symbols
Symbol registration, attributes, and definitions (own-values, down-values) for the Andy Computable Knowledge engine. |
|
|
Andy.CK.Evaluation
Fixed-point expression evaluator with held arguments, built-in dispatch, rule application, local scopes, tracing, and budgets for the Andy Computable Knowledge engine. |
|
|
Andy.CK.Planning
Plan DAGs, cost estimation, and cache policy for the Andy Computable Knowledge engine. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 328 | 7/31/2026 |