Skip to main content

Module source

Module source 

Source
Expand description

Clause source values — spec §3.1.

A clause(name, source) binds a name to the values produced by its source. Sources split into two families:

  • Discrete stream producers — literal lists, integer ranges, generator functions, workload-param references. Cardinality is Bounded, BoundedAtMost, or Unbounded.
  • Continuous measures — real intervals with an integrable measure (uniform on bounded intervals; named probability distributions like Normal / Exponential). Cardinality is Continuous; V8 requires an enclosing sampling order(_, strategy, Some(n)) before dispense.

Sources are stream producers — they do not pre-materialize into Vec<Value>. This is the load-bearing model property per spec §3.1 + §6.2.

Enums§

LiteralValue
A literal value carried in a Source::Literal. Subset of the polydat Value type — the kinds clauses can directly bind. Extension to richer value types lives in the source evaluator, not the AST.
Source
A clause’s source of values.

Functions§

split_string_comprehension
The SRD-18f string-comprehension separator rule, in one place so the parse-time (source_parser) and runtime (eval) striping can never drift: split on runs of comma / semicolon / ASCII whitespace, trim, drop empties. Every other character (: . - / …) stays in the token. Returns the raw token substrings; callers type them (Value or LiteralValue).