stl
JAX visitors and GMSR math for STL (Signal Temporal Logic) expressions.
Visitors: Or, And, IfThen, IntegerVariable
Lowers symbolic STL expression nodes to JAX functions using Generalized Mean-based Smooth Robustness (GMSR) parameterizations.
The GMSR helper functions (AND, OR, IfThen, etc.) are pure JAX math implementations used by the visitor functions below.
Author: Samet Uzun Reference: [https://doi.org/10.48550/arxiv.2405.10996] [https://doi.org/10.2514/6.2025-1895]
AND(y: ArrayLike, c: float = 1e-08) -> Array
¶
Smooth conjunction: AND(y) <= 0 iff y_i <= 0 for all i.
Source code in openscvx/symbolic/lowerers/jax/stl.py
AND_lite(y: ArrayLike, c: float = 1e-08) -> Array
¶
Lite conjunction (positive part only): AND_lite(y) = 0 iff y_i <= 0 for all i.
Source code in openscvx/symbolic/lowerers/jax/stl.py
OR(y: ArrayLike, c: float = 1e-08) -> Array
¶
OR_lite(y: ArrayLike, c: float = 1e-08) -> Array
¶
Lite disjunction (positive part only): OR_lite(y) = 0 iff y_i <= 0 for some i.
Source code in openscvx/symbolic/lowerers/jax/stl.py
gmsr_IfThen(y: ArrayLike, c: float = 1e-08) -> Array
¶
Smooth implication: IfThen(y) <= 0 iff (y_0 <= 0 => y_1 <= 0).
gmsr_IfThen_lite(y: ArrayLike, c: float = 1e-08) -> Array
¶
Lite implication: IfThen_lite(y) = 0 iff (y_0 <= 0 => y_1 <= 0).
Can enforce continuous-time implication via periodic auxiliary state
z_dot(t) = IfThen_lite([y_0(t), y_1(t)]) z(0) = z(T)
Source code in openscvx/symbolic/lowerers/jax/stl.py
integer_variable(y: ArrayLike, values: ArrayLike, c: float = 1e-08) -> Array
¶
Smooth discrete constraint: returns 0 iff y equals one of values.