From c0b77b2e620999a71f3223505e2837b67fecfd62 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 6 Aug 2015 16:29:55 +0200 Subject: [PATCH] cgi: do not display Inf(0) for state-based BA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * wrap/python/ajax/spotcgi.in: If the output is a state-based BA, i.e., displayed with double circles, then do not output "Inf(0)" as acceptance condition as that is confusing. Print "Büchi" instead. --- wrap/python/ajax/spotcgi.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wrap/python/ajax/spotcgi.in b/wrap/python/ajax/spotcgi.in index 90a1b7893..071e78347 100755 --- a/wrap/python/ajax/spotcgi.in +++ b/wrap/python/ajax/spotcgi.in @@ -332,9 +332,12 @@ def print_stats(automaton, detinfo = False, ta = False): 's' if stats.sub_transitions > 1 else '')) if hasattr(automaton, 'get_acceptance'): acc = automaton.get_acceptance() - unbufprint(", acceptance condition: " + str(acc)) - if acc.is_true(): - unbufprint(" (all cycles are accepting)") + if automaton.is_sba() and automaton.acc().is_buchi(): + unbufprint(", acceptance condition: Büchi") + else: + unbufprint(", acceptance condition: " + str(acc)) + if acc.is_true(): + unbufprint(" (all cycles are accepting)") unbufprint("

\n") # Decide whether we will render the automaton or not. # (A webserver is not a computation center...)