UP | HOME

# `ltlgrind`

## Table of Contents

- Miscellaneous options
  - `--sort`
  - `-m N`, `--mutations=N`
  - `-n N`, `--max-output=N`

This tool lists 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 kind of mutations that can be applied:

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 an 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`.