ltl2tgba.cc 16.9 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright (C) 2003, 2004  Laboratoire d'Informatique de Paris 6 (LIP6),
// dpartement Systmes Rpartis Coopratifs (SRC), Universit Pierre
// et Marie Curie.
//
// This file is part of Spot, a model checking library.
//
// Spot is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// Spot is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
// License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Spot; see the file COPYING.  If not, write to the Free
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.

22
23
#include <iostream>
#include <cassert>
24
25
#include <fstream>
#include <string>
26
#include "ltlvisit/destroy.hh"
27
#include "ltlvisit/reduce.hh"
28
#include "ltlvisit/tostring.hh"
29
#include "ltlvisit/apcollect.hh"
30
31
#include "ltlast/allnodes.hh"
#include "ltlparse/public.hh"
32
#include "tgbaalgos/ltl2tgba_lacim.hh"
33
#include "tgbaalgos/ltl2tgba_fm.hh"
34
#include "tgba/bddprint.hh"
35
#include "tgbaalgos/dotty.hh"
36
#include "tgbaalgos/lbtt.hh"
37
#include "tgba/tgbatba.hh"
38
#include "tgbaalgos/magic.hh"
39
40
#include "tgbaalgos/gtec/gtec.hh"
#include "tgbaalgos/gtec/ce.hh"
41
#include "tgbaparse/public.hh"
42
#include "tgbaalgos/dupexp.hh"
43
#include "tgbaalgos/neverclaim.hh"
44
#include "tgbaalgos/reductgba_sim.hh"
45
#include "tgbaalgos/replayrun.hh"
46
#include "tgbaalgos/rundotdec.hh"
47

48
49
50
void
syntax(char* prog)
{
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
51
  std::cerr << "Usage: "<< prog << " [OPTIONS...] formula" << std::endl
52
            << "       "<< prog << " -F [OPTIONS...] file" << std::endl
53
            << "       "<< prog << " -X [OPTIONS...] file" << std::endl
Alexandre Duret-Lutz's avatar
spacing    
Alexandre Duret-Lutz committed
54
	    << std::endl
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
55
	    << "Options:" << std::endl
martinez's avatar
martinez committed
56
	    << "  -a    display the acceptance_conditions BDD, not the "
57
	    << "reachability graph"
58
	    << std::endl
martinez's avatar
martinez committed
59
60
61
	    << "  -A    same as -a, but as a set" << std::endl
	    << "  -d    turn on traces during parsing" << std::endl
	    << "  -D    degeneralize the automaton" << std::endl
62
63
64
	    << "  -e[ALGO]  emptiness-check, expect and compute an "
	    << "accepting run" << std::endl
	    << "  -E[ALGO]  emptiness-check, expect no accepting run"
65
	    << std::endl
martinez's avatar
martinez committed
66
67
68
            << "  -f    use Couvreur's FM algorithm for translation"
	    << std::endl
            << "  -F    read the formula from the file" << std::endl
69
	    << "  -g    graph the accepting run on the automaton (requires -e)"
martinez's avatar
martinez committed
70
            << "  -L    fair-loop approximation (implies -f)" << std::endl
martinez's avatar
martinez committed
71
72
	    << "  -N    display the never clain for Spin "
	    << "(implies -D)" << std::endl
martinez's avatar
martinez committed
73
74
            << "  -p    branching postponement (implies -f)" << std::endl
	    << "  -r    display the relation BDD, not the reachability graph"
75
	    << std::endl
martinez's avatar
martinez committed
76
77
	    << "  -r1   reduce formula using basic rewriting" << std::endl
	    << "  -r2   reduce formula using class of eventuality and "
78
	    << "and universality" << std::endl
martinez's avatar
martinez committed
79
	    << "  -r3   reduce formula using implication between "
80
	    << "sub-formulae" << std::endl
martinez's avatar
martinez committed
81
82
83
	    << "  -r4   reduce formula using all rules" << std::endl
	    << "  -rd   display the reduce formula" << std::endl
	    << "  -R    same as -r, but as a set" << std::endl
martinez's avatar
martinez committed
84
	    << "  -R1q  use direct simulation to merge some state "
martinez's avatar
martinez committed
85
	    << "(use -L for more reduction)"
86
	    << std::endl
martinez's avatar
martinez committed
87
	    << "  -R1t  use direct simulation to remove some transition "
martinez's avatar
martinez committed
88
	    << "(use -L for more reduction)"
89
	    << std::endl
martinez's avatar
martinez committed
90
91
92
93
94
95
	    << "  -R2q  use delayed simulation to merge some state "
	    << "(the automaton must be degeneralised)"
	    << std::endl
	    << "  -R2t  use delayed simulation to remove some transition "
	    << "(the automaton must be degeneralised)"
	    << std::endl
martinez's avatar
martinez committed
96
	    << "  -R3   use SCC to reduce the automata"
97
	    << std::endl
martinez's avatar
martinez committed
98
	    << "  -Rd   display the simulation relation"
99
	    << std::endl
martinez's avatar
martinez committed
100
	    << "  -RD   display the parity game (dot format)"
101
	    << std::endl
martinez's avatar
martinez committed
102
	    << "  -s    convert to explicit automata, and number states "
103
	    << "in DFS order" << std::endl
martinez's avatar
martinez committed
104
	    << "  -S    convert to explicit automata, and number states "
105
	    << "in BFS order" << std::endl
martinez's avatar
martinez committed
106
	    << "  -t    display reachable states in LBTT's format" << std::endl
107
108
            << "  -U[PROPS]  consider atomic properties PROPS as exclusive "
	    << "events (implies -f)" << std::endl
martinez's avatar
martinez committed
109
110
111
	    << "  -v    display the BDD variables used by the automaton"
	    << std::endl
            << "  -x    try to produce a more deterministic automata "
112
	    << "(implies -f)" << std::endl
martinez's avatar
martinez committed
113
	    << "  -X    do not compute an automaton, read it from a file"
114
	    << std::endl
martinez's avatar
martinez committed
115
	    << "  -y    do not merge states with same symbolic representation "
116
117
118
	    << "(implies -f)" << std::endl
	    << std::endl
	    << "Where ALGO should be one of:" << std::endl
119
	    << "  couvreur99 (the default)" << std::endl
120
121
	    << "  couvreur99_shy" << std::endl
	    << "  magic_search" << std::endl
122
123
124
	    << "  magic_search_repeated" << std::endl
	    << "  se05_search" << std::endl
	    << "  se05_search_repeated" << std::endl;
125
126
127
128
129
130
131
132
  exit(2);
}

