Problem
Solver-independent specifications. Every specification is a subtype of ProblemType, split into ControlProblem (a controller is synthesized: reach-avoid, safety, reach-and-stay, co-safe LTL) and AbstractionProblem (no control objective; parametrizes a reusable abstraction). Infinite horizons use the Infinity sentinel.
API reference
Dionysos.Problem.AbstractSpecification — Type
AbstractSpecificationRoot of the composable specification hierarchy. A spec constrains the (possibly augmented) state x / (x,t) / (x,t,k) and is built by wrapping a base StateSpec with the optional lifts TimedSpec (time) and HybridSpec (mode), mirroring the abstraction it is evaluated against.
Dionysos.Problem.AbstractionProblem — Type
AbstractionProblem <: ProblemTypeA specification that carries no control objective; it parametrizes the construction of a sound abstraction (symbolic model) that other solvers reuse. trajectory_success is not defined for these problems.
Dionysos.Problem.AlternatingSimulationProblem — Type
AlternatingSimulationProblem{S, X} <: AbstractionProblemA problem type used to construct a sound abstraction of a dynamical system.
S: The system to abstract (continuous or discrete-time).X: The state-space region of interest to abstract.
This problem encodes no control objective. It is intended for generating symbolic models that can later be reused by other solvers.
Dionysos.Problem.BisimulationQuotientProblem — Type
BisimulationQuotientProblem{S, X, R} <: AbstractionProblemA problem type used to construct a finite bisimulation (exact equivalence abstraction) quotient induced.
Fields
system: the switched system to abstract.state_set: the state-space region of interestX.observation_regions: the regions of interest used to define the observation map.
This problem encodes no control objective. It is intended for generating symbolic models that can later be reused by other solvers.
Dionysos.Problem.CoSafeLTLProblem — Type
CoSafeLTLProblem{S, XI, SPEC, LAB} <: ControlProblemEncodes a co-safe LTL control problem.
S: The system to control.XI: The initial set of states.SPEC: The co-safe LTL specification object (an automaton/monitor wrapper).LAB: The labeling payload type used inlabeling(typically a concrete set type such as a LazySet, or an abstract labeling such asVector{Int}/ bitset / etc.).
Fields
system::S: The (concrete or abstract) system to control.initial_set::XI: Initial set of states (or initial abstract states).spec::SPEC: The co-safe LTL specification.labeling::Dict{Symbol, LAB}: Unified container mapping each atomic proposition (AP):apto its labeling object. In a concrete problem, values are typically sets (e.g. LazySets / Dionysos sets) over the state space. In an abstract problem, values are typically collections of abstract states (e.g.Vector{Int}).ap_semantics::Dict{Symbol, UT.INCL_MODE}: Per-AP semantics used when converting set labels to abstract labels (UT.INNERorUT.OUTER; also reachable asMapping.INNER/Mapping.OUTER).
This problem aims to synthesize a controller such that the generated trajectory satisfies the co-safe LTL formula, i.e. it reaches an accepting condition in finite time.
Dionysos.Problem.ControlProblem — Type
ControlProblem <: ProblemTypeA specification with a control objective to synthesize: reach-avoid, safety, reach-and-stay, co-safe LTL. Every ControlProblem has an initial_set and a trajectory_success predicate.
Dionysos.Problem.HybridSpec — Type
HybridSpec{S} <: AbstractSpecificationMode lift of a spec: per_mode[k] is the spec that must hold in mode k; modes absent from the mapping are not part of the specification.
Dionysos.Problem.Infinity — Type
InfinitySentinel for an infinite time horizon. A problem whose time is Infinity() must be satisfied over an unbounded horizon (e.g. an infinite-horizon safety or reach-and-stay specification). It is never finite, so solvers branch on isfinite(problem.time) to separate the finite from the infinite-horizon case.
Dionysos.Problem.OptimalControlProblem — Type
OptimalControlProblem{S, XI, XT, XC, TC, T, XS} <: ControlProblemEncodes a reach-avoid optimal control problem over a finite horizon.
S: The system to control.XI: The initial set of states.XT: The target set to be reached.XC: A state cost function or structure.TC: A transition cost function or structure.T: Satisfy the property in at most time T.XS: The safe set the trajectory must stay in until the target is reached, ornothingfor the whole state space.
This problem aims to find a control strategy that reaches the target set from the initial set, minimizing the accumulated cost over time.
The safe set
safe_set is the ◻ of a reach-avoid specification ◻ safe ∧ ◇ target, and is optional: nothing — the default, and what the five-and six-argument constructors give — means the whole state space, so a problem built without it behaves exactly as before.
It is not the same as carving the unsafe region out of stateset(system). A region removed from the state space is never abstracted, so the synthesis cannot reason about it; a safe set keeps it representable and lets the synthesis actively avoid it.
Semantics: safe U target. Every state up to and including the one that reaches the target must be safe, so the target is effectively intersected with the safe set — a target state outside safe_set does not count as reached.
PR.OptimalControlProblem(system, X0, target, nothing, nothing, PR.Infinity(); safe_set = corridor)Dionysos.Problem.ProblemType — Type
ProblemTypeRoot of the control-task specification hierarchy. A problem bundles a system with a specification; a solver consumes it through the MOI interface.
There are two categories:
ControlProblem: a control objective is synthesized (there is an initial set and atrajectory_successpredicate).AbstractionProblem: no control objective; the problem only parametrizes the construction of a (reusable) abstraction.
Extending
To add a problem type, subtype ControlProblem or AbstractionProblem and implement:
discretize_problem— time-discretize the (continuous) system and horizon (unless the generic method already covers it viaremake);trajectory_success— control problems only — whether a closed-loop trajectory satisfies the specification;- a plotting
@recipe(optional).
Dionysos.Problem.ReachAndStayProblem — Type
ReachAndStayProblem{S, XI, XT, XS, T} <: ControlProblemEncodes a reach-and-stay control problem (eventually always).
S: The system to control.XI: The initial set of states.XT: The target set to be reached and stayed in.XS: The safe set in which the system must remain during the approach.T: Satisfy the property for at least time T.
This problem aims to synthesize a controller that drives the system from the initial set into the target set and keeps it there indefinitely, while remaining within the safe set during the approach phase.
Two readings of "and stay"
stay_on_first_entry picks which one is required.
false (the default) is ◇□ in the literal sense: eventually the run is in the target forever. A run may enter the target, leave it, and come back — any number of times, as long as it is finite. That is the weaker property, so it admits the larger winning set.
true additionally forbids those departures: from the first moment the run is in the target it must stay. This is what you want when a departure would be visible or unacceptable — a balancing task that must not fall back, a device that must not leave its operating band once it is in it. It is a strictly stronger requirement, so the winning set is smaller, and a problem solvable under the default may be infeasible here.
PR.ReachAndStayProblem(system, X0, target, safe; stay_on_first_entry = true)Dionysos.Problem.SafetyProblem — Type
SafetyProblem{S, XI, XS, T} <: ControlProblemEncodes a safety control problem over a finite horizon.
S: The system to control.XI: The initial set of states.XS: The safe set in which the system must remain.T: Satisfy the property for at least time T.
This problem aims to synthesize a controller that ensures the system remains within the safe set for the entire duration of the time horizon.
Dionysos.Problem.StateSpec — Type
StateSpec{S} <: AbstractSpecificationBase specification: the state x must lie in set under inclusion mode incl_mode.
Dionysos.Problem.TimedSpec — Type
TimedSpec{B} <: AbstractSpecificationClock lift of a spec: the base spec base must hold and the time value must lie in [tmin, tmax].
Dionysos.Problem.check_safe_set_supported — Method
check_safe_set_supported(problem::OptimalControlProblem, solver_name)Raise if problem carries a safe_set the caller cannot honour.
Solvers that ignore the avoid part of a reach-avoid specification must call this. Dropping it silently would hand back a controller certified against a weaker specification than the one that was asked for, which is exactly the kind of failure a formal-methods toolbox must not have.
Dionysos.Problem.discretize_problem — Method
discretize_problem(problem::ProblemType, Δt::Real; num_substeps = ST.DEFAULT_NUM_SUBSTEPS)Time-discretize problem: replace its continuous-time system by the Δt-sampled discrete-time system and convert the horizon to a number of steps.
Dionysos.Problem.discretize_time — Method
discretize_time(time, Δt::Real; round_up = true)Convert a continuous-time horizon time into a number of discrete steps of duration Δt. round_up selects the conservative direction: true rounds up (used by "for at least T" specifications such as safety and reach-and-stay), false rounds down (used by "within at most T" specifications such as reach-avoid). An Infinity() horizon stays Infinity().
Dionysos.Problem.horizon_round_up — Method
horizon_round_up(problem::ControlProblem) -> BoolRounding direction used when discretizing the problem horizon: true for "for at least T" specifications (safety, reach-and-stay), false for "within at most T" specifications (reach-avoid). Defaults to true.
Dionysos.Problem.hybrid_reach_spec — Method
hybrid_reach_spec(state_sets, time_sets, mode_ids; incl_mode = UT.INNER) -> HybridSpecBuild a mode-indexed timed specification from parallel (state_sets, time_sets, mode_ids): mode mode_ids[i] requires x ∈ state_sets[i] within the time window of time_sets[i].
Dionysos.Problem.remake — Method
remake(problem::ProblemType; kwargs...)Return a copy of problem with the given fields replaced. Used by discretize_problem to swap the system and horizon without a per-type constructor call. Fields not named in kwargs are copied verbatim; the type parameters are re-inferred by the constructor, so replacing a field with a value of a different type (e.g. a discretized system) is fine.
Dionysos.Problem.satisfies — Method
Whether the augmented (x, t, k) satisfies the mode-indexed spec (clock-lifted mode).
Dionysos.Problem.satisfies — Method
Whether the augmented (x, k) satisfies the mode-indexed spec (time-free mode).
Dionysos.Problem.satisfies — Method
Whether the concrete state x satisfies the base spec (time-agnostic).
Dionysos.Problem.satisfies — Method
Whether (x, t) satisfies the timed spec.
Dionysos.Problem.trajectory_success — Method
trajectory_success(problem::ControlProblem, traj::ST.Trajectory) -> BoolWhether the closed-loop trajectory traj satisfies the specification of problem. Defined only for ControlProblems.