
Hi, I'm using / comparing Spot and other tools in the Rabin to Parity translation. I have two questions (to ensure my comparison is fair): 1) I want to minimize the input automata using Spot to remove the effects of preprocessing done by each tool as much as possible. However, I require that the acceptance condition remains a Rabin condition. Right now, I am using the call autfilt --remove-dead-states --cleanup-acceptance --remove-unused-ap --simplify-exclusive-ap --simplify-acc --partial-degeneralize --generalized-rabin --deterministic The last two are an effort to ensure that simplify-acc doesn't change the acceptance condition. 2) What are the ways to tell spot to translate DRA to DPA? Right now, I am using autfilt --hoa --deterministic --parity. This seems to be a sort of black box (which is fine with me). Just to make sure: Are there other DRA-to-DPA translations included in Spot which are worthwhile to be investigated? Cheers, Tobias

Hi Tobias ! Tobias Meggendorfer <tobias.meggendorfer@ist.ac.at> writes:
1) I want to minimize the input automata using Spot to remove the effects of preprocessing done by each tool as much as possible. However, I require that the acceptance condition remains a Rabin condition. Right now, I am using the call
autfilt --remove-dead-states --cleanup-acceptance --remove-unused-ap --simplify-exclusive-ap --simplify-acc --partial-degeneralize --generalized-rabin --deterministic
--simplify-exclusive-ap does not make sense without specifying exclusive APs with --exclusive-ap, but it's unlikely that it makes sense in your case. Here it has no effect. --simplify-acc already implies --cleanup-acceptance, and will simplify the formula of the acceptance conditions as it can, but it cannot be restricted to produce a specific type of output. This is really meant as a preprocessing for algorithms that works on arbitrary acceptance. The order in which you list the options does not influence the order in which autfilt executes their algorithms. Generally if you want to be sure that some algorithm is executed before another one, you need to call autfilt multiple times, or check the order in the code (yes, this is not very nice). Here the order of execution is 1. simplify acceptance condition 2. remove dead states 3. partial degeneralize 4. postprocess automaton (with type --generic [by default], preference --deterministic, and level --high [default once --deterministic is given]) 5. convert to generalized_rabin 6. remove unused AP --generalized-rabin is (unfortunately) an algorithm and not a simplification constraint for the postprocessor (which is a piece of spaghetti code normally in share of deciding what algorithm should be run to convert and simplify an automaton into the desired type, so you don't have to find that by yourself). So far Spot's postprocessor does not know how to output Rabin or Generalized Rabin output. removing dead states and simplifying the acceptance conditions is already done by the postprocessor, so I don't think you need to run those first. I believe removing AP is done as well (I remember we recently fixed one scenario where that was unexpectedly not done, but I don't think it was on the --generic path).
The last two are an effort to ensure that simplify-acc doesn't change the acceptance condition.
If the input is Rabin, I do not think that simplify-acceptance can currently do much more than producing what we call Rabin-like (i.e. Rabin with some pairs simplified to a single Inf or Fin). So just running generalized-Rabin on the output of the postprocessor should be enough to get add any missing Fin (you may still have generalized pairs without Inf) autfilt --deterministic --generalized-rabin The only case I can think where using partial-degeneralize would help is if you have for instance (Fin(0) & Inf(1)) | (Fin(2) & Inf(3)) | (Fin(4) & Inf(5)) where Inf(1) and Inf(3) are always satisfied by the automaton. Then simplify-acc will output Fin(0) | Fin(2) | (Fin(4) & Inf(5)) and partial-degeneralization would enlarge the automaton to produce a final formula like Fin(0) | (Fin(1) & Inf(2)). It's unclear if this partial-degeneralization can be presented as a "simplification" since the result has more states. When we did the benchmark for our ATVA'20 paper, we found that was generally better, but that there were a few cases that were better paritized without partial degeneralization. Anyway, if you always prefer a smaller number of Rabin pairs even at the cost of more states, it makes sense to use: autfilt --cleanup-acceptance --partial-degeneralize \ --deterministic --generalized-rabin I don't think you need more options. Eventually one might hope that we teach the postprocessor how to produce Rabin/generalizedRabin, so that users do not have to find what need to be executed before and after, but even if it did, it's still unclear if the goal should be to minimize the number of states or the number of pairs...
2) What are the ways to tell spot to translate DRA to DPA? Right now, I am using autfilt --hoa --deterministic --parity. This seems to be a sort of black box (which is fine with me).
Yes, this goes through the aforementioned postprocessor, which is in charge of deciding how to determinize and convert the input to parity. No determinization to be done here, luckily. Paritization is done via the monster procedure presented in our ATVA'20 paper, but in the case of DRA input it mostly reduces to your LCS'17 paper, modulo a few differences: - the above acceptance simplifications are done on each component (not only at the automaton level), - we use some heuristics for ordering the move of multiple colors at once in a record, - and we propagate the colors of edges to their neighboring edges when it is guaranteed to be equivalent (if all outgoing edges (non-self-loop) of a state share some colors, those colors can be added to all incoming edges (non-self-loops), and vice-versa). Because this goes through the postprocessor, it will also be slowed down by some clostly simplifications that are later attempted on the DPA. You can disable those with '-x wdba-minimize=0,simul=0' if you prefer.
Just to make sure: Are there other DRA-to-DPA translations included in Spot which are worthwhile to be investigated?
That's the only implementation we have, but you also have to option to write a small Python script or C++ program that calls the to_parity() function in case you want to test it in isolation, or play with its options. The guy to talk to if you need more details about to_parity() is Florian Renkin, in Cc:. Alexandre

