...elicits the Set matching the String values of all Names in the environment.
Name[nam, expr] is a SimpleAssignment.
Name[nam[Type[arg1,
test1], Type[arg2,
test2],...], expr]
...is a Name elicitation
assignment that inserts SubstitutionNames
arg1 and arg2 into expr.
Similarly,
Name[nam[Type[arg, Branch[...patN, doN, ...]]], expr]
...is a concise
way to branch according to a Name's argument Pattern.
See TypeBranch.
(Even if nam (a Name)
does not appear as the Head in "head[arg1,
arg2...]"),
the following...
Name[nam][head[arg1, arg2...], expr]
...associates "head[arg1, arg2...]" with nam's definition provided nam is somewhere in the elicitation.
Reckon[Name][nam]
returns nam's definition.
Name[Function] is assigned to the NewNameFunction.
See the English
definition for "name" or "symbol".
In addition to the above elicitations, a Name can be given Attributes.
This is done be assigning values, usually Boolean, to forms like the following:
Name[nam[atrib]]
Where atrib is a Name Attribute and nam is some Name. Currently there are 4 Name Attributes:
A Name enforces a syntax on its argument(s) if it has the "Pattern" Attribute.
A Name is protected or it is reassignable depending on its "Set" Attribute.
A Name's Definition may be read or not depending on its "Reckon" Attribute.
All Name's elicitated assignment can be disabled by giving it the "Noop" Attribute.
A Name is a basic Type.
Every Name has a containing Context.
A LocalName is a Name's representation without any Contextual reference.
If the CurrentContext matches a Name's Context, then the LocalName is adequate to identify the Name. Otherwise, the String representation of a Name must include its Context, or a means of indicating or choosing the Name's Context. This can be done in many ways, but all these ways must finally generate a Name[String] Expression...
The Character parsing rules applied to a String when it is Reckoned into an Expression, are determined by the RuleList associated with the CharacterSet of the String's Characters. The ContextMark (the first element in ParaPuncs sublist) is the copula between ContextNames and the LocalName.
The FullName,
cntxt1`cntxt2`...`localName
...is stored internally as a NameString with the following structure...
(1) Name[String]["cntxt1", "cntxt2",..., "localName"]
The above form is invoked by the ContextMark when
it encounters a FullName.
Each subName string
conforms to the limitations
on any Name's characters.
All recognized symbols in Grok32` are called Names. The String-value of a Name must begin with a Letter, followed by any sequence of Letters or Digits. A FullName uses the ContextMark to separate ContextNames from the LocalName.
All recognized Names and their assignments, define the Grok32` programming environment.
By contrast, ContextNames
or StreamNames
are both Strings that
name objects through their respective keywords (Context or Stream).
ContextNames
and StreamNames
are not independently interpretable Names.
A Name is a recognizable
and assignable symbol
in the environment.
In addition to the Grok32`
Names, other names, are reckoned as String arguments.
Name[] is the
Set containing the String values of all Names in the environment.
Name[] matches all NameStrings.
For example,
Name[]["Set"]
...returns True. (Because "Set" is one of the Grok32` keywords.)
Each Name is all or part of an elicitation form associated with the Name.
A simple
expression,
is unassigned or atomic.
(2)
Name[nam, expr]
...assigns the elicitation form, nam, to the Expression, expr. This form is called a simple name assignment.
(3) Name[nam[arg1, arg2, ...], expr]
...assigns expr with the elicitation form nam[arg1, arg2, ...] and associates this assignment with the symbol, "nam". Type[v, test] constructs may be used amongst the arguments, (arg1, arg2, ...), to declare substitution names in expr.
The String value of a Name, (assigned in the first argument of "Name[_ , _ ]"), cannot start with a Digit. Otherwise, any Letter or Digit sequence will do.
Upper and lower-case letters are distinguished.
A Name's String value may have a 128-character
ASCII
(string) equivalent.
See CharacterSet.
Each Name is in (or belongs to) a Context.
When a Name is referred to with its containing Context prefixed to its String, then the Name is a FullName. A FullName can also be specified using the StringName. For example, Cardinal is a keyword in the "`Number`" context. Thus, the FullName for Cardinal is Number`Cardinal or String[Name]["Number", "Cardinal"].
The following is a Name Association:
(4) Name[nam][hed[arg1, arg2,...], expr]
...assigns expr, to the elicitation, "hed[arg1, arg2,...]", and associates this definition with the Name, nam, which must appear somewhere in the elicitation form, "hed[arg1, arg2,...]".
If nam does not appear anywhere in the elicitation (2nd argument in the Name declaration in (4)), it is an error.
If nam is some Name, then...
(5) Reckon[Name][nam]
...returns each elicitation form associated
with nam, in order of precedence.
The returned expression
is nam's definition.
Names
may have attributes.
The Attributes affect the
way the Name[...] keyword executes
elicitations. Attribute elicitations (See (6)),
or assignments
(See (7)), have a form that reflects the primacy of Name[...] in the Attribute's definition.
A symbol's
Attributes determine the way
it will be reckoned.
If atrib is the Name of an Attribute given to the Name, sym, then the form...
(6) Name[sym[atrib]]
...elicits sym's "atrib"-Attribute value. An Attribute is assigned (True) using the assignment:
(7) Name[sym][Name[sym[atrib]], True]
The above "Name Associate"-construct is necessary because an Attribute is elicitated with a single argument Name[sym[_]]-construct, that is part of sym's definition (not Name's ). There are currently four Attributes defined with this Language Specification. All effect the way a Name with the particular Attribute is interpreted. Currently, there are four Name Attributes that are the possible values for "atrib" in (7):
(8) NameAttributes: {Pattern, Set, Reckon, Noop}
These are all Boolean. In addition to these, Time stores process attributes. (See Timed Evaluation.)
Some Expressions require conformance to specific elicitation forms. A Name may enforce a syntax on its argument(s) by assigning "Name[sym[Pattern]]" to "True". Such a Name's elicitation forms will only influence the environment when and if the Name is successfully invoked. Such a syntax-enforcing Name is said to have the "Pattern" Attribute.
A Name is protected or it is reassignable depending on its "Set" Attribute.
Assigning "Name[sym[Set]]" to "True", gives sym the "Set" Attribute.
A Name's definition may be read or not depending on its "Reckon" Attribute.
By default, "Name[sym[Reckon]]" is True for any new Name. If "Name[sym[Reckon]]" is False, sym's definition will not be available.
A Name elicitation with the "Noop" Attribute, does not execute its assignment and returns unchanged.
A Name disabled by the "Noop" Attribute, does not evaluate any elicitation.
Assigning Name[elicit[Noop]] to True disables everything matching elicit.
When a Name's arguments must conform to a mandatory syntax imposed by its elicitation forms, it is assigned the "Pattern" Attribute.
For some Name, sym, if...
(9) Name[sym[Pattern]]
...is True, then sym enforces a syntax through its elicitation form. sym's elicitation form must be obeyed or the larger String containing "sym" will not be parsed as an Expression. Furthermore, the process of eliciting sym cannot change the environment by any residual Name assignment. Any sym, with the Pattern Attribute, that reassigns a non-temporary Name during sym's elicitation, will generate an error. Thus a Name with the Pattern Attribute cannot produce any side-effects unless it is successfully elicited. In this way, a Name can enforce its syntax without unintended consequences.
If (9) False, or if the Pattern Attribute is unassigned, sym's elicitation form is not considered until after the input String has been successfully translated into an ExpressionBranch structure. If (9) is True, sym's elicitation form is confirmed before it is reckoned into its ExpressionBranch structure.
For example, Slot has the Pattern Attribute.
This means that every Slot Head with brackets
either has no argument, (indicating the whole input), or the Slot has one or more arguments.
In this case when this Slot-with-bracketed-argument
is parsed, it expects the argument to be one of the following:
This syntax is structured by Slot's elicitation form. By giving Slot the Pattern Attribute, "Sequence[i1, i2]" is interpreted as an indexed SlotSequence within Slot's brackets. If Slot did not have the Pattern Attribute, SlotSpecifications would lose their definition when the "Sequence[i1, i2]" subExpression merges into its containing List or Sequence (as required by Sequence's normal behavior).
If sym is any Name, then by default,
(10) Name[sym[Set]]
...is unassigned. Consequently, values may be assigned to sym without restriction. This will also be true, if sym has the Set Attribute assigned as follows:
Name[sym][Name[sym[Set]], False]
If, on the other hand,
Name[sym][Name[sym[Set]], True]
...then sym is protected, and any attempt to assign values to it will generate an error.
If sym is any Name, then by default,
(11) Name[sym[Reckon]]
...is unassigned. Consequently,
(12) Reckon[Name][sym]
...returns sym's definition (if there is one). Also, sym has this Reckon Attribute if (11) is assigned to True. By contrast, the assignment...
Name[sym][Name[sym[Reckon]], False]
...will make sym's definition unavailable. In other words, sym will be protected.
Any Name or elicitation form can be disabled with the Noop attribute, so that it returns the elicitation unchanged. If elicit is any Name, then if,
(13) Name[elicit[Noop]]
...is True, then elicit is disabled. Any elicitation in elicit's definition returns unevaluated. Thus, elicit behaves as if it has no assignment, even though True[elicit] is False. By contrast, the following attribute assignment...
(14) Name[elicit][Name[elicit[Noop]], False]
...makes elicit return assignments as it normally would (with no assigned Noop attribute).
When a Time-limited evaluation, (E.G. "Time[t][expr]"), is invoked, it returns an elicitation for the process,
(15) Time[Return[n]]
...uniquely identified by the Cardinal n. If...
...is True, process-n is currently executing. If (16) is False, process-n is a halted process.
If "Name[n[Time]]" is unassigned, then (15) has finished! Specifically...
...is False until process-n is complete.
These numbered processes are associated with the Time keyword. See "Time[t][expr]".
In Grok32`, language processing occurs whenever an Expression is Reckoned, Computed, Compiled or Functions. In all cases, NameRecognition is central.
Expressions are interpreted very differently in Reckon[...] versus the way a Function[...] is executed exhaustively.
When an Expression is Reckoned, (or executed in the sense that a Function executes its body), it is compared with elicitation forms which match in the CurrentContext or match in another Context on the ContextSequence. If there is a matching elicitation form, the substitutions, if any, are made (according to the requirements of the Type[_,_] constructions). The elicitation's assignment is returned with these substitutions. No further evaluation is made unless the elicitation's assignment is wrapped in a Reckon[...], Function[...], Compile[...], or Compute[...].
Reckon[expr] performs NameRecognition on the elicitations on-the-face of expr.
Specifically, the assignment of every Elicitation Form recognized on-the-face of expr is returned.
This "assignment" is returned in its literal form, or,
...if the "assignment" has Head (matching one of: {Compile, Reckon, Function, Compute}):
Compile[args...] ...then perform the indicated compilation.
Reckon[args...] ...then interpret "args...".
Function[body] ...then execute body exhaustively.
Compute[args...] ...then Compute[args...].
The above 4 exceptions to Reckon's rule of simply returning parameterized Name assignments, means that Reckon can invoke exhaustive program execution. If a Named elicitation's assignment is headed by Compile, Function or Compute, that assignment will be fully executed when the elicitation is Reckoned. Otherwise, Reckon[...] returns a Named elicitation's assignment with parameters substituted, but otherwise in an unevaluated form. By contrast, Function[body][input] installs input using "Slot[...]"s within body, to exhaustively interpret all subExpression elicitation forms to create the returned Expression.
The advantage of limited elicitation in
Reckon[...]-constructs, is that linguistic and semantic
identities can be applied to Expressions to facilitate
SymbolProcessing. Algebraic,
trigonometric, differential, together with linguistic and language translation
systems are all SymbolProcessing
applications. The fact that the above 4 exceptions are tokens for Reckoning purposes
means that Expressions
used in SymbolProcessing algorithms
will specifically want to avoid using Compile, Function or Compute.
Any symbolic-processing-system that applies rules and identities
to assigned Expressions,
such as in algebraic or trigonometric simplification, will not
successfully apply these rules and identities to elicitations assigned
to Compile, Function or Compute headed Expressions.
These Expressions
will typically transform their body without performing the
intended SymbolProcessing on the
body's subExpressions.
SymbolProcessing algorithms will
use Reckon[...]-constructs
operating on elicitation
forms assigned to Expressions which
are NOT headed
by Compile, Function, or Compute.
name n.
1. The title by which any person or thing is known or designated; a distinctive specific appellation, whether of an individual or a class. A singular name designates the character of the single individual thing which it denotes; as, "the center of the earth" is a singular name; a proper name such as "Milton," "Boston," designates any individual, esp. a person or place, without necessarily saying anything of character; a general name, such as "man," "metal," designates a character or connotation applicable to more then one individual, but without reference to this plurality; a collective name, such as "army," "audience," denotes a plurality of individuals. Common or class name is used for any type of name other than proper.
The grand old name of gentleman. Tennyson.
2. A descriptive or qualifying appellation given to a person or thing, on account of character or acts; epithet.
His name shall be called Wonderful, Counselor. Is. ix. 6.
3. Reputed character; reputation, good or bad; estimation; fame; esp., illustrious fame; honorable reputation; as, a name for bravery; he has the name of a miser.
4. The destination of a person or, rarely, thing, regarded as representing his or its individuality and character; as, the most detested names in history.
5. The mere appellation or designation of a thing, in distinction from the reality; seeming only; as, there was only the name of friendship between them.
6. Those or a certain name; a race; family; clan.
7. Anthropol. The appellation of a person as a magic entity.
-- sometimes confused with the soul or spirit. Many peoples believe that the name of a person contains in itself some essence, a part of the life of the owner, and must not be given or take away.
8. Grammar. A noun. Obs.
9. Logic. A term; any word or combination of words designating a logical concept.
10. Math. a Obs. Denomination.
b Sign
Syn. -- NAME, DESIGATION, DENOMINATION, APPELATION, TITLE, STYLE,...
symbol n.
1. An authoritative summary of faith or doctrine; a creed. Df. SYMBOLICAL BOOKS, SYMBOLICS, SYMBOLIC THEOLOGY.
2. That which stands for or suggests something else by reason of relationship, association, convention, or accidental but not intentional resemblance.; esp., a visible sign of something invisible, as an idea, a quality or totality such as a state or a church ; an emblem; as, the lion is the symbol of courage; the cross is the symbol of Christianity.
A symbol is a representation which does not aim at being a reproduction. Goblet D`Alvielle.
3. In writing or printing, an arbitrary or conventional sign, such as a character, a diagram, a letter, or an abbreviation, used instead of a word or words, as in mathematics, physics, chemistry, music, phonetics, or the like, to represent operations, relations, qualities, sounds, etc. See ARBITRARY SIGNS AND SYMBOLS.
4. Rare. a A pregnant statement; a maxim.
b Symbolism.
5. Logic. Any formal unit of expression, such as a term, proposition, or formal argument, which represents an aspect of thought capable of being dealt with as a unit.
6. Psychoanalysis. An object or act representing a repressed desire of which the individual is unconscious.
[From Websters1949Unabridged.]
(c) 2004-2007 by
John Van Wie Bergamini.
All rights reserved.