cgi: Add an nondeterministic monitor option
* src/tgbaalgos/postproc.hh (run): Rename the first argument as input_disown to help Swig. * wrap/python/spot.i: Wrap spot::postprocessor. * wrap/python/ajax/ltl2tgba.html, wrap/python/ajax/protocol.txt: Add an option for nondeterministic monitor. * wrap/python/ajax/spot.in: Honor the new option, and rewrite the monitor production using postprocessor.
This commit is contained in:
parent
c892599494
commit
abb5170565
5 changed files with 29 additions and 10 deletions
|
|
@ -504,6 +504,10 @@ an identifier: <span class="formula">aUb</span> is an atomic proposition, unlike
|
|||
<INPUT type="radio" name="mf" value="d" checked>
|
||||
a deterministic monitor
|
||||
</label><br>
|
||||
<label class="rtip" title="A nondeterministic monitor is an NFA that accepts all the prefixes of the executions that satisfy the formula.">
|
||||
<INPUT type="radio" name="mf" value="n" checked>
|
||||
a nondeterministic monitor
|
||||
</label><br>
|
||||
</div>
|
||||
<div id="tabs-oa">
|
||||
Translate the (simplified) formula as:<br>
|
||||
|
|
|
|||
|
|
@ -36,9 +36,10 @@ Type of automaton if o=a (pick one)
|
|||
af=s SBA
|
||||
af=i Spin neverclaim
|
||||
|
||||
Type of monitor if o=m (pick one -- no choice)
|
||||
Type of monitor if o=m (pick one)
|
||||
|
||||
mf=d
|
||||
mf=d deterministic
|
||||
mf=n nondeterministic
|
||||
|
||||
Type of automaton for run if o=r (pick one)
|
||||
|
||||
|
|
|
|||
|
|
@ -571,9 +571,15 @@ elif translator == 'l3':
|
|||
|
||||
# Monitor output
|
||||
if output_type == 'm':
|
||||
issba = False
|
||||
automaton = spot.scc_filter(automaton)
|
||||
automaton = spot.minimize_monitor(automaton)
|
||||
issba = True
|
||||
mf = form.getfirst('mf', 'd')
|
||||
pp = spot.postprocessor()
|
||||
pp.set_type(spot.postprocessor.Monitor)
|
||||
if mf == 'd':
|
||||
pp.set_pref(spot.postprocessor.Deterministic)
|
||||
elif mf == 'n':
|
||||
pp.set_pref(spot.postprocessor.Small)
|
||||
automaton = pp.run(automaton, f)
|
||||
unbufprint('<div class="automata-stats">')
|
||||
dont_run_dot = print_stats(automaton)
|
||||
unbufprint('</div>')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue