Properties
This module provides representations of (safety) properties.
General property interface
Reachability.Properties.Property โ Type.Abstract supertype of properties that can be checked.
Every concrete subtype should provide the following functions:
dim(๐::Property)::Intcheck(๐::Property, X::LazySet; witness::Bool=false)
Boolean combination of properties
Reachability.Properties.Conjunction โ Type.Conjunction <: PropertyType that represents a conjunction of properties.
Fields
conjunctsโ vector of properties
Notes
The following formula characterizes whether a set $X$ satisfies a disjunction $๐ = ๐_1 โง ๐_2 โง โฆ โง ๐_m$:
LazySets.dim โ Method.dim(๐::Conjunction)::IntReturn the dimension of a conjunction of properties.
Input
๐โ conjunction of properties
Output
The dimension of the conjunction of properties.
Reachability.Properties.check โ Method.check(๐::Conjunction, X::LazySet{N}; witness::Bool=false) where {N<:Real}Check whether a convex set satisfies a conjunction of properties.
Input
๐โ conjunction of propertiesXโ convex setwitnessโ (optional, default:false) flag for returning a counterexample if the property is violated
Output
- If 
witnessoption is deactivated:trueiffXsatisfies the property๐ - If 
witnessoption is activated:(true, [])iffXsatisfies the property๐(false, v)iffXdoes not satisfy the property๐with witnessv
 
Notes
By convention, the empty conjunction is equivalent to true and hence is satisfied by any set.
Reachability.Properties.Disjunction โ Type.Disjunction <: PropertyType that represents a disjunction of properties.
Fields
disjunctsโ vector of properties (elements are reordered by this type)reorderโ flag to indicate whether shuffling is allowed
Notes
The following formula characterizes whether a set $X$ satisfies a disjunction $๐ = ๐_1 โจ ๐_2 โจ โฆ โจ ๐_m$:
If the reorder flag is set, the disjuncts may be reordered after each call to check as a heuristics to make subsequent checks faster.
LazySets.dim โ Method.dim(๐::Disjunction)::IntReturn the dimension of a disjunction of properties.
Input
๐โ disjunction of properties
Output
The dimension of the disjunction of properties.
Reachability.Properties.check โ Method.check(๐::Disjunction, X::LazySet{N}; witness::Bool=false) where {N<:Real}Check whether a convex set satisfies a disjunction of properties.
Input
๐โ disjunction of propertiesXโ convex setwitnessโ (optional, default:false) flag for returning a counterexample if the property is violated
Output
- If 
witnessoption is deactivated:trueiffXsatisfies the property๐ - If 
witnessoption is activated:(true, [])iffXsatisfies the property๐(false, v)iffXdoes not satisfy the property๐with witnessv; note thatv == N[]if ๐ is the empty disjunction
 
Notes
By convention, the empty disjunction is equivalent to false and hence is satisfied by no set.
If the ๐.reorder flag is set, the disjuncts may be reordered as a heuristics to make subsequent checks faster. Since we check satisfaction from left to right, we move the disjunct for which satisfaction was established to the front.
To be consistent with other propertes, the witness option only returns one counterexample, namely for the left-most disjunct in the disjuncts vector. We deactivate witness production for checking the remaining disjuncts.
Specific properties
SafeStatesProperty{N<:Real} <: PropertyType that represents a safety property characterized by a set of safe states. The property is satisfied by a given set of states $X$ if $X$ is fully contained in the set of safe states.
Fields
safeโ convex set representing the safe stateswitnessโ witness point (empty vector if not set)
Notes
The following formula characterizes whether a set $X$ satisfies a safety property characterized by a set of safe states ๐:
LazySets.dim โ Method.dim(๐::SafeStatesProperty)::IntReturn the dimension of a property with safe states.
Input
๐โ safety property with safe states
Output
The dimension of the safe states.
Reachability.Properties.check โ Method.check(๐::SafeStatesProperty, X::LazySet; witness::Bool=false)Checks whether a convex set is contained in the set of safe states.
Input
๐โ safety property with safe statesXโ convex setwitnessโ (optional, default:false) flag for returning a counterexample if the property is violated
Output
Let $Y$ be the safe states represented by ๐.
- If 
witnessoption is deactivated:trueiff $X โ Y$ - If 
witnessoption is activated:(true, [])iff $X โ Y$(false, v)iff $X โ Y$ and $v โ X \setminus Y$
 
BadStatesProperty{N<:Real} <: PropertyType that represents a safety property characterized by a set of bad states. The property is satisfied by a given set of states if the intersection with the set of bad states is empty.
Fields
badโ convex set representing the bad stateswitnessโ witness point (empty vector if not set)
Notes
The following formula characterizes whether a set $X$ satisfies a safety property characterized by a set of bad states ๐:
LazySets.dim โ Method.dim(๐::BadStatesProperty)::IntReturn the dimension of a property with bad states.
Input
๐โ safety property with bad states
Output
The dimension of the bad states.
Reachability.Properties.check โ Method.check(๐::BadStatesProperty, X::LazySet; witness::Bool=false)Checks whether a convex set is disjoint from the set of bad states.
Input
๐โ safety property with bad statesXโ convex setwitnessโ (optional, default:false) flag for returning a counterexample if the property is violated
Output
Let $Y$ be the bad states represented by ๐.
- If 
witnessoption is deactivated:trueiff $X โฉ Y = โ $ - If 
witnessoption is activated:(true, [])iff $X โฉ Y = โ $(false, v)iff $X โฉ Y โ โ $ and $v โ X โฉ Y$