Commit c0b77b2e authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

cgi: do not display Inf(0) for state-based BA

* 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.
parent 3edd55fc
...@@ -332,9 +332,12 @@ def print_stats(automaton, detinfo = False, ta = False): ...@@ -332,9 +332,12 @@ def print_stats(automaton, detinfo = False, ta = False):
's' if stats.sub_transitions > 1 else '')) 's' if stats.sub_transitions > 1 else ''))
if hasattr(automaton, 'get_acceptance'): if hasattr(automaton, 'get_acceptance'):
acc = automaton.get_acceptance() acc = automaton.get_acceptance()
unbufprint(", acceptance condition: " + str(acc)) if automaton.is_sba() and automaton.acc().is_buchi():
if acc.is_true(): unbufprint(", acceptance condition: Büchi")
unbufprint(" (all cycles are accepting)") else:
unbufprint(", acceptance condition: " + str(acc))
if acc.is_true():
unbufprint(" (all cycles are accepting)")
unbufprint("</p>\n") unbufprint("</p>\n")
# Decide whether we will render the automaton or not. # Decide whether we will render the automaton or not.
# (A webserver is not a computation center...) # (A webserver is not a computation center...)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment