Skip to content

Commit 1754226

Browse files
committed
Fixed information on number of explored states
1 parent f45b503 commit 1754226

File tree

3 files changed

+59
-24
lines changed

3 files changed

+59
-24
lines changed

ML/Checker.sml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,7 @@ fun check_and_verify2 p m ignore_k max_steps inv trans prog query bounds pred s
278278
val _ = if !debug_level >= 1 then
279279
let
280280
val _ = println("# additions on DBM entries:" ^ Int.toString (!cnt))
281-
val _ = println("# states added to wait list:" ^ Int.toString (!cnt2))
282-
val _ = println("# states added to passed list:" ^ Int.toString (!cnt3))
281+
val _ = println("# explored states:" ^ Int.toString (!cnt2))
283282
val _ = println("")
284283
in () end else ();
285284
in

ML/UPPAAL_Reachability_Checker.sml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2395,7 +2395,7 @@ fun pw_impl A_ (B1_, B2_, B3_) keyi copyi lei a_0i fi succsi emptyi =
23952395
of (NONE, a2f) =>
23962396
(fn f_ => fn () => f_ ((copyi xj) ()) ())
23972397
(fn xf =>
2398-
(fn f_ => fn () => !cnt2 := cnt2 + 1; f_ ((ht_update (B1_, B2_, B3_) (heap_list A_) x_k [xf] a2f)
2398+
(fn f_ => fn () => f_ ((ht_update (B1_, B2_, B3_) (heap_list A_) x_k [xf] a2f)
23992399
()) ())
24002400
(fn x_m => (fn () => (x_m, (op_list_prepend xj a1e, false)))))
24012401
| (SOME x_m, a2f) =>
@@ -2406,7 +2406,7 @@ fun pw_impl A_ (B1_, B2_, B3_) keyi copyi lei a_0i fi succsi emptyi =
24062406
then (fn f_ => fn () => f_
24072407
((ht_update (B1_, B2_, B3_) (heap_list A_) x_k x_m a2f) ()) ())
24082408
(fn x_o => (fn () => (x_o, (a1e, false))))
2409-
else (fn f_ => fn () => !cnt2 := cnt2 + 1; f_ ((copyi xj) ()) ())
2409+
else (fn f_ => fn () => f_ ((copyi xj) ()) ())
24102410
(fn xf =>
24112411
(fn f_ => fn () => f_
24122412
((ht_update (B1_, B2_, B3_) (heap_list A_) x_k (xf :: x_m) a2f) ())

ML/postprocessing.patch

Lines changed: 56 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
*** /Users/wimm/Formalizations/Timed_Automata/UPPAAL_Reachability_Checker.ml Thu Apr 13 21:31:04 2017
2-
--- UPPAAL_Reachability_Checker.sml Thu Apr 13 21:31:55 2017
1+
*** UPPAAL_Reachability_Checker.sml Wed Jun 21 18:33:10 2017
2+
--- UPPAAL_Reachability_Checker_patched.sml Wed Jun 21 18:28:27 2017
33
***************
44
*** 255,261 ****
55

@@ -174,8 +174,8 @@
174174
val integer_of_int : int -> IntInf.int
175175
type nat
176176
***************
177-
*** 475,480 ****
178-
--- 448,458 ----
177+
*** 476,481 ****
178+
--- 449,459 ----
179179
(int instrc option) list -> ((int list) list) list
180180
end = struct
181181

@@ -188,7 +188,7 @@
188188

189189
fun integer_of_int (Int_of_integer k) = k;
190190
***************
191-
*** 1543,1560 ****
191+
*** 1713,1730 ****
192192
end);
193193

194194
fun new A_ =
@@ -207,7 +207,7 @@
207207
(a, IntInf.toInt (integer_of_nat i), x)) ();
208208
in
209209
a
210-
--- 1521,1538 ----
210+
--- 1691,1708 ----
211211
end);
212212

213213
fun new A_ =
@@ -227,15 +227,15 @@
227227
in
228228
a
229229
***************
230-
*** 1572,1578 ****
230+
*** 1742,1748 ****
231231
fun image f (Set xs) = Set (map f xs);
232232

233233
fun make A_ n f =
234234
! (fn () =>
235235
Array.tabulate (IntInf.toInt (integer_of_nat n),
236236
(f o nat_of_integer) o IntInf.fromInt));
237237

238-
--- 1550,1556 ----
238+
--- 1720,1726 ----
239239
fun image f (Set xs) = Set (map f xs);
240240

241241
fun make A_ n f =
@@ -244,15 +244,15 @@
244244
(f o nat_of_integer) o IntInf.fromInt));
245245

246246
***************
247-
*** 1664,1670 ****
247+
*** 1798,1804 ****
248248
| is_none NONE = true;
249249

250250
fun blit A_ src si dst di len =
251251
! (fn () =>
252252
array_blit src (integer_of_nat
253253
si) dst (integer_of_nat di) (integer_of_nat len));
254254

