Methods and catalogs

Configuration

The configuration structs that steer a monitor and its statistical methods, their fields and defaults, and how the command-line tool layers settings from files, environment, and flags.

A monitor runs with sensible defaults out of the box, so most checks need no configuration at all. When a run needs tuning, the settings live in a small set of structs, each with a default that suits a first run. The tables below are the field-by-field reference; the concept pages explain when to change a value.

MonitorConfig

MonitorConfig holds how a Monitor checks its formula: the time mode for offline robustness, and, with the statistical feature, the Monte Carlo and rare-event settings. It is built with new() and refined with chained builders.

BuilderSetsDefault
time(mode)the TimeMode: Discrete or DenseDiscrete
smc(config)the SmcConfig used by Monitor::checkSmcConfig::default()
rare(config)the RareEventConfig used by Monitor::check_rareRareEventConfig::default()
use sentil::{Monitor, MonitorConfig, TimeMode};
use sentil::stats::SmcConfig;

let config = MonitorConfig::new()
    .time(TimeMode::Dense)
    .smc(SmcConfig { samples: 50_000, ..SmcConfig::default() });
let monitor = Monitor::new("P>=0.95(G (speed > 5))", config)?;

SPRT and Bayesian testing take their config per call rather than through MonitorConfig, since their hypotheses have no sensible default.

SmcConfig

The fixed-sample Monte Carlo settings, a plain struct with public fields.

FieldMeaningDefault
sampleshow many noisy realizations to draw10_000
confidencethe confidence level for the reported interval0.95
seedthe base seed, so a run reproduces exactly42
interval_methodwhich interval to reportIntervalMethod::Wilson

SprtConfig

Wald's sequential test, built with SprtConfig::new(p0, p1, alpha, beta, max_samples) and an optional with_seed.

ParameterMeaningConstraint
p0, p1the indifference region bounds0 < p0 < p1 < 1
alphathe false-positive rate boundin (0, 1)
betathe false-negative rate boundin (0, 1)
max_samplesthe budget at which an undecided run is Inconclusivepositive
seedthe base seeddefaults to 42

BayesConfig

The Bayesian sequential test, built with BayesConfig::new(threshold, bayes_factor, max_samples) and an optional with_seed.

ParameterMeaningConstraint
thresholdthe probability the test decides againstin (0, 1)
bayes_factorthe evidence cutoff before decidinggreater than 1
max_samplesthe budget at which an undecided run is Inconclusivepositive
seedthe base seeddefaults to 42

The prior is the uniform Beta(1,1)(1, 1); a larger bayes_factor demands stronger evidence and spends more samples.

RareEventConfig

The adaptive multilevel splitting settings, a plain struct with public fields.

FieldMeaningDefault
particlesthe particle population; more tightens the estimate at linear cost4096
marginthe violation margin; the rare event is robustness dropping to -margin or below0.0
seedthe seed, for a reproducible run42

SmoothConfig

The smooth-robustness settings synthesis differentiates through: a SoftKind, log-sum-exp or arithmetic-geometric mean, and its temperature. The fields and the semantics they select are on smooth semantics.

Command-line layered config

The CLI reads defaults a team can set once and share. The precedence, highest to lowest, is a command-line flag, then a SENTIL_* environment variable, then ./sentil.toml, then the per-user config under the XDG directory, then /etc/sentil/config.toml, then the built-in default. A file value stands in only where neither a flag nor an environment variable was given, and a later file merges over an earlier one. An explicit --config PATH replaces the whole file chain.

sentil.toml
output = "ndjson"
color = "never"

[alias]
overshoot = "check --spec controls/overshoot"

A config file may set the default output format, the color policy, and named command aliases, which expand when their name is not a built-in verb. Run sentil config to see which files are consulted, which exist, and the values in effect.

For what these settings drive, see statistical methods and the CLI page.

Edit this page on GitHub