aboutsummaryrefslogtreecommitdiffstats
path: root/docs/sakura-RNT-integration.org
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docs/sakura-RNT-integration.org49
1 files changed, 49 insertions, 0 deletions
diff --git a/docs/sakura-RNT-integration.org b/docs/sakura-RNT-integration.org
index 8207ee5..2df3892 100644
--- a/docs/sakura-RNT-integration.org
+++ b/docs/sakura-RNT-integration.org
@@ -778,6 +778,55 @@ elaboration (fresh variable plus flat conjunct). The privilege must
be explicit and queryable, never assumed from position. Until a real
program hurts without it, it is not built.
+* Decision 15: Relation References Are a Term Kind, Written #Name
+
+** The decision
+
+A relation reference is a first-class ground value denoting a
+relation by name, written with the Smalltalk symbol notation:
+
+#+BEGIN_SRC sol
+[Insert relation: #Person tuple: {name: "Ana" age: 12} before: S after: S2]
+#+END_SRC
+
+It is a new lexical kind, distinct from variables, strings, and
+propositions. A reference denotes the *catalog entry* resolved at a
+state, not an extension: two states where =Person= holds different
+tuples share the reference. Wherever a relation must appear as data,
+the reference is the value: transition arguments, higher-order
+arguments (=[Map relation: #Increment ...]=), and the attributes of
+the catalog relations themselves (decision 11).
+
+** The alternatives rejected
+
+- *Strings* (=relation: "Person"=): a conflation. The text and the
+ relation are different things with different semantics; a string
+ is inert, a reference resolves against a catalog at a state.
+ Identity is not representation (decision 12's own diagnosis).
+- *Context-resolved atoms* (=relation: Person= with the loader
+ special-casing certain argument positions): position-dependent
+ meaning of one spelling, the exact dishonesty the delimiter law
+ forbids, over an open set of special positions.
+
+** What it buys
+
+- P1 (honesty). Different semantics get a visibly different form.
+- P2 (decision 11). "You may only insert into a relation that
+ exists" stops being transition machinery and becomes an ordinary
+ foreign key into the catalog, checked at the =before:= state.
+- P3 (higher-order, grounded). A reference variable ranges over the
+ catalog, and the catalog is finite: an unbound relation variable
+ is *bounded generation*, admissible like =Between=. The
+ specification's higher-order restriction becomes ordinary
+ cardinality analysis instead of a prohibition.
+
+** Acknowledged costs
+
+- A new lexical category through the whole pipeline: token, term
+ and pattern kind, checker leaf, printing.
+- The resolution semantics (reference = name resolved through the
+ catalog of a state) must be respected by every world.
+
* Consequences for the Pending Documents
- =docs/core-design-and-pipeline.org= must treat transition relations