Add support for computing operator nesting depth
* spot/tl/hierarchy.hh, spot/tl/hierarchy.cc (nesting_depth): New function. * python/spot/__init__.py: Also make it a method of formula in Python * bin/common_output.cc, bin/common_output.hh: Implement --stats=%[OP]n. * NEWS: Mention it. * tests/core/format.test, tests/python/formulas.ipynb: Test it.
This commit is contained in:
parent
49b76bcf66
commit
62d1e0219d
8 changed files with 218 additions and 25 deletions
|
|
@ -58,6 +58,12 @@ extern bool escape_csv;
|
|||
"the class of the formula is the Manna-Pnueli hierarchy " \
|
||||
"([v] replaces abbreviations by class names, [w] for all " \
|
||||
"compatible classes)", 0 }, \
|
||||
{ "%[OP]n", 0, nullptr, OPTION_DOC | OPTION_NO_USAGE, \
|
||||
"the nesting depth of operator OP. OP should be a single " \
|
||||
"letter denoting the operator to count, or multiple letters " \
|
||||
"to fuse several operators during depth evaluation. Add '~' " \
|
||||
"to rewrite the formula in negative normal form before " \
|
||||
"counting.", 0 }, \
|
||||
{ "%x, %[LETTERS]X, %[LETTERS]x", 0, nullptr, \
|
||||
OPTION_DOC | OPTION_NO_USAGE, \
|
||||
COMMON_X_OUTPUT_SPECS(used in the formula), 0 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue