postproc: Add an option_map parameter
* src/tgbaalgos/postproc.cc: Add an option_map parameter, and use to get extra options to pass to the degeneralization algorithm. * src/tgbaalgos/postproc.hh: Adjust prototype, and store Boolean variables for degeneralize() options. * src/bin/ltl2tgba.cc: Add a -x option to fill the option map, and pass it to the postprocessor. * src/bin/man/ltl2tgba.x: Document the three degeneralization options.
This commit is contained in:
parent
1b2f9fe5d8
commit
05e59a9e1a
4 changed files with 74 additions and 13 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2012 Laboratoire de Recherche et Développement de
|
||||
// l'Epita (LRDE).
|
||||
// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement
|
||||
// de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -39,6 +39,7 @@
|
|||
#include "tgbaalgos/save.hh"
|
||||
#include "tgbaalgos/stats.hh"
|
||||
#include "tgba/bddprint.hh"
|
||||
#include "misc/optionmap.hh"
|
||||
|
||||
const char argp_program_doc[] ="\
|
||||
Translate linear-time formulas (LTL/PSL) into Büchi automata.\n\n\
|
||||
|
|
@ -91,6 +92,8 @@ static const argp_option options[] =
|
|||
"a single %", 0 },
|
||||
/**************************************************/
|
||||
{ 0, 0, 0, 0, "Miscellaneous options:", -1 },
|
||||
{ "extra-options", 'x', "OPTS", 0,
|
||||
"fine-tuning options (see man page)", 0 },
|
||||
{ 0, 0, 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
|
|
@ -105,6 +108,7 @@ const struct argp_child children[] =
|
|||
enum output_format { Dot, Lbtt, Spin, Spot, Stats } format = Dot;
|
||||
bool utf8 = false;
|
||||
const char* stats = "";
|
||||
spot::option_map extra_options;
|
||||
|
||||
static int
|
||||
parse_opt(int key, char* arg, struct argp_state*)
|
||||
|
|
@ -126,6 +130,13 @@ parse_opt(int key, char* arg, struct argp_state*)
|
|||
if (type != spot::postprocessor::Monitor)
|
||||
type = spot::postprocessor::BA;
|
||||
break;
|
||||
case 'x':
|
||||
{
|
||||
const char* opt = extra_options.parse_options(arg);
|
||||
if (opt)
|
||||
error(2, 0, "failed to parse --options near '%s'", opt);
|
||||
}
|
||||
break;
|
||||
case OPT_DOT:
|
||||
format = Dot;
|
||||
break;
|
||||
|
|
@ -258,7 +269,7 @@ main(int argc, char** argv)
|
|||
|
||||
spot::ltl::ltl_simplifier simpl(simplifier_options());
|
||||
|
||||
spot::postprocessor postproc;
|
||||
spot::postprocessor postproc(&extra_options);
|
||||
postproc.set_pref(pref);
|
||||
postproc.set_type(type);
|
||||
postproc.set_level(level);
|
||||
|
|
|
|||
|
|
@ -2,3 +2,27 @@
|
|||
ltl2tgba \- translate LTL/PSL formulas into Büchi automata
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
[FINE-TUNING OPTIONS]
|
||||
|
||||
The \fB\-\-extra\-options\fR argument is a comma-separated list of
|
||||
\fIKEY\fR=\fIINT\fR assignments that are passed to the post-processing
|
||||
routines (they may be passed to other algorithms in the future).
|
||||
These options are mostly used for benchmarking and debugging
|
||||
purpose. \fIKEY\fR (without any value) is a
|
||||
shorthand for \fIKEY\fR=1, and !\fIKEY\fR is a shorthand for
|
||||
\fIKEY\fR=0.
|
||||
|
||||
Supported options are:
|
||||
.TP
|
||||
\fBdegen\-reset\fR
|
||||
If non-zero (the default), the degeneralization algorithm will reset
|
||||
its level any time it exits a non-accepting SCC.
|
||||
.TP
|
||||
\fBdegen\-lcache\fR
|
||||
If non-zero (the default), whenever the degeneralization algorithm enters
|
||||
an SCC on a state that has already been associated to a level elsewhere,
|
||||
it should reuse that level. The "lcache" stands for "level cache".
|
||||
.TP
|
||||
\fBdegen\-order\fR
|
||||
If non-zero, the degeneralization algorithm will compute one degeneralization
|
||||
order for each SCC it processes. This is currently disabled by default.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue