spot/doc/org/ltlgrind.org
Alexandre Duret-Lutz 4cf7503fff org: fix many errors
Most of those errors were pointed out by the language-check tool.
However while fixing those I found a few other issues that I fixed.
In particular I updated the bibliographic reference for ltlsynt,
added some DOI links for some cited papers that had no link, and
fixed the broken introduction of ltlgrind.

* doc/org/autcross.org, doc/org/autfilt.org, doc/org/citing.org,
doc/org/compile.org, doc/org/concepts.org, doc/org/csv.org,
doc/org/dstar2tgba.org, doc/org/genaut.org, doc/org/hierarchy.org,
doc/org/install.org, doc/org/ioltl.org, doc/org/ltl2tgba.org,
doc/org/ltl2tgta.org, doc/org/ltlcross.org, doc/org/ltldo.org,
doc/org/ltlfilt.org, doc/org/ltlgrind.org, doc/org/ltlsynt.org,
doc/org/oaut.org, doc/org/randaut.org, doc/org/randltl.org,
doc/org/satmin.org, doc/org/tut01.org, doc/org/tut02.org,
doc/org/tut03.org, doc/org/tut10.org, doc/org/tut11.org,
doc/org/tut12.org, doc/org/tut20.org, doc/org/tut22.org,
doc/org/tut24.org, doc/org/tut30.org, doc/org/tut40.org,
doc/org/tut50.org, doc/org/tut51.org, doc/org/tut52.org,
doc/org/tut90.org, doc/org/upgrade2.org: Fix errors.
* bin/autfilt.cc, bin/common_aoutput.cc, bin/genaut.cc: Fix some
typos in --help text that appeared in the above org files.
2024-02-09 12:16:52 +01:00

3.7 KiB

ltlgrind

This tool lists formulas that are similar to but simpler than a given formula by applying simple mutations to it, like removing operands or formulas that are similar to but simpler than a given formula by applying simple mutations to it, like removing operands or operators. This is meant to be used with ltlcross to simplify a formula that caused a problem before trying to debug it (see also ltlcross --grind=FILENAME).

Here is a list of the different kinds of mutations that can be applied:

      --ap-to-const          atomic propositions are replaced with true/false
      --remove-multop-operands   remove one operand from multops
      --remove-one-ap        all occurrences of an atomic proposition are
                             replaced with another atomic proposition used in
                             the formula
      --remove-ops           replace unary/binary operators with one of their
                             operands
      --rewrite-ops          rewrite operators that have a semantically simpler
                             form: a U b becomes a W b, etc.
      --simplify-bounds      on a bounded unary operator, decrement one of the
                             bounds, or set min to 0 or max to unbounded
      --split-ops            when an operator can be expressed as a
                             conjunction/disjunction using simpler operators,
                             each term of the conjunction/disjunction is a
                             mutation. e.g. a <-> b can be written as ((a & b)
                             | (!a & !b)) or as ((a -> b) & (b -> a)) so those
                             four terms can be a mutation of a <-> b

By default, all rules are applied. But if one or more rules are specified, only those will be applied.

ltlgrind -f 'a U G(b <-> c)' --split-ops --rewrite-ops --remove-ops
a
G(b <-> c)
a W G(b <-> c)
a U (b <-> c)
a U Gb
a U Gc
a U G(b -> c)
a U G(c -> b)
a U G(b & c)
a U G(!b & !c)

The idea behind this tool is that when a bogus algorithm is found with ltlcross, you probably want to debug it using a smaller formula than the one found by ltlcross. So you would give the formula found by ltlcross as an argument to ltlgrind and then use the resulting mutations as a new input for ltlcross. It might report an error on one of the mutation, which is guaranteed to be simpler than the initial formula. The process can then be repeated until no error is reported by ltlcross.

Since the whole process can become quite tedious, it can be done automatically by calling ltlcross with the --grind=FILENAME argument.

Miscellaneous options

--sort

Output formulas from the shortest to the longest one. The length of a formula is the number of atomic propositions, constants and operators occurring in the formula.

-m N, --mutations=N

Specify the number of mutations to be applied to the formula. By default, N=1, so using this option is like calling ltlgrind on its own output several times, except for the fact that, when called on several formulas, ltlgrind doesn't handle duplicates.

-n N, --max-output=N

Limit the number of mutated formulas output to N.