1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//! Running a plan over a document: the [`Run`], the contexts through which
//! stages read what they need while they run, and the data that a caller
//! installs into a run from outside.
//!
//! A run is one execution of one plan over one document; it owns the frozen
//! trees, the store and the diagnostics ([`Run`]). A plan is the list of stages
//! that satisfies a plan request, in dependency order and grouped in batches
//! ([`Plan`](crate::core::plan::Plan)). Because a run owns everything it
//! computes, one document may be run several times, under different plans,
//! without one run seeing another's results. See [stages, capabilities, and
//! plans](crate::guide::concepts_overview#stages-capabilities-and-plans) and
//! [running a plan](crate::guide::pipeline#running-a-plan).
//!
//! An embedding program constructs a run with [`Run::new`] from a document, a
//! plan and the [`Externals`] it installs, executes it with [`Run::execute`] or
//! batch by batch with [`Run::step`] under [`RunOptions`], and reads the results
//! with [`Run::table`] and [`Run::diagnostics`]. A stage author uses this module
//! through [`StageCx`], which the runner hands to every stage call, and through
//! [value catch-up](crate::guide::concepts_overview#value-catch-up)
//! ([`StageCx::resolve_value`]), which brings a [synthesized
//! value](crate::guide::concepts_overview#synthesized-values), a small tree that
//! a stage builds during the run, up to date before it is rendered.
//!
//! # Module map
//!
//! - [`runner`]: [`Run`] itself; [`RunOptions`], which choose how a run executes
//! and whether the error gate may stop it; [`Step`] and [`RunOutcome`], what a
//! step and a complete execution report; [`RunError`], the errors of
//! construction and execution; and [`DiagnosticsView`], which chains the
//! diagnostics from parsing with the diagnostics the run produced.
//! - [`externals`]: [`Externals`], the values a caller installs into external
//! tables, each as an [`Install`], and the [`Stamp`] that records what a
//! value was produced under.
//! - [`order`]: the run's document order, the document's walk taken over the
//! frozen trees, and [`DocPosition`], a node's position in that order.
//! - [`cx`]: [`StageCx`] and [`RewriteCx`], what a stage and a rewrite stage may
//! read during one call; [`FrozenWalk`], the walk over the frozen trees;
//! [`CaughtUp`] and [`CatchUpError`], the result of value catch-up.
//!
//! # Diagnostic conditions defined here
//!
//! The runner reports the first five conditions itself. Value catch-up returns
//! the sixth inside its error, and a stage or a lowering rule builds and reports
//! the seventh:
//!
//! - `flm.run.preferred-rule-set-aside` ([`PreferredRuleSetAside`]),
//! `flm.run.preferred-rule-not-candidate` ([`PreferredRuleNotCandidate`])
//! and `flm.run.ignored-preference` ([`IgnoredPreference`]), at Warning
//! severity at the start of the run, one for each preference of the plan
//! request that the plan could not follow;
//! - `flm.run.unchecked-output` ([`UncheckedOutput`]), at Warning severity at
//! the start of the run, one for each backend and feature whose selected
//! lowering rules write output that nothing checks;
//! - `flm.run.placed-twice` ([`PlacedTwice`]), at Error severity, when a
//! rewrite copied a node that places a tree of the document;
//! - `flm.synth.nesting-too-deep` ([`SynthNestingTooDeep`]), the diagnostic
//! of [`CatchUpError::NestingTooDeep`], returned when value catch-up fails
//! because a synthesized value nests too deeply;
//! - `flm.run.missing-entry` ([`MissingEntry`]), at Error severity, which a
//! stage or a lowering rule reports when a table holds no entry for a node
//! inside a synthesized value ([`StageCx::missing_entry`] builds it).
pub use ;
pub use ;
pub use ;
pub use ;