Expand description
The provenance-native selection algebra (vw note §7.3; untie
readiness tracker Phase 2): a revset-shaped composable expression
language over recorded change-units, feeding the three selective
verbs (undo <selection>, transport <selection>, adopt --only)
and the archaeology queries.
Grammar (union | loosest, then difference ~, then intersection
&, parens group):
expr := diff ( '|' diff )*
diff := inter ( '~' inter )*
inter := prim ( '&' prim )*
prim := atom | '(' expr ')'
atom := path(<glob>) | by-effect(<prefix>) | by-origin(<prefix>)
| by(<prefix>) | intent(<prefix>)
| in-branch(<id>) | change(<id>) | cut(<id>)
| since(<stamp>) | until(<stamp>) | dependents-of(expr)The unit of selection is one recorded write: (cut, path,
before → after), derived from cut lineage. dependents-of is the
slicer seam’s conservative floor: path-level dependence (a later
unit on the same path consumed the earlier one’s output). The
declaration/slice-granularity atoms (decl(...), slice-of(...))
arrive when the slicer joins as this algebra’s client — the grammar
is closed under adding atoms.
Structs§
- Change
Unit - One recorded change-unit: what one cut did to one path.
- Decl
Unit - One changed declaration within a change-unit (DR-0054 Decision 6.3).
Enums§
Functions§
- eval
- Evaluate an expression over a change-unit universe, returning the selected indices.
- glob_
matches - A
*/?glob match (segments are not special:*crosses/, matching the whole-path selection intent). - parse
- Parse a selection expression. Errors carry the offending position’s remainder — enough for a CLI message.
- stranded_
by_ undo - The stranding check (selective-undo.maude, the slicer’s 7th client at
its path-level floor): undoing
selectedstrands every RETAINED later unit whose path input came from an undone write. Returns the stranded indices — empty means the exclusion’s dependency closure is clean and the proposal is safe.