sat-minimize: generalize to any acceptance
This is still missing tests. * src/bin/autfilt.cc: Add a --sat-minimize option. * src/misc/optionmap.cc, src/misc/optionmap.hh: Allow passing strings. * src/twa/acc.cc, src/twa/acc.hh: Add helper functions needed by the SAT-encoder. * src/twaalgos/complete.hh: Typos. * src/twaalgos/dtbasat.hh: Adjust comment. * src/twaalgos/dtgbasat.cc, src/twaalgos/dtgbasat.hh: Generalize to take the target acceptance as input. * src/twaalgos/postproc.cc, src/tests/ltl2tgba.cc: Adjust calls. * src/twaalgos/sbacc.cc, src/twaalgos/sbacc.hh: Don't pass the pointer by reference. * src/tests/acc.cc, src/tests/acc.test: More tests for the acceptance helper function.
This commit is contained in:
parent
19a273929c
commit
0874980574
15 changed files with 419 additions and 147 deletions
|
|
@ -674,6 +674,18 @@ namespace spot
|
|||
|
||||
acc_code complement() const;
|
||||
|
||||
// Return a list of acceptance marks needed to close a cycle
|
||||
// that already visit INF infinitely often, so that the cycle is
|
||||
// accepting (ACCEPTING=true) or rejecting (ACCEPTING=false).
|
||||
// Positive values describe positive set.
|
||||
// A negative value x means the set -x-1 must be absent.
|
||||
std::vector<std::vector<int>>
|
||||
missing(mark_t inf, bool accepting) const;
|
||||
|
||||
bool accepting(mark_t inf) const;
|
||||
|
||||
bool inf_satisfiable(mark_t inf) const;
|
||||
|
||||
// Remove all the acceptance sets in rem.
|
||||
//
|
||||
// If MISSING is set, the acceptance sets are assumed to be
|
||||
|
|
@ -766,6 +778,14 @@ namespace spot
|
|||
(s == 2 && code_[1].op == acc_op::Inf && code_[0].mark == all_sets());
|
||||
}
|
||||
|
||||
static acc_code generalized_buchi(unsigned n)
|
||||
{
|
||||
mark_t m((1U << n) - 1);
|
||||
if (n == 8 * sizeof(mark_t::value_t))
|
||||
m = mark_t(-1U);
|
||||
return acc_code::inf(m);
|
||||
}
|
||||
|
||||
bool is_buchi() const
|
||||
{
|
||||
unsigned s = code_.size();
|
||||
|
|
@ -900,11 +920,15 @@ namespace spot
|
|||
return all_;
|
||||
}
|
||||
|
||||
bool accepting(mark_t inf) const;
|
||||
bool accepting(mark_t inf) const
|
||||
{
|
||||
return code_.accepting(inf);
|
||||
}
|
||||
|
||||
// Assume all Fin(x) in the condition a true. Would the resulting
|
||||
// condition (involving only Inf(y)) be satisfiable?
|
||||
bool inf_satisfiable(mark_t inf) const;
|
||||
bool inf_satisfiable(mark_t inf) const
|
||||
{
|
||||
return code_.inf_satisfiable(inf);
|
||||
}
|
||||
|
||||
mark_t accepting_sets(mark_t inf) const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue