tl: implement relabel_apply()
* spot/tl/relabel.hh, spot/tl/relabel.cc: Here. * NEWS: Mention it. * tests/python/relabel.py: Use it.
This commit is contained in:
parent
e325289a12
commit
066133b829
4 changed files with 30 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2012-2016, 2018 Laboratoire de Recherche et
|
||||
// Copyright (C) 2012-2016, 2018-2019 Laboratoire de Recherche et
|
||||
// Développement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -482,4 +482,17 @@ namespace spot
|
|||
bse_relabeler rel(gen, c, m);
|
||||
return rel.visit(f);
|
||||
}
|
||||
|
||||
formula
|
||||
relabel_apply(formula f, relabeling_map* m)
|
||||
{
|
||||
if (f.is(op::ap))
|
||||
{
|
||||
auto i = m->find(f);
|
||||
if (i != m->end())
|
||||
return i->second;
|
||||
}
|
||||
return f.map(relabel_apply, m);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue