Next: Type Manipulation Functions
Up: Primitives
Previous: Functions on type t_binding
  Contents
Special Purpose Functions
t_closure _self
Unless redefined, the name _self always refers to the model in
which it textually occurs. In effect, every model imports itself
under this name, prior to the first import clause that appears
explicitly in the SDL program text.
t_text
_model_name(t_closure m)
The value m must be a model; that is, a closure defined by
importing an immutable file from the Vesta repository.
_model_name returns a text value that gives one
name for m within the repository.
If a model with identical contents in an identical directory is
present at several locations in the repository, the name returned
may be that of any of these locations, not necessarily the one that
was actually imported in the current evaluation.
t_text
_fingerprint(t_value v)
The _fingerprint primitive returns a text representation of the
given value's fingerprint, a 128-bit internal identifier for the
value. Fingerprints are chosen so that with very high probability,
two different values will always have different fingerprints. A given
value may have different fingerprints in different evaluations or when
computed at different points in the same evaluation, but the
implementation tries to avoid this when practical.
Specifically, a source with a particular absolute name in the Vesta
repository always has the same fingerprint, while two sources
with different names but with the same value will have the same
fingerprint if they were fingerprinted by content when
inserted into the repository. See the documentation of the
vadvance program for details on when sources are fingerprinted
by name and when by content. A derived value returned by any Vesta
primitive other than _run_tool has a fingerprint that depends
deterministically on the fingerprints of its arguments. Derived
values returned by _run_tool have either arbitrary unique
fingerprints or deterministic content-based fingerprints; see
Section A.3.4.8 for details.
These properties make fingerprints useful as version stamps for Vesta
evaluations, sometimes more useful than _model_name.
If m1, m2 are models with identical contents that reside in
identical directories, then _fingerprint(m1) = _fingerprint(m2)
will often be true even when _model_name(m1) != _model_name(m2).
Next: Type Manipulation Functions
Up: Primitives
Previous: Functions on type t_binding
  Contents
Allan Heydon, Roy Levin, Timothy Mann, Yuan Yu