From 4eecacdbc5212ff32d5438f6f03029f816deabc7 Mon Sep 17 00:00:00 2001 From: Matthew Sackman Date: Mon, 8 Jul 2024 11:02:50 +0100 Subject: [PATCH] =?UTF-8?q?doc/ref/impl:=20fix=20order=20of=20arguments=20?= =?UTF-8?q?in=20=CE=B4=20partial=20feature=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous text, quite possibly copied verbatim from upstream sources, defined δ as being Label x Q -> Q but in several places used it as Q x Label -> Q. To me, this use is the more intuitive API. - Updated the definition to match the use. - Added a few extra words around paths to add clarity too. Signed-off-by: Matthew Sackman Change-Id: I8fad8938affb611032e3a39ff344fbf056cc2834 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1197344 Reviewed-by: Marcel van Lohuizen TryBot-Result: CUEcueckoo Unity-Result: CUE porcuepine --- doc/ref/impl.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/ref/impl.md b/doc/ref/impl.md index b7c4260ec58..d61b8a46229 100644 --- a/doc/ref/impl.md +++ b/doc/ref/impl.md @@ -95,19 +95,19 @@ is associated with a constraint. > 1. `q0 ∈ Q`, is the root node, > 1. `υ: Q → T` is the total node typing function, > for a finite set of possible terms `T`. -> 1. `δ: Label × Q → Q` is the partial feature function, +> 1. `δ: Q × Label → Q` is the partial feature function, > > subject to the following conditions: > > 1. there is no node `q` or label `l` such that `δ(q, l) = q0` (root) > 2. for every node `q` in `Q` there is a path `π` (i.e. a sequence of > members of Label) such that `δ(q0, π) = q` (unique root, correctness) -> 3. there is no node `q` or path `π` such that `δ(q, π) = q` (no cycles) +> 3. there is no node `q` or non-empty path `π` such that `δ(q, π) = q` (no cycles) > > where `δ` is extended to be defined on paths as follows: > > 1. `δ(q, ϵ) = q`, where `ϵ` is the empty path -> 2. `δ(q, l∙π) = δ(δ(l, q), π)` +> 2. `δ(q, l∙π) = δ(δ(q, l), π)` > > The _substructures_ of a typed feature structure are the > typed feature structures rooted at each node in the structure.