int
main(int argc, char** argv)
{
  int exit_code = 0;

133
  bool debug_opt = false;
134
  bool degeneralize_opt = false;
135
  bool fm_opt = false;
136
  bool fm_exprop_opt = false;
137
  bool fm_symb_merge_opt = true;
138
  bool file_opt = false;
139
  int output = 0;
140
  int formula_index = 0;
141
  std::string echeck_algo;
142
  enum { None, Couvreur, Couvreur2, MagicSearch, Se04Search } echeck = None;
143
  enum { NoneDup, BFS, DFS } dupexp = NoneDup;
144
145
  bool magic_many = false;
  bool expect_counter_example = false;
146
  bool from_file = false;
147
  int reduc_aut = spot::Reduce_None;
148
  int redopt = spot::ltl::Reduce_None;
149
150
  bool display_reduce_form = false;
  bool display_rel_sim = false;
151
  bool display_parity_game = false;
152
  bool post_branching = false;
153
  bool fair_loop_approx = false;
154
  bool graph_run_opt = false;
155
156
  spot::ltl::environment& env(spot::ltl::default_environment::instance());
  spot::ltl::atomic_prop_set* unobservables = 0;
157

158
  for (;;)
159
    {
160
      if (argc < formula_index + 2)
161
	syntax(argv[0]);
162
163
164

      ++formula_index;

165
166
167
168
169
170
171
172
173
      if (!strcmp(argv[formula_index], "-a"))
	{
	  output = 2;
	}
      else if (!strcmp(argv[formula_index], "-A"))
	{
	  output = 4;
	}
      else if (!strcmp(argv[formula_index], "-d"))
174
175
176
	{
	  debug_opt = true;
	}
177
178
179
180
      else if (!strcmp(argv[formula_index], "-D"))
	{
	  degeneralize_opt = true;
	}
181
      else if (!strncmp(argv[formula_index], "-e", 2))
182
	{
183
184
185
186
	  if (argv[formula_index][2] != 0)
	    echeck_algo = argv[formula_index] + 2;
	  else
	    echeck_algo = "couvreur99";
187
188
189
	  expect_counter_example = true;
	  output = -1;
	}
190
      else if (!strncmp(argv[formula_index], "-E", 2))
191
	{
192
193
194
195
	  if (argv[formula_index][2] != 0)
	    echeck_algo = argv[formula_index] + 2;
	  else
	    echeck_algo = "couvreur99";
196
197
198
	  expect_counter_example = false;
	  output = -1;
	}
199
200
201
202
203
204
205
206
      else if (!strcmp(argv[formula_index], "-f"))
	{
	  fm_opt = true;
	}
      else if (!strcmp(argv[formula_index], "-F"))
	{
	  file_opt = true;
	}
207
208
209
210
      else if (!strcmp(argv[formula_index], "-g"))
	{
	  graph_run_opt = true;
	}
211
212
213
214
215
      else if (!strcmp(argv[formula_index], "-L"))
	{
	  fair_loop_approx = true;
	  fm_opt = true;
	}
martinez's avatar
martinez committed
216
217
218
219
220
      else if (!strcmp(argv[formula_index], "-N"))
	{
	  degeneralize_opt = true;
	  output = 8;
	}
221
222
223
224
225
      else if (!strcmp(argv[formula_index], "-p"))
	{
	  post_branching = true;
	  fm_opt = true;
	}
226
227
      else if (!strcmp(argv[formula_index], "-r"))
	{
228
229
	  output = 1;
	}
230
231
232
233
234
235
      else if (!strcmp(argv[formula_index], "-r1"))
	{
	  redopt |= spot::ltl::Reduce_Basics;
	}
      else if (!strcmp(argv[formula_index], "-r2"))
	{
236
	  redopt |= spot::ltl::Reduce_Eventuality_And_Universality;
237
238
239
	}
      else if (!strcmp(argv[formula_index], "-r3"))
	{
240
	  redopt |= spot::ltl::Reduce_Syntactic_Implications;
241
242
243
244
245
	}
      else if (!strcmp(argv[formula_index], "-r4"))
	{
	  redopt |= spot::ltl::Reduce_All;
	}
246
247
248
      else if (!strcmp(argv[formula_index], "-R"))
	{
	  output = 3;
249
	}
martinez's avatar
martinez committed
250
251
252
253
254
255
256
257
258
      else if (!strcmp(argv[formula_index], "-R1q"))
	{
	  reduc_aut |= spot::Reduce_quotient_Dir_Sim;
	}
      else if (!strcmp(argv[formula_index], "-R1t"))
	{
	  reduc_aut |= spot::Reduce_transition_Dir_Sim;
	}
      else if (!strcmp(argv[formula_index], "-R2q"))
259
	{
martinez's avatar
martinez committed
260
	  reduc_aut |= spot::Reduce_quotient_Del_Sim;
261
	}
martinez's avatar
martinez committed
262
      else if (!strcmp(argv[formula_index], "-R2t"))
263
	{
martinez's avatar
martinez committed
264
	  reduc_aut |= spot::Reduce_transition_Del_Sim;
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
	}
      else if (!strcmp(argv[formula_index], "-R3"))
	{
	  reduc_aut |= spot::Reduce_Scc;
	}
      else if (!strcmp(argv[formula_index], "-rd"))
	{
	  display_reduce_form = true;
	}
      else if (!strcmp(argv[formula_index], "-Rd"))
	{
	  display_rel_sim = true;
	}
      else if (!strcmp(argv[formula_index], "-RD"))
	{
	  display_parity_game = true;
	}
282
283
284
285
286
287
288
289
      else if (!strcmp(argv[formula_index], "-s"))
	{
	  dupexp = DFS;
	}
      else if (!strcmp(argv[formula_index], "-S"))
	{
	  dupexp = BFS;
	}
290
291
292
293
      else if (!strcmp(argv[formula_index], "-t"))
	{
	  output = 6;
	}
294
295
296
297
298
      else if (!strncmp(argv[formula_index], "-U", 2))
	{
	  unobservables = new spot::ltl::atomic_prop_set;
	  fm_opt = true;
	  // Parse -U's argument.
299
	  const char* tok = strtok(argv[formula_index] + 2, ", \t;");
300
301
302
303
	  while (tok)
	    {
	      unobservables->insert
		(static_cast<spot::ltl::atomic_prop*>(env.require(tok)));
304
	      tok = strtok(0, ", \t;");
305
306
	    }
	}
307
308
309
310
      else if (!strcmp(argv[formula_index], "-v"))
	{
	  output = 5;
	}
311
312
313
314
315
      else if (!strcmp(argv[formula_index], "-x"))
	{
	  fm_opt = true;
	  fm_exprop_opt = true;
	}
316
317
318
319
      else if (!strcmp(argv[formula_index], "-X"))
	{
	  from_file = true;
	}
320
321
322
323
324
      else if (!strcmp(argv[formula_index], "-y"))
	{
	  fm_opt = true;
	  fm_symb_merge_opt = false;
	}
325
326
327
328
      else
	{
	  break;
	}
329
330
    }

331
  if (echeck_algo != "")
332
    {
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
      if (echeck_algo == "couvreur99")
	{
	  echeck = Couvreur;
	}
      else if (echeck_algo == "couvreur99_shy")
	{
	  echeck = Couvreur2;
	}
      else if (echeck_algo == "magic_search")
	{
	  echeck = MagicSearch;
	  degeneralize_opt = true;
	}
      else if (echeck_algo == "magic_search_repeated")
	{
	  echeck = MagicSearch;
	  degeneralize_opt = true;
	  magic_many = true;
	}
352
353
354
355
356
357
358
359
360
361
362
      else if (echeck_algo == "se05_search")
	{
	  echeck = Se04Search;
	  degeneralize_opt = true;
	}
      else if (echeck_algo == "se05_search_repeated")
	{
	  echeck = Se04Search;
	  degeneralize_opt = true;
	  magic_many = true;
	}
363
364
365
366
367
      else
	{
	  std::cerr << "unknown emptiness-check: " << echeck_algo << std::endl;
	  syntax(argv[0]);
	}
368
369
    }

370
371
372
373
374
375
  if (graph_run_opt && (echeck_algo == "" || !expect_counter_example))
    {
      std::cerr << argv[0] << ": error: -g requires -e." << std::endl;
      exit(1);
    }

376
377
378
379
  std::string input;

  if (file_opt)
    {
380
      if (strcmp(argv[formula_index], "-"))
381
	{
382
	  std::ifstream fin(argv[formula_index]);
383
	  if (!fin)
384
385
386
387
	    {
	      std::cerr << "Cannot open " << argv[formula_index] << std::endl;
	      exit(2);
	    }
388

389
	  if (!std::getline(fin, input, '\0'))
390
391
392
393
394
395
	    {
	      std::cerr << "Cannot read " << argv[formula_index] << std::endl;
	      exit(2);
	    }
	}
      else
396
	{
397
	  std::getline(std::cin, input, '\0');
398
399
400
401
402
403
404
	}
    }
  else
    {
      input = argv[formula_index];
    }

405
  spot::bdd_dict* dict = new spot::bdd_dict();
406
407
408
409
410
411
412
413
414

  spot::ltl::formula* f = 0;
  if (!from_file)
    {
      spot::ltl::parse_error_list pel;
      f = spot::ltl::parse(input, pel, env, debug_opt);
      exit_code = spot::ltl::format_parse_errors(std::cerr, input, pel);
    }
  if (f || from_file)
415
    {
416
417
418
419
      spot::tgba_bdd_concrete* concrete = 0;
      spot::tgba* to_free = 0;
      spot::tgba* a = 0;

420
421
422
      if (from_file)
	{
	  spot::tgba_parse_error_list pel;
423
424
	  spot::tgba_explicit* e;
	  to_free = a = e = spot::tgba_parse(input, pel, dict, env, debug_opt);
425
	  if (spot::format_tgba_parse_errors(std::cerr, pel))
426
427
428
429
430
	    {
	      delete to_free;
	      delete dict;
	      return 2;
	    }
431
	  e->merge_transitions();
432
	}
433
      else
434
	{
435
	  if (redopt != spot::ltl::Reduce_None)
436
	    {
437
438
439
	      spot::ltl::formula* t = spot::ltl::reduce(f, redopt);
	      spot::ltl::destroy(f);
	      f = t;
440
441
	      if (display_reduce_form)
		std::cout << spot::ltl::to_string(f) << std::endl;
442
	    }
443

444
	  if (fm_opt)
445
	    to_free = a = spot::ltl_to_tgba_fm(f, dict, fm_exprop_opt,
446
					       fm_symb_merge_opt,
447
					       post_branching,
448
					       fair_loop_approx, unobservables);
449
450
451
	  else
	    to_free = a = concrete = spot::ltl_to_tgba_lacim(f, dict);
	}
452

453
454
455
456
      spot::tgba_tba_proxy* degeneralized = 0;
      if (degeneralize_opt)
	a = degeneralized = new spot::tgba_tba_proxy(a);

457
458
459
460
      spot::tgba_reduc* aut_red = 0;
      if (reduc_aut != spot::Reduce_None)
	{
	  a = aut_red = new spot::tgba_reduc(a);
461
462
463
464

	  if (reduc_aut & spot::Reduce_Scc)
	    aut_red->prune_scc();

martinez's avatar
martinez committed
465
466
467
468
	  if (reduc_aut & (spot::Reduce_quotient_Dir_Sim |
			   spot::Reduce_transition_Dir_Sim |
			   spot::Reduce_quotient_Del_Sim |
			   spot::Reduce_transition_Del_Sim))
469
	    {
martinez's avatar
martinez committed
470
471
472
473
474
	      spot::direct_simulation_relation* rel_dir = 0;
	      spot::delayed_simulation_relation* rel_del = 0;

	      if (reduc_aut & (spot::Reduce_quotient_Dir_Sim |
			       spot::Reduce_transition_Dir_Sim))
475
476
477
478
		rel_dir =
		  spot::get_direct_relation_simulation(a,
						       std::cout,
						       display_parity_game);
martinez's avatar
martinez committed
479
480
	      else if (reduc_aut & (spot::Reduce_quotient_Del_Sim |
				    spot::Reduce_transition_Del_Sim))
481
482
483
484
		rel_del =
		  spot::get_delayed_relation_simulation(a,
							std::cout,
							display_parity_game);
485
486

	      if (display_rel_sim)
martinez's avatar
martinez committed
487
488
489
490
491
492
		{
		  if (rel_dir)
		    aut_red->display_rel_sim(rel_dir, std::cout);
		  if (rel_del)
		    aut_red->display_rel_sim(rel_del, std::cout);
		}
493

martinez's avatar
martinez committed
494
495
496
497
498
499
500
501
502
503
504
505
506
	      if (reduc_aut & spot::Reduce_quotient_Dir_Sim)
		aut_red->quotient_state(rel_dir);
	      if (reduc_aut & spot::Reduce_transition_Dir_Sim)
		aut_red->delete_transitions(rel_dir);
	      if (reduc_aut & spot::Reduce_quotient_Del_Sim)
		aut_red->quotient_state(rel_del);
	      if (reduc_aut & spot::Reduce_transition_Del_Sim)
		aut_red->delete_transitions(rel_del);

	      if (rel_dir)
		spot::free_relation_simulation(rel_dir);
	      if (rel_del)
		spot::free_relation_simulation(rel_del);
507
508
509
	    }
	}

510
511
512
513
514
515
516
517
518
519
520
521
522
      spot::tgba_explicit* expl = 0;
      switch (dupexp)
	{
	case NoneDup:
	  break;
	case BFS:
	  a = expl = tgba_dupexp_bfs(a);
	  break;
	case DFS:
	  a = expl = tgba_dupexp_dfs(a);
	  break;
	}

523
524
      switch (output)
	{
525
526
527
	case -1:
	  /* No output.  */
	  break;
528
529
530
531
	case 0:
	  spot::dotty_reachable(std::cout, a);
	  break;
	case 1:
532
533
534
	  if (concrete)
	    spot::bdd_print_dot(std::cout, concrete->get_dict(),
				concrete->get_core_data().relation);
535
536
	  break;
	case 2:
537
538
539
	  if (concrete)
	    spot::bdd_print_dot(std::cout, concrete->get_dict(),
				concrete->
540
				get_core_data().acceptance_conditions);
541
542
	  break;
	case 3:
543
544
545
	  if (concrete)
	    spot::bdd_print_set(std::cout, concrete->get_dict(),
				concrete->get_core_data().relation);
546
547
	  break;
	case 4:
548
549
550
	  if (concrete)
	    spot::bdd_print_set(std::cout, concrete->get_dict(),
				concrete->
551
				get_core_data().acceptance_conditions);
552
	  break;
553
	case 5:
554
	  a->get_dict()->dump(std::cout);
555
	  break;
556
557
558
	case 6:
	  spot::lbtt_reachable(std::cout, a);
	  break;
559
560
561
	case 8:
	  spot::never_claim_reachable(std::cout, degeneralized, f);
	  break;
562
563
564
	default:
	  assert(!"unknown output option");
	}
565

566
567
      spot::emptiness_check* ec = 0;
      spot::tgba* ec_a = 0;
568
569
570
571
      switch (echeck)
	{
	case None:
	  break;
martinez's avatar
martinez committed
572

573
	case Couvreur:
574
575
576
577
	  ec_a = a;
	  ec = new spot::couvreur99_check(a);
	  break;

578
	case Couvreur2:
579
580
	  ec_a = a;
	  ec = new spot::couvreur99_check_shy(a);
581
	  break;
martinez's avatar
martinez committed
582

583
	case MagicSearch:
584
	  ec_a = degeneralized;
585
586
587
588
589
590
	  ec = spot::explicit_magic_search(degeneralized);
	  break;

	case Se04Search:
	  ec_a = degeneralized;
	  ec = spot::explicit_se05_search(degeneralized);
591
	  break;
592
	}
martinez's avatar
martinez committed
593

594
595
596
597
598
      if (ec)
	{
	  do
	    {
	      spot::emptiness_check_result* res = ec->check();
599
600
	      if (!graph_run_opt)
		ec->print_stats(std::cout);
601
602
603
604
605
606
607
608
609
610
611
612
613
614
	      if (expect_counter_example != !!res)
		exit_code = 1;

	      if (!res)
		{
		  std::cout << "no accepting run found" << std::endl;
		  break;
		}
	      else
		{

		  spot::tgba_run* run = res->accepting_run();
		  if (!run)
		    {
615
		      std::cout << "an accepting run exists" << std::endl;
616
617
618
		    }
		  else
		    {
619
620
621
622
623
624
625
626
627
628
629
		      if (graph_run_opt)
			{
			  spot::tgba_run_dotty_decorator deco(run);
			  spot::dotty_reachable(std::cout, ec_a, &deco);
			}
		      else
			{
			  spot::print_tgba_run(std::cout, ec_a, run);
			  if (!spot::replay_tgba_run(std::cout, ec_a, run))
			    exit_code = 1;
			}
630
631
632
633
634
635
636
		      delete run;
		    }
		}
	      delete res;
	    }
	  while (magic_many);
	  delete ec;
martinez's avatar
martinez committed
637
638
	}

639
640
      if (f)
        spot::ltl::destroy(f);
641
642
643
      delete expl;
      delete degeneralized;
      delete aut_red;
644
      delete to_free;
645
646
647
648
649
650
651
652
653
654
    }
  else
    {
      exit_code = 1;
    }

  assert(spot::ltl::atomic_prop::instance_count() == 0);
  assert(spot::ltl::unop::instance_count() == 0);
  assert(spot::ltl::binop::instance_count() == 0);
  assert(spot::ltl::multop::instance_count() == 0);
655
  delete dict;
656
657
  return exit_code;
}