Specifications library

Template catalog

The catalog of the premade PrSTL specification templates.

The specifications library ships requirements that are used often by various fields. Instead of transcribing a standard's clause into temporal logic and hoping you got the bound and the window right, the idea is you use the template and modify the parameters to your system. Each template is a small TOML file that carries the formula and its parameters with defaults and units. There are currently 54 templates across ten domains.

Every template is addressed by a domain/name slug, such as automotive/speed_limit or controls/overshoot. This page describes the various specifications. The instructions and directions on how to load, customize, and run a template is in the spec library recipe.

What a template has

Take controls/overshoot. Its deterministic form is

always[0, {T}](output - reference < {max_overshoot} * {step_amplitude})

and its probabilistic form wraps the same property in P >= {p}(...). Four parameters fill the braces: max_overshoot, default 0.05, the allowed fraction of the step; step_amplitude, default 1.0; T, default 30 seconds, the observation horizon; and p, default 0.95, the probability threshold. With the defaults, an output that peaks 0.08 above the reference scores a margin of 0.05 - 0.08 = -0.03 at the peak, and always takes the infimum, so the trace's robustness is -0.03, a violation by three hundredths of the step.

Beyond the formulas and parameters, a template names its variables with units, attaches a default noise model and a fitting recipe per sensor variable for the probabilistic form, records recommended verification budgets, and lists its references. The defaults are placeholders wherever the real value is airframe, route, patient, or venue specific, so pin the parameters that matter before you rely on a verdict.

The templates

Every template also carries p, the probabilistic form's threshold, so the parameter columns below list the rest.

Aerospace

SpecParametersWhat it captures
aerospace/airspeed_envelopeT, V_stall, V_neCalibrated airspeed stays above the stall speed and below the never-exceed speed.
aerospace/altitude_holdT, toleranceAltitude stays within a tolerance band of the assigned target.
aerospace/bank_angle_protectionT, bank_maxBank angle magnitude stays within a hard envelope-protection limit.
aerospace/climb_rate_limitT, climb_maxRate of climb or descent stays within a magnitude bound.
aerospace/load_factor_limitT, n_max_positive, n_min_negativeNormal load factor stays between the positive and negative maneuvering limits.

Automotive

SpecParametersWhat it captures
automotive/jerk_comfort_boundT, jerk_maxLongitudinal jerk magnitude stays within a ride-comfort bound during normal driving.
automotive/lane_keepingT, lateral_marginLateral offset from the lane centerline stays within a margin.
automotive/safe_following_distanceT, rho, a_max_accel, a_min_brake, a_max_brakeThe gap to the lead vehicle stays at or above the RSS safe longitudinal distance.
automotive/speed_limitT, speed_limitSpeed stays at or below the applicable limit.
automotive/time_to_collisionT, ttc_minTime to collision stays above a minimum while closing on the lead vehicle.

Controls

SpecParametersWhat it captures
controls/delay_margin_proxyT, bound, delayThe output stays bounded under injected time delay, a time-domain proxy for delay margin.
controls/disturbance_rejectionT, y_max, nominalOutput deviation from nominal stays below a threshold under bounded disturbance.
controls/gain_margin_proxyT, boundThe output stays bounded under multiplicative gain perturbation.
controls/input_saturation_safetyT, u_min, u_maxThe control input stays within actuator limits.
controls/maintain_untilT, epsilon, setpointA condition holds until a termination event fires within the deadline.
controls/monotonic_convergenceTThe tracking error magnitude decreases monotonically.
controls/overshootmax_overshoot, step_amplitude, TThe output does not exceed the reference by more than a set fraction of the step.
controls/peak_timet_p, referenceThe output reaches its first peak within a bounded time.
controls/persistencet_reach, T_hold, target, epsilonThe system reaches a desired condition and then holds it (eventually-always).
controls/recurrenceT, t_visit, target, epsilonThe output periodically revisits a target region (always-eventually).
controls/rise_timet_r, rise_fraction, referenceThe output reaches a target fraction of its final value within a bounded time.
controls/settling_timet_s, T_hold, epsilonThe output enters and stays within a tolerance band within a bounded time.
controls/steady_state_errorT_transient, T_obs, epsilonThe persistent error stays below a tolerance after transients decay.
controls/tracking_errorT, epsilonThe output follows a time-varying reference within a bounded error at every instant.

Financial