255-
--- 1642,1648 ----
255+
--- 1776,1782 ----
256256
| is_none NONE = true;
257257

258258
fun blit A_ src si dst di len =
@@ -261,45 +261,81 @@
261261
si) dst (integer_of_nat di) (integer_of_nat len));
262262

263263
***************
264-
*** 2503,2509 ****
264+
*** 2395,2402 ****
265+
of (NONE, a2f) =>
266+
(fn f_ => fn () => f_ ((copyi xj) ()) ())
267+
(fn xf =>
268+
! (fn f_ => fn () => f_ ((ht_update (B1_, B2_, B3_) (heap_list A_) x_k [xf] a2f)
269+
! ()) ())
270+
(fn x_m => (fn () => (x_m, (op_list_prepend xj a1e, false)))))
271+
| (SOME x_m, a2f) =>
272+
(fn f_ => fn () => f_
273+
--- 2373,2380 ----
274+
of (NONE, a2f) =>
275+
(fn f_ => fn () => f_ ((copyi xj) ()) ())
276+
(fn xf =>
277+
! (fn f_ => fn () => ((cnt2 := !cnt2 + 1); f_ ((ht_update (B1_, B2_, B3_) (heap_list A_) x_k [xf] a2f)
278+
! ()) ()))
279+
(fn x_m => (fn () => (x_m, (op_list_prepend xj a1e, false)))))
280+
| (SOME x_m, a2f) =>
281+
(fn f_ => fn () => f_
282+
***************
283+
*** 2406,2412 ****
284+
then (fn f_ => fn () => f_
285+
((ht_update (B1_, B2_, B3_) (heap_list A_) x_k x_m a2f) ()) ())
286+
(fn x_o => (fn () => (x_o, (a1e, false))))
287+
! else (fn f_ => fn () => f_ ((copyi xj) ()) ())
288+
(fn xf =>
289+
(fn f_ => fn () => f_
290+
((ht_update (B1_, B2_, B3_) (heap_list A_) x_k (xf :: x_m) a2f) ())
291+
--- 2384,2390 ----
292+
then (fn f_ => fn () => f_
293+
((ht_update (B1_, B2_, B3_) (heap_list A_) x_k x_m a2f) ()) ())
294+
(fn x_o => (fn () => (x_o, (a1e, false))))
295+
! else (fn f_ => fn () => ((cnt2 := !cnt2 + 1); f_ ((copyi xj) ()) ()))
296+
(fn xf =>
297+
(fn f_ => fn () => f_
298+
((ht_update (B1_, B2_, B3_) (heap_list A_) x_k (xf :: x_m) a2f) ())
299+
***************
300+
*** 2685,2691 ****
265301
fun push_code (A1_, A2_) g_impl =
266302
(fn x => fn (xa, (xb, (xc, xd))) =>
267303
let
268304
- val _ = Gabow_Skeleton_Statistics.newnode ();
269305
val xf = as_length xa;
270306
val xg = as_push xa x;
271307
val xh = as_push xb xf;
272-
--- 2481,2486 ----
308+
--- 2663,2668 ----
273309
***************
274-
*** 2517,2523 ****
310+
*** 2699,2705 ****
275311

276312
fun compute_SCC_tr (A1_, A2_) g =
277313
let
278314
- val _ = Gabow_Skeleton_Statistics.start ();
279315
val xa = ([], ahm_empty (def_hashmap_size A2_ Type));
280316
val a =
281317
foldli (id (gi_V0 g)) (fn _ => true)
282-
--- 2494,2499 ----
318+
--- 2676,2681 ----
283319
***************
284-
*** 2586,2592 ****
320+
*** 2768,2774 ****
285321
else (a, b)))
286322
xa;
287323
val (aa, _) = a;
288324
- val _ = Gabow_Skeleton_Statistics.stop ();
289325
in
290326
aa
291327
end;
292-
--- 2562,2567 ----
328+
--- 2744,2749 ----
293329
***************
294-
*** 2948,2954 ****
330+
*** 3140,3146 ****
295331
val xb = mtx_get (heap_DBMEntry heap_int) (suc n) ai (bib, bi) ();
296332
in
297333
mtx_set (heap_DBMEntry heap_int) (suc n) ai (bia, bi)
298334
! (min (ord_DBMEntry (equal_int, linorder_int)) x (dbm_add_int xa xb)) ()
299335
end);
300336

301337
fun fw_impl_int n =
302-
--- 2923,2929 ----
338+
--- 3115,3121 ----
303339
val xb = mtx_get (heap_DBMEntry heap_int) (suc n) ai (bib, bi) ();
304340
in
305341
mtx_set (heap_DBMEntry heap_int) (suc n) ai (bia, bi)
@@ -308,8 +344,8 @@
308344

309345
fun fw_impl_int n =
310346
***************
311-
*** 3837,3845 ****
312-
--- 3812,3823 ----
347+
*** 4090,4098 ****
348+
--- 4065,4076 ----
313349
s_0 na k
314350
then (fn () =>
315351
let

0 commit comments

Comments
 (0)