Skip to content

Commit

Permalink
doc/ref/impl: fix order of arguments in δ partial feature function
Browse files Browse the repository at this point in the history
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 <[email protected]>
Change-Id: I8fad8938affb611032e3a39ff344fbf056cc2834
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1197344
Reviewed-by: Marcel van Lohuizen <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
  • Loading branch information
cuematthew committed Jul 8, 2024
1 parent dbe24df commit 4eecacd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/ref/impl.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4eecacd

Please sign in to comment.