We introduce a logic to express structural properties of automata with string inputs and, possibly, outputs in some monoid. In this logic, the set of predicates talking about the output values is parametric, and we provide sufficient conditions on the predicates under which the model-checking problem is decidable. We then consider three particular automata models (finite automata, transducers and automata weighted by integers -sum-automata -) and instantiate the generic logic for each of them. We give tight complexity results for the three logics and the model-checking problem, depending on whether the formula is fixed or not. We study the expressiveness of our logics by expressing classical structural patterns characterising for instance finite ambiguity and polynomial ambiguity in the case of finite automata, determinisability and finite-valuedness in the case of transducers and sum-automata. Consequently to our complexity results, we directly obtain that these classical properties can be decided in PTIME.
IntroductionMotivations An important aspect of automata theory is the definition of automata subclasses with particular properties, of algorithmic interest for instance. As an example, the inclusion problem for non-deterministic finite automata is PSPACE-C but becomes PTIME if the automata are k-ambiguous for a fixed k [21].By automata theory, we mean automata in the general sense of finite state machines processing finite words. This includes what we call automata with outputs, which may also produce output values in a fixed monoid M = (D, ⊕, 0). In such an automaton, the transitions are extended with an (output) value in D, and the value of an accepting path is the sum (for ⊕) of all the values occurring along its transitions. Automata over finite words in Λ * and with outputs in M define subsets of Λ * × D as follows: to any input word w ∈ Λ * , we associate the set of values of all the accepting paths on w. For example, transducers are automata with outputs in a free monoid: they process input words and produce output words and therefore define binary relations of finite words [15].The many decidability properties of finite automata do not carry over to transducers, and many restrictions have been defined in the literature to recover decidability, or just to define subclasses relevant to particular applications. The inclusion problem for transducer is undecidable [13], but decidable for finitevalued transducers [23]. Another well-known subclass is that of the determinisable transducers [5], defining sequential functions of words. Finite-valuedness and determinisability are two properties decidable in PTIME, i.e., it is decidable in PTIME, given a transducer, whether it is finite-valued (resp. determinisable). As a second example of automata with outputs, we also consider sum-automata, i.e. automata with outputs in (Z, +, 0), which defines relations from words to Z. Properties such as functionality, determinisability, and k-valuedness (for a fixed k) are decidable in PTIME for sum-automata [11,10].In our e...