--simplify-exclusive-ap does not make sense without specifying exclusive APs with --exclusive-ap, but it's unlikely that it makes sense in your case. Here it has no effect. Oops. I basically just threw whatever switch looked like "simplify" on
Hi Alexandre, thank you for the detailed answer, this helps me a lot :-) Some replies below (not sure if this still belongs on the mailing list, feel free to block it :-) ) On 18.03.2021 13:11, Alexandre Duret-Lutz wrote: there :-)
It's unclear if this partial-degeneralization can be presented as a "simplification" since the result has more states. When we did the benchmark for our ATVA'20 paper, we found that was generally better, but that there were a few cases that were better paritized without partial degeneralization. Anyway, if you always prefer a smaller number of Rabin pairs even at the cost of more states, it makes sense to use:
autfilt --cleanup-acceptance --partial-degeneralize \ --deterministic --generalized-rabin I don't think you need more options. Eventually one might hope that we teach the postprocessor how to produce Rabin/generalizedRabin, so that users do not have to find what need to be executed before and after, but even if it did, it's still unclear if the goal should be to minimize the number of states or the number of pairs... I see, thanks. Since the number of pairs influences worst-case exponentially I think it is fair to use this as pre-processing. I'm working with randomly generated automata which might have extremely stupid structures and I just want to ensure that the most obvious things are removed, so that tools that don't figure out these obvious things don't get an inherent disadvantage. Since all tools start from the same data-set it doesn't matter that much if the number of states is blown up a bit :)
Because this goes through the postprocessor, it will also be slowed down by some clostly simplifications that are later attempted on the DPA. You can disable those with '-x wdba-minimize=0,simul=0' if you prefer. Oh great! I want to compare the constructions both with and without "more advanced, generic" post-processing options, this is probably exactly the switch I am looking for. Arguably "more advanced, generic" is quite vague, basically I want to make Spot run only that dra-to-dpa construction without too much fuzz around it, since Spot is just so damn good at optimizing the automata that comparison to not-so-well-optimized tools are always a bit tricky =). Of course, passing all generated automata through the post-processor of Spot is an option, too, but I prefer to have both comparisons (then we also see how much potential for optimization other constructions have).
Btw, how does the "-x ..." switch compare to "--low"? Adding "--low" to "--parity --deterministic" does not seem to change much.
Just to make sure: Are there other DRA-to-DPA translations included in Spot which are worthwhile to be investigated?
That's the only implementation we have, but you also have to option to write a small Python script or C++ program that calls the to_parity() function in case you want to test it in isolation, or play with its options. Thanks, but I think this is sufficient then. I only want to compare to state-of-the-art :-) If "autfilt --parity --deterministic" gives the "best" dra-to-dpa translation Spot can offer, this is exactly what I need.

Tobias Meggendorfer <tobias.meggendorfer@ist.ac.at> writes:
Btw, how does the "-x ..." switch compare to "--low"? Adding "--low" to "--parity --deterministic" does not seem to change much.
For deterministic input --low has no influence on the simulation-based reduction. --low disables iterated simulations (running forward and backward simulation-based reductions until nothing is simplified anymore), and replaces it by a single forward simulation pass. However when working on deterministic automata, backward simulation is not necessary anyway (and therefore never done). --low replaces "simplify-acceptance" by "cleanup-acceptance" in the postprocessor (i.e., not the additional simplify-acceptance you are calling in autfilt first). Basically this now only removes unused sets without trying to find inclusion between sets or doing unit-propagation on the formula. It's possible that cleanup-acceptance might be enough on DRA. --low disables WDBA minimization (i.e. detecting whether the input language can be represented by a Weak DBA, and returning the minimal WDBA if that's the case). So this implies -x wdba-minimize=0. In the current development code --low disables remove_unused_ap(), but in the current release I don't think it does. You can see the documentation for -x simul and -x wdba-minimize in https://spot.lrde.epita.fr/man/spot-x.7.html These two are the usual culprits when a ltl2tgba or autfilt takes too long.
participants (2)
-
Alexandre Duret-Lutz
-
Tobias Meggendorfer