SpecParametersWhat it captures
financial/circuit_breaker_responseT, halt_threshold, halt_windowThe trading halt asserts within the confirmation window once the decline crosses the threshold.
financial/drawdown_duration_limitT, recovery_timeWhile in drawdown the portfolio returns to a new peak within the recovery bound.
financial/max_drawdown_limitT, dd_maxThe drawdown stays below the cap for the whole horizon.
financial/volatility_boundT, vol_maxThe realized volatility of returns stays below a cap.

Industrial

SpecParametersWhat it captures
industrial/flow_rate_bandT, flow_min, flow_maxThe process flow rate stays within its control band for the whole run.
industrial/pressure_relief_responseT, p_trip, t_reactThe relief valve opens within the reaction time whenever pressure exceeds the trip point.
industrial/tank_level_bandT, level_min, level_maxThe tank level stays between its low and high marks for the whole run.
industrial/temperature_limitT, t_maxThe process temperature stays below its safe limit for the whole run.

Medical

SpecParametersWhat it captures
medical/euglycemia_bandT, glucose_low, glucose_highGlucose stays within the 70 to 180 mg/dL target range.
medical/hypoglycemia_recoveryT, hypo, reaction_timeGlucose returns to at least 70 mg/dL within the reaction time after a low.
medical/insulin_rate_limitT, max_rateThe commanded insulin infusion rate stays at or below a hard maximum.
medical/no_severe_hypoglycemiaT, severe_hypoGlucose stays at or above 54 mg/dL, the level-2 hypoglycemia threshold.
medical/sustained_euglycemiaglucose_low, glucose_high, settling_time, hold_windowGlucose reaches and holds the 70 to 180 mg/dL band within the settling time.

Networking

SpecParametersWhat it captures
networking/availabilityTThe link stays up for the whole window, with no outage.
networking/jitter_boundT, max_jitterThe packet delay variation stays below the agreed bound.
networking/latency_boundT, max_delayThe one-way packet delay stays below the agreed bound.
networking/loss_boundT, max_lossThe packet loss rate stays below the agreed bound.

Power

SpecParametersWhat it captures
power/frequency_bandT, f_min, f_maxGrid frequency stays inside the IEEE 1547 continuous-operation ride-through region.
power/frequency_recoveryt_settle, T_hold, f_nominal, toleranceAfter a disturbance the frequency returns to a tight band within the settle time and holds it.
power/low_voltage_ride_throughT, v_floorVoltage stays above the ride-through floor through a fault window.
power/voltage_bandT, v_min, v_maxThe per-unit bus voltage stays inside the IEEE 1547 continuous-operation ride-through region.

Robotics

SpecParametersWhat it captures
robotics/goal_reachingt_goal, toleranceThe robot comes within a tolerance of its goal before a deadline.
robotics/joint_limitsT, joint_min, joint_maxA joint angle stays within its lower and upper mechanical limits.
robotics/obstacle_avoidanceT, safe_distanceThe clearance to the nearest obstacle stays above a safe distance.
robotics/velocity_limitT, v_maxThe signed velocity stays within a magnitude limit.
robotics/workspace_containmentT, x_min, x_max, y_min, y_maxThe end-effector position stays inside a task-space box.

UAV

SpecParametersWhat it captures
uav/altitude_bandT, floor, ceilingAltitude stays between a floor and a ceiling for the whole flight.
uav/battery_reserveT, reserveThe battery state of charge stays above the return-and-land reserve.
uav/geofenceT, x_min, x_max, y_min, y_maxThe horizontal position stays inside the authorized operating box.
uav/waypoint_arrivaldeadline, toleranceThe aircraft comes within a tolerance of the next waypoint before the deadline.

Variants

A variant is a named alternative formula on the same template, for the cases where one requirement has a few standard forms. Ten templates define them; the rest have none. Select one with --variant on the CLI or with_variant in a binding, and inspect a template's variants with sentil specs <slug> before you choose.

TemplateVariants
controls/overshootstep_up, step_down, bidirectional
controls/rise_timeoverdamped, underdamped
controls/settling_timetwo_percent, five_percent, one_percent
controls/steady_state_errorstep_input, ramp_input
financial/circuit_breaker_responselevel_2, level_3
power/frequency_bandnormal_band
power/voltage_bandnormal_band
power/low_voltage_ride_throughcategory_II
aerospace/bank_angle_protectionnominal
aerospace/load_factor_limitsymmetric

Provenance

Each template's references field tells you the source of the requirement. The sources span functional-safety and grid-interconnection standards, control-theory textbooks, driving-safety models, and clinical guidance. The automotive speed limit depends on ISO 26262-4, the power-quality bands on IEEE 1547, and the glucose bands follow the ADA time-in-range thresholds.

Edit this page on GitHub