Skip to content

Commit 0166d88

Browse files
evoxtormHitesh Joshi
andauthored
Update Documentation to use new expression terminology (#5890)
# Changes ## Terminology Updates This PR updates documentation to align with the expression phase terminology changes introduced in [#2964](#2964): * **"symbolic value" → "symbolic constant"**: Updated all remaining instances using find-and-replace ## Scope of Changes * Focused on documentation that predates the July 2023 terminology change * Used git blame history to identify instances likely using the old "constant" definition * Manually reviewed each "constant" usage to distinguish between: - New definition (unchanged): the broader category including symbolic constants Closes [#5599](#5599) --------- Co-authored-by: Hitesh Joshi <[email protected]>
1 parent 47081be commit 0166d88

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

docs/design/expressions/member_access.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ generic parameter, or in fact any
335335
[compile-time binding](/docs/design/generics/terminology.md#bindings), the
336336
lookup is performed from a context where the value of that binding is unknown.
337337
Evaluation of an expression involving the binding may still succeed, but will
338-
result in a symbolic value involving that binding.
338+
result in a symbolic constant involving that binding.
339339

340340
```carbon
341341
class GenericWrapper(T:! type) {

docs/design/generics/appendix-rewrite-constraints.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ fn F[T:! C](x: T) {
363363
```
364364

365365
When looking up the name `N`, if `C` is an interface `I` and `N` is the name of
366-
an associated constant in that interface, the result is a symbolic value
366+
an associated constant in that interface, the result is a symbolic constant
367367
representing "the member `N` of `I`". If `C` is formed by combining interfaces
368368
with `&`, all such results are required to find the same associated constant,
369369
otherwise we reject for ambiguity.
@@ -439,7 +439,7 @@ is discussed later.
439439
### Type substitution
440440

441441
At various points during the type-checking of a Carbon program, we need to
442-
substitute a set of (binding, value) pairs into a symbolic value. We saw an
442+
substitute a set of (binding, value) pairs into a symbolic constant. We saw an
443443
example above: substituting `Self = W` into the type `A where .(A.T) = Self.U`
444444
to produce the value `A where .(A.T) = W.U`. Another important case is the
445445
substitution of inferred parameter values into the type of a function when
@@ -504,14 +504,14 @@ fn J[V:! A where .T = K](y: V) {
504504
}
505505
```
506506

507-
The values being substituted into the symbolic value are themselves already
507+
The values being substituted into the symbolic constant are themselves already
508508
fully substituted and resolved, and in particular, satisfy property 1 given
509509
above.
510510

511-
Substitution proceeds by recursively rebuilding each symbolic value, bottom-up,
512-
replacing each substituted binding with its value. Doing this naively will
513-
propagate values like `i32` in the `F`/`G` case earlier in this section, but
514-
will not propagate rewrite constants like in the `H`/`J` case. The reason is
511+
Substitution proceeds by recursively rebuilding each symbolic constant,
512+
bottom-up, replacing each substituted binding with its value. Doing this naively
513+
will propagate values like `i32` in the `F`/`G` case earlier in this section,
514+
but will not propagate rewrite constants like in the `H`/`J` case. The reason is
515515
that the `.T = K` constraint is in the _type_ of the substituted value, rather
516516
than in the substituted value itself: deducing `T = i32` and converting `i32` to
517517
the type `C` of `T` preserves the value `i32`, but deducing `U = V` and

docs/design/generics/details.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ checked-generic function.
775775

776776
A checked-generic caller of a checked-generic function performs the same
777777
substitution process to determine the return type, but the result may be a
778-
symbolic value. In this example of calling a checked generic from another
778+
symbolic constant. In this example of calling a checked generic from another
779779
checked generic,
780780

781781
```carbon

docs/design/generics/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ kind of parameter is defined using a different syntax: a checked parameter is
373373
uses a symbolic binding pattern, a template parameter uses a template binding
374374
pattern, and a regular parameter uses a runtime binding pattern. Likewise, it's
375375
allowed to pass a symbolic or template constant value to a checked or regular
376-
parameter. _We have decided to support passing a symbolic value to a template
376+
parameter. _We have decided to support passing a symbolic constant to a template
377377
parameter, see
378378
[leads issue #2153: Checked generics calling templates](https://github.com/carbon-language/carbon-lang/issues/2153),
379379
but incorporating it into the design is future work._

toolchain/check/testdata/deduce/symbolic_facets.carbon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// By placing each interface inside a generic class, a facet type refering to
1414
// the interface becomes symbolic. Normally they would be concrete. This can
15-
// affect decisions in deduce which unwraps symbolic values, but still needs to
15+
// affect decisions in deduce which unwraps symbolic constants, but still needs to
1616
// ensure they convert correctly.
1717

1818
// --- fail_missing_interface.carbon

toolchain/check/testdata/impl/lookup/symbolic_lookup.carbon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ interface Z(T:! type) {
5959
let X:! type;
6060
}
6161

62-
// This impl has a rewrite to a symbolic value, and the `.Self` type has a
62+
// This impl has a rewrite to a symbolic constant, and the `.Self` type has a
6363
// dependency on a generic parameter.
6464
final impl forall [T:! type, S:! type] T as Z(S) where .X = T {}
6565

toolchain/check/type_structure.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class TypeStructure : public Printable<TypeStructure> {
166166
llvm::SmallVector<ConcreteType>::const_iterator& lhs_concrete_cursor,
167167
llvm::SmallVector<Structural>::const_iterator& rhs_cursor) -> bool;
168168

169-
// The structural position of concrete and symbolic values in the type.
169+
// The structural position of concrete and symbolic constants in the type.
170170
llvm::SmallVector<Structural> structure_;
171171

172172
// Indices of the symbolic entries in structure_.
@@ -179,7 +179,7 @@ class TypeStructure : public Printable<TypeStructure> {
179179

180180
// Constructs the TypeStructure for a self type or facet value and an interface
181181
// constraint (e.g. `Iface(A, B(C))`), which represents the location of unknown
182-
// symbolic values in the combined signature and which is ordered by them.
182+
// symbolic constants in the combined signature and which is ordered by them.
183183
//
184184
// Given `impl C as Z {}` the `self_const_id` would be a `C` and the interface
185185
// constraint would be `Z`.

0 commit comments

Comments
 (0)