@@ -119,27 +119,33 @@ end
119
119
function measure_abstraction_time (problem:: IntervalSySCoReComparisonProblem , constructor)
120
120
BenchmarkTools. gcscrub ()
121
121
start_time = time_ns ()
122
- mdp, spec, upper_bound_spec = constructor (problem. state_split, problem. input_split)
122
+ mdp, spec, upper_bound_spec = constructor (problem. state_split, problem. input_split, problem . time_horizon )
123
123
end_time = time_ns ()
124
124
abstraction_time = (end_time - start_time) / 1e9
125
125
126
126
return abstraction_time, mdp, spec, upper_bound_spec
127
127
end
128
128
129
- function warmup_certification (prob)
130
- value_iteration (prob)
129
+ function warmup_certification (prob, upper_bound_spec )
130
+ strategy, _ = control_synthesis (prob)
131
131
132
- return nothing
132
+ upper_bound_prob = Problem (IntervalMDP. system (prob), upper_bound_spec, strategy)
133
+ value_iteration (upper_bound_prob)
134
+
135
+ return upper_bound_prob
133
136
end
134
137
135
- function measure_certification_time (prob)
138
+ function measure_certification_time (prob, upper_bound_prob )
136
139
BenchmarkTools. gcscrub ()
137
140
start_time = time_ns ()
138
- strategy, V, k, res = control_synthesis (prob)
141
+
142
+ _, V_lower, _ = control_synthesis (prob)
143
+ V_upper, _ = value_iteration (upper_bound_prob)
144
+
139
145
end_time = time_ns ()
140
146
certification_time = (end_time - start_time) / 1e9
141
147
142
- return certification_time, V, strategy
148
+ return certification_time, V_lower, V_upper
143
149
end
144
150
145
151
function benchmark_intervalsyscore (name:: String , direct= true )
@@ -165,19 +171,15 @@ function benchmark_intervalsyscore(name::String, direct=true)
165
171
prob = Problem (mdp, spec)
166
172
167
173
# Warmup
168
- warmup_certification (prob)
174
+ upper_bound_prob = warmup_certification (prob, upper_bound_spec )
169
175
170
176
# Measure certification time
171
- certification_time, V_lower, strategy = measure_certification_time (prob)
177
+ certification_time, V_lower, V_upper = measure_certification_time (prob, upper_bound_prob )
172
178
println ((" Certification time" , certification_time))
173
179
174
- # Compute upper bound probabilities
175
- prob = Problem (mdp, upper_bound_spec, strategy)
176
- V_upper, _, _ = value_iteration (prob)
177
-
178
180
println (" reach" )
179
181
reach_set = if system_property (spec) isa AbstractReachability
180
- reach (system_property (spec))
182
+ IntervalMDP . reach (system_property (spec))
181
183
else
182
184
[]
183
185
end
@@ -186,7 +188,7 @@ function benchmark_intervalsyscore(name::String, direct=true)
186
188
end
187
189
188
190
println (" avoid" )
189
- for a in avoid (system_property (spec))
191
+ for a in IntervalMDP . avoid (system_property (spec))
190
192
println (a)
191
193
end
192
194
0 commit comments