[ARADR][MS1-D1][DESIGN] Knowledge-representation baseline architecture #385

Open
opened 2026-09-08 01:29:17 +00:00 by nsaspy · 0 comments
Owner

Parent: #411
Consumes: #412 (MS1-R1), prior #398/#392 corpus
Topic: MS1 — Knowledge Representation
Mode: DESIGN ONLY

Pass contract

No new external research was performed for this pass. Every decision below is constrained to evidence already captured by #412 and the prior Machine Spirit corpus. Missing evidence is deferred to MS1-R2.

D1 objective

Define a first coherent Machine Spirit v1 knowledge-representation architecture that:

  • preserves heterogeneous semantics without claiming one universal executable logic;
  • keeps source/assertion/context/provenance distinct;
  • permits open domain vocabularies without converting names into host predicates;
  • distinguishes representation/validation/reasoning/lowering;
  • supports modular theories and future epistemic/procedural layers;
  • keeps canonical semantic history separate from query plans and derived caches;
  • remains usable in prolog-rlm without requiring durable symbolic-memory.

Canonical D1 decisions

D1-01 — One closed semantic kernel, open versioned vocabulary

Machine Spirit v1 uses a closed set of structural semantic constructors plus an open versioned domain vocabulary represented as inert data.

The kernel owns structural concepts such as:

term / symbol / variable / witness
formula / proposition
assertion episode
context / theory
vocabulary/signature
semantic edge/mapping
justification reference
profile declaration
provenance reference

Domain-specific names such as:

person
service
restart
species
maintains
located_in

are data governed by declared signatures/types. Lexical equality with a Prolog predicate, tool, capability, principal, or host action has no execution meaning.

D1-02 — Proposition identity and assertion identity are separate

A proposition/formula represents semantic content. An assertion episode represents a source/context/stance event involving that semantic content.

proposition P
  != source S asserted P
  != source S denied P
  != theory T derived P
  != agent A believes P

Many assertion episodes may reference one proposition. Contradiction/corroboration/history therefore operate over assertion/support records, not by destructively rewriting proposition payloads.

Exact proposition fingerprint normalization is intentionally deferred to MS1-G01/MS1-R2.

D1-03 — Native n-ary proposition/formula algebra; graph triples are an adapter

The canonical internal representation does not force arbitrary semantics into binary RDF triples.

Atomic propositions support native ordered argument vectors. Compound/quantified semantics use a closed formula AST/data algebra.

RDF 1.2/triple-term representation is an interoperability/export/import projection, not the canonical internal shape.

This allows the IR to preserve quantifier/formula structure without requiring ad-hoc RDF reification for every semantic form.

D1-04 — Formula algebra is representational; execution is profile-gated

The closed formula algebra may preserve semantic forms broader than the locally executable fragment.

Support state is explicit:

represented
schema_validated
profile_admitted
query_supported(QueryClass)
lowerable(Target)

represented never implies entailed, decidable, terminating, or executable.

No arbitrary formula is passed to unrestricted call/1, consult/1, or generated host code.

D1-05 — Existential witnesses are first-class scoped semantic terms

The kernel can represent existentially introduced unknowns without inventing global real-world entities.

Conceptually:

witness identity
scope formula/assertion/derivation
type constraints
origin/provenance
identity status

Hard rule:

existential witness != global entity

An explicit later identity assertion/derivation may relate a witness to an entity. It does not mutate the original existential statement.

Which existential reasoning fragment is executable in v1 remains deferred to MS1-G03/MS1-R2.

D1-06 — Context and theory are first-class, not metadata bags or implicit global union

Every material assertion is interpreted in an explicit context/theory scope.

A context identifies semantic viewpoint/scope facets such as source revision, speaker, valid time, scenario, jurisdiction, ontology version, or domain.

A theory identifies a reasoning set: vocabulary/profile declarations plus assertions/rules and explicit module/bridge dependencies.

Context and theory are related but not identical.

Do not materialize a Cartesian product of every context facet. Use opaque stable IDs with normalized facets/relations.

Queries must name or derive an explicit theory/context scope. There is no ambient rule that unions every source into one world theory.

Exact context-composition semantics remain an MS1-G02/MS1-R2 research dependency.

D1-07 — Theory composition uses typed semantic edges

A single generic imports/2 is insufficient for the canonical contract.

The interface supports typed, versioned semantic relationships equivalent to classes such as:

include
reference
translate
bridge
project
query_preserve
conservative_extension

The exact v1 enum may be tightened later, but every edge carries:

source theory/version
target theory/version
mapping/signature refs
claimed compatibility/guarantee class
status
provenance

Compiler/model-proposed mappings are inert candidates until admitted by trusted semantic policy.

Exact checkable guarantee classes remain MS1-G04/MS1-R2 work.

D1-08 — Semantic bridge does not transfer epistemic warrant

The MS1 semantic layer may map proposition/formula/vocabulary/context meaning.

It does not decide whether another theory's conclusion is accepted as supported/warranted/current truth.

semantic mapping
!= epistemic import/admission

MS3 owns epistemic federation/acceptance policy.

D1-09 — Validation is a separate contract from inference

The v1 architecture has an explicit structural/type/schema validation stage over semantic records and packages.

Successful validation means the package satisfies its IR/vocabulary/profile shape contract.

It does not mean:

proposition is true
proposition is entailed
query is supported
procedure is executable
authority is granted

Inference/query/lowering are later profile-specific operations.

D1-10 — Explicit semantic profile contracts

Each theory/package declares versioned semantic profile references rather than relying on one global Prolog interpretation.

A profile contract must eventually declare at least:

accepted constructors
vocabulary/signature restrictions
quantifier/variable restrictions
negation semantics
identity assumptions
context/world assumptions
supported query classes
known decidability/complexity guarantees when available
trusted reasoner/lowerer identity
materialization/incremental capability
explanation capability
compatibility/import rules

D1 does not freeze the final v1 profile inventory. That selection requires later research/design passes, especially MS1-G03/G06.

D1-11 — Three planes are canonical architecture

Keep these separate:

Plane A — Canonical Semantic Plane

Immutable/versioned semantic meaning and source-linked structures:

vocabularies/signatures
terms/formulae/propositions
assertion episodes
contexts/theories
semantic mappings
existential witnesses
materially durable lifecycle/provenance references

Plane B — Deductive Plan Plane

Rebuildable query-specific compilation state:

selected theory slice
profile/backend selection
safe normalized rules
query-demand transforms
solver nodes
freshness/dependency generations
budgets
plan fingerprint

Plane C — Derived State Plane

Rebuildable consequences/caches:

tabled answers
materialized relations/current views
closures
indexes
ordinary intermediate proof structures
query caches

Planes B/C are never canonical semantic truth.

D1-12 — Justification dependency schema is first-class; ordinary proof expansion may be rebuildable

The semantic/reasoning contract can identify a conclusion's supporting rule/premise/assumption/context/profile dependencies.

Alternative derivations are distinct support paths.

The architecture does not require eagerly persisting every expanded proof tree. Durable promoted/material conclusions and externally relied-on decisions must be able to retain replayable justification receipts; ordinary intermediate proof expansion may remain derived/rebuildable.

Exact retention policy remains MS1-G05/MS1-R2 research.

D1-13 — Event/change, temporal, constraints, procedures and defeasible semantics are standard profile families, not hidden kernel execution

The kernel can represent the structural objects needed by specialized semantic profiles, but D1 does not bake one temporal/procedural/default reasoner into every package.

In particular:

event/state/change semantics
interval/time semantics
finite/rational constraint semantics
procedural method/task semantics
default/exception semantics

are profile-level semantic contracts.

A symbolic action or predicted procedure effect remains data until later execution admission.

D1-14 — Frames/object views are projections

Object-centered/frame views may be generated for ergonomics and querying, but they are not a separate hidden semantics.

Slots/defaults/procedural attachments resolve to explicit canonical semantic records/profile semantics rather than callbacks attached to objects.

D1-15 — Storage ownership remains split

prolog-rlm owns:

semantic algebra/schema
validation
profile contracts
safe reasoner/lowerer interfaces
in-memory package/query semantics
conformance semantics

symbolic-memory may own:

durable append-only source/semantic history
frontiers/cuts
durable identity/provenance/dependence indexes
projection/cache lifecycle
rebuild/replay persistence

Dependency remains one-way:

symbolic-memory -> prolog-rlm
prolog-rlm -/-> symbolic-memory

The semantic library must operate without a persistent memory service installed.

D1 conceptual package model

This is an interface sketch, not implementation authorization and not final predicate naming:

SemanticPackage
  schema_version
  vocabulary_versions[]
  semantic_profiles[]
  contexts[]
  theories[]
  terms[]
  formulae/propositions[]
  assertions[]
  witnesses[]
  theory_edges[]
  provenance_refs[]
  lifecycle_refs[]
  package_fingerprint

Query/lowering consumes a package plus explicit theory/profile/query/options and produces a separate deductive plan/result/receipt rather than mutating the package.

Invariants exported to downstream topics

proposition != assertion episode
source assertion != unqualified world warrant
semantic mapping != epistemic warrant transfer
witness != entity
semantic action != host capability
predicted effect != observation
procedure knowledge != plan instance
schema-valid != entailed
represented != executable
canonical semantic plane != deductive plan != derived cache
context/theory scope != global source union

D1 acceptance criteria for the eventual implementation

These are design requirements, not claims that tests exist today.

  • One proposition can be referenced by multiple source/context assertion episodes without destructive overwrite.
  • Explicit denial and absence can be represented separately.
  • A quantified/existential statement round-trips without inventing an identified entity.
  • An unfamiliar domain relation remains inert data and cannot resolve to a host predicate by name.
  • A package may be valid/representable while unsupported for local entailment/lowering.
  • Context-scoped/hypothetical/source assertions cannot leak into an unqualified theory through implicit global union.
  • Theory mappings carry explicit status/provenance/claimed guarantee.
  • Semantic mapping alone cannot establish epistemic warrant.
  • Query compilation/derived tables can be discarded and rebuilt without rewriting canonical semantics.
  • Canonical package operations work without symbolic-memory installed.

Research gaps deferred to MS1-R2

D1 does not research or resolve the following:

  • MS1-G01: exact canonical formula/proposition fingerprint equivalence;
  • MS1-G02: context/microtheory composition semantics and tractable implementation envelopes;
  • MS1-G03: first executable existential-rule fragment and benchmark envelope;
  • MS1-G04: practical/checkable module/bridge guarantee classes;
  • MS1-G05: durable vs rebuildable justification/provenance retention boundary;
  • MS1-G06: safe cross-profile composition semantics;
  • MS1-G07: measured scale evidence.

Additional design-discovered research questions:

MS1-G08 — Kernel/profile boundary minimization

Research whether event/time/procedural structural constructors belong in the universal kernel or can remain wholly extension-profile vocabulary without harming interoperability/fingerprints.

MS1-G09 — Canonical serialization / schema-evolution evidence

Research deterministic serialization/versioning approaches that preserve fingerprints and historical interpretability across schema evolution without conflating semantic equality with byte identity.

D1 checkpoint

PASS: MS1-D1
MODE: DESIGN
STATUS: COMPLETE
NEW EXTERNAL RESEARCH: NONE
CANONICAL BASELINE DESIGN: ESTABLISHED
IMPLEMENTATION CHANGED: NO
NEXT NORMAL PASS: MS1-R2 (RESEARCH ONLY)
RESEARCH QUEUE: MS1-G01..MS1-G09
Parent: #411 Consumes: #412 (MS1-R1), prior #398/#392 corpus Topic: MS1 — Knowledge Representation Mode: **DESIGN ONLY** ## Pass contract No new external research was performed for this pass. Every decision below is constrained to evidence already captured by #412 and the prior Machine Spirit corpus. Missing evidence is deferred to MS1-R2. # D1 objective Define a first coherent Machine Spirit v1 knowledge-representation architecture that: - preserves heterogeneous semantics without claiming one universal executable logic; - keeps source/assertion/context/provenance distinct; - permits open domain vocabularies without converting names into host predicates; - distinguishes representation/validation/reasoning/lowering; - supports modular theories and future epistemic/procedural layers; - keeps canonical semantic history separate from query plans and derived caches; - remains usable in `prolog-rlm` without requiring durable `symbolic-memory`. # Canonical D1 decisions ## D1-01 — One closed semantic kernel, open versioned vocabulary Machine Spirit v1 uses a **closed set of structural semantic constructors** plus an **open versioned domain vocabulary represented as inert data**. The kernel owns structural concepts such as: ```text term / symbol / variable / witness formula / proposition assertion episode context / theory vocabulary/signature semantic edge/mapping justification reference profile declaration provenance reference ``` Domain-specific names such as: ```text person service restart species maintains located_in ``` are data governed by declared signatures/types. Lexical equality with a Prolog predicate, tool, capability, principal, or host action has no execution meaning. ## D1-02 — Proposition identity and assertion identity are separate A proposition/formula represents semantic content. An assertion episode represents a source/context/stance event involving that semantic content. ```text proposition P != source S asserted P != source S denied P != theory T derived P != agent A believes P ``` Many assertion episodes may reference one proposition. Contradiction/corroboration/history therefore operate over assertion/support records, not by destructively rewriting proposition payloads. Exact proposition fingerprint normalization is intentionally deferred to MS1-G01/MS1-R2. ## D1-03 — Native n-ary proposition/formula algebra; graph triples are an adapter The canonical internal representation does **not** force arbitrary semantics into binary RDF triples. Atomic propositions support native ordered argument vectors. Compound/quantified semantics use a closed formula AST/data algebra. RDF 1.2/triple-term representation is an interoperability/export/import projection, not the canonical internal shape. This allows the IR to preserve quantifier/formula structure without requiring ad-hoc RDF reification for every semantic form. ## D1-04 — Formula algebra is representational; execution is profile-gated The closed formula algebra may preserve semantic forms broader than the locally executable fragment. Support state is explicit: ```text represented schema_validated profile_admitted query_supported(QueryClass) lowerable(Target) ``` `represented` never implies `entailed`, `decidable`, `terminating`, or `executable`. No arbitrary formula is passed to unrestricted `call/1`, `consult/1`, or generated host code. ## D1-05 — Existential witnesses are first-class scoped semantic terms The kernel can represent existentially introduced unknowns without inventing global real-world entities. Conceptually: ```text witness identity scope formula/assertion/derivation type constraints origin/provenance identity status ``` Hard rule: ```text existential witness != global entity ``` An explicit later identity assertion/derivation may relate a witness to an entity. It does not mutate the original existential statement. Which existential reasoning fragment is executable in v1 remains deferred to MS1-G03/MS1-R2. ## D1-06 — Context and theory are first-class, not metadata bags or implicit global union Every material assertion is interpreted in an explicit context/theory scope. A **context** identifies semantic viewpoint/scope facets such as source revision, speaker, valid time, scenario, jurisdiction, ontology version, or domain. A **theory** identifies a reasoning set: vocabulary/profile declarations plus assertions/rules and explicit module/bridge dependencies. Context and theory are related but not identical. Do not materialize a Cartesian product of every context facet. Use opaque stable IDs with normalized facets/relations. Queries must name or derive an explicit theory/context scope. There is no ambient rule that unions every source into one world theory. Exact context-composition semantics remain an MS1-G02/MS1-R2 research dependency. ## D1-07 — Theory composition uses typed semantic edges A single generic `imports/2` is insufficient for the canonical contract. The interface supports typed, versioned semantic relationships equivalent to classes such as: ```text include reference translate bridge project query_preserve conservative_extension ``` The exact v1 enum may be tightened later, but every edge carries: ```text source theory/version target theory/version mapping/signature refs claimed compatibility/guarantee class status provenance ``` Compiler/model-proposed mappings are inert candidates until admitted by trusted semantic policy. Exact checkable guarantee classes remain MS1-G04/MS1-R2 work. ## D1-08 — Semantic bridge does not transfer epistemic warrant The MS1 semantic layer may map proposition/formula/vocabulary/context meaning. It does not decide whether another theory's conclusion is accepted as supported/warranted/current truth. ```text semantic mapping != epistemic import/admission ``` MS3 owns epistemic federation/acceptance policy. ## D1-09 — Validation is a separate contract from inference The v1 architecture has an explicit structural/type/schema validation stage over semantic records and packages. Successful validation means the package satisfies its IR/vocabulary/profile shape contract. It does **not** mean: ```text proposition is true proposition is entailed query is supported procedure is executable authority is granted ``` Inference/query/lowering are later profile-specific operations. ## D1-10 — Explicit semantic profile contracts Each theory/package declares versioned semantic profile references rather than relying on one global Prolog interpretation. A profile contract must eventually declare at least: ```text accepted constructors vocabulary/signature restrictions quantifier/variable restrictions negation semantics identity assumptions context/world assumptions supported query classes known decidability/complexity guarantees when available trusted reasoner/lowerer identity materialization/incremental capability explanation capability compatibility/import rules ``` D1 does **not** freeze the final v1 profile inventory. That selection requires later research/design passes, especially MS1-G03/G06. ## D1-11 — Three planes are canonical architecture Keep these separate: ### Plane A — Canonical Semantic Plane Immutable/versioned semantic meaning and source-linked structures: ```text vocabularies/signatures terms/formulae/propositions assertion episodes contexts/theories semantic mappings existential witnesses materially durable lifecycle/provenance references ``` ### Plane B — Deductive Plan Plane Rebuildable query-specific compilation state: ```text selected theory slice profile/backend selection safe normalized rules query-demand transforms solver nodes freshness/dependency generations budgets plan fingerprint ``` ### Plane C — Derived State Plane Rebuildable consequences/caches: ```text tabled answers materialized relations/current views closures indexes ordinary intermediate proof structures query caches ``` Planes B/C are never canonical semantic truth. ## D1-12 — Justification dependency schema is first-class; ordinary proof expansion may be rebuildable The semantic/reasoning contract can identify a conclusion's supporting rule/premise/assumption/context/profile dependencies. Alternative derivations are distinct support paths. The architecture does not require eagerly persisting every expanded proof tree. Durable promoted/material conclusions and externally relied-on decisions must be able to retain replayable justification receipts; ordinary intermediate proof expansion may remain derived/rebuildable. Exact retention policy remains MS1-G05/MS1-R2 research. ## D1-13 — Event/change, temporal, constraints, procedures and defeasible semantics are standard profile families, not hidden kernel execution The kernel can represent the structural objects needed by specialized semantic profiles, but D1 does not bake one temporal/procedural/default reasoner into every package. In particular: ```text event/state/change semantics interval/time semantics finite/rational constraint semantics procedural method/task semantics default/exception semantics ``` are profile-level semantic contracts. A symbolic action or predicted procedure effect remains data until later execution admission. ## D1-14 — Frames/object views are projections Object-centered/frame views may be generated for ergonomics and querying, but they are not a separate hidden semantics. Slots/defaults/procedural attachments resolve to explicit canonical semantic records/profile semantics rather than callbacks attached to objects. ## D1-15 — Storage ownership remains split `prolog-rlm` owns: ```text semantic algebra/schema validation profile contracts safe reasoner/lowerer interfaces in-memory package/query semantics conformance semantics ``` `symbolic-memory` may own: ```text durable append-only source/semantic history frontiers/cuts durable identity/provenance/dependence indexes projection/cache lifecycle rebuild/replay persistence ``` Dependency remains one-way: ```text symbolic-memory -> prolog-rlm prolog-rlm -/-> symbolic-memory ``` The semantic library must operate without a persistent memory service installed. # D1 conceptual package model This is an interface sketch, not implementation authorization and not final predicate naming: ```text SemanticPackage schema_version vocabulary_versions[] semantic_profiles[] contexts[] theories[] terms[] formulae/propositions[] assertions[] witnesses[] theory_edges[] provenance_refs[] lifecycle_refs[] package_fingerprint ``` Query/lowering consumes a package plus explicit theory/profile/query/options and produces a separate deductive plan/result/receipt rather than mutating the package. # Invariants exported to downstream topics ```text proposition != assertion episode source assertion != unqualified world warrant semantic mapping != epistemic warrant transfer witness != entity semantic action != host capability predicted effect != observation procedure knowledge != plan instance schema-valid != entailed represented != executable canonical semantic plane != deductive plan != derived cache context/theory scope != global source union ``` # D1 acceptance criteria for the eventual implementation These are design requirements, not claims that tests exist today. - One proposition can be referenced by multiple source/context assertion episodes without destructive overwrite. - Explicit denial and absence can be represented separately. - A quantified/existential statement round-trips without inventing an identified entity. - An unfamiliar domain relation remains inert data and cannot resolve to a host predicate by name. - A package may be valid/representable while unsupported for local entailment/lowering. - Context-scoped/hypothetical/source assertions cannot leak into an unqualified theory through implicit global union. - Theory mappings carry explicit status/provenance/claimed guarantee. - Semantic mapping alone cannot establish epistemic warrant. - Query compilation/derived tables can be discarded and rebuilt without rewriting canonical semantics. - Canonical package operations work without symbolic-memory installed. # Research gaps deferred to MS1-R2 D1 does not research or resolve the following: - **MS1-G01:** exact canonical formula/proposition fingerprint equivalence; - **MS1-G02:** context/microtheory composition semantics and tractable implementation envelopes; - **MS1-G03:** first executable existential-rule fragment and benchmark envelope; - **MS1-G04:** practical/checkable module/bridge guarantee classes; - **MS1-G05:** durable vs rebuildable justification/provenance retention boundary; - **MS1-G06:** safe cross-profile composition semantics; - **MS1-G07:** measured scale evidence. Additional design-discovered research questions: ### MS1-G08 — Kernel/profile boundary minimization Research whether event/time/procedural structural constructors belong in the universal kernel or can remain wholly extension-profile vocabulary without harming interoperability/fingerprints. ### MS1-G09 — Canonical serialization / schema-evolution evidence Research deterministic serialization/versioning approaches that preserve fingerprints and historical interpretability across schema evolution without conflating semantic equality with byte identity. # D1 checkpoint ```text PASS: MS1-D1 MODE: DESIGN STATUS: COMPLETE NEW EXTERNAL RESEARCH: NONE CANONICAL BASELINE DESIGN: ESTABLISHED IMPLEMENTATION CHANGED: NO NEXT NORMAL PASS: MS1-R2 (RESEARCH ONLY) RESEARCH QUEUE: MS1-G01..MS1-G09 ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/prolog-rlm#385
No description provided.