Add the simulation in the Spot web interface.
* wrap/python/ajax/spot.in: Add the simulation. * wrap/python/ajax/protocol.txt: Add the direct simulation in the automaton simplifications section. * wrap/python/spot.i (simulation_new): Create a function which takes an automaton and a call to the simulation with the good template parameter. * wrap/python/ajax/ltl2tgba.html: Add the direct simulation checkbox.
This commit is contained in:
parent
085ea52bf5
commit
dfcaed034e
4 changed files with 16 additions and 1 deletions
|
|
@ -445,6 +445,11 @@ an identifier: <span class="formula">aUb</span> is an atomic proposition, unlike
|
|||
<INPUT type="checkbox" name="as" value="wd">
|
||||
minimize obligation properties
|
||||
</label><br>
|
||||
<label class="rtip" title="<b>Direct Simulation</b> tries to reduce the automaton with simulation reduction.">
|
||||
<INPUT type="checkbox" name="as" value="rs">
|
||||
direct simulation
|
||||
</label><br>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="run-tabs" class="ui-widget ui-widget-content ui-corner-all collapsible shadow">
|
||||
|
|
|
|||
|
|
@ -71,3 +71,4 @@ Automaton simplifications (pick many)
|
|||
|
||||
as=ps Prune SCC
|
||||
as=wd WDBA minimiztion
|
||||
as=rs Simulation reduction
|
||||
|
|
|
|||
|
|
@ -411,11 +411,14 @@ if output_type == 'm':
|
|||
# Automaton simplifications
|
||||
prune_scc = False
|
||||
wdba_minimize = False
|
||||
simul_minimize = False
|
||||
for s in form.getlist('as'):
|
||||
if s == 'ps':
|
||||
prune_scc = True
|
||||
elif s == 'wd':
|
||||
wdba_minimize = True
|
||||
elif s == 'rs':
|
||||
simul_minimize = True
|
||||
|
||||
if output_type == 'a':
|
||||
buchi_type = form.getfirst('af', 't')
|
||||
|
|
@ -447,6 +450,10 @@ if wdba_minimize:
|
|||
minimized = 0
|
||||
degen = False # No need to degeneralize anymore
|
||||
issba = True
|
||||
simul_minimize = False # No need to simulate anymore
|
||||
|
||||
if simul_minimize:
|
||||
automaton = spot.simulation(automaton)
|
||||
|
||||
if degen or neverclaim:
|
||||
degen = spot.tgba_sba_proxy(automaton)
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@
|
|||
#include "tgbaalgos/save.hh"
|
||||
#include "tgbaalgos/sccfilter.hh"
|
||||
#include "tgbaalgos/stats.hh"
|
||||
#include "tgbaalgos/simulation.hh"
|
||||
|
||||
using namespace spot::ltl;
|
||||
using namespace spot;
|
||||
|
|
@ -186,7 +187,7 @@ using namespace spot;
|
|||
%feature("new") spot::tgba::get_init_state;
|
||||
%feature("new") spot::tgba::succ_iter;
|
||||
%feature("new") spot::tgba_succ_iterator::current_state;
|
||||
|
||||
%feature("new") spot::simulation;
|
||||
// Help SWIG with namespace lookups.
|
||||
#define ltl spot::ltl
|
||||
%include "tgba/bdddict.hh"
|
||||
|
|
@ -230,6 +231,7 @@ using namespace spot;
|
|||
%include "tgbaalgos/save.hh"
|
||||
%include "tgbaalgos/sccfilter.hh"
|
||||
%include "tgbaalgos/stats.hh"
|
||||
%include "tgbaalgos/simulation.hh"
|
||||
#undef ltl
|
||||
|
||||
%extend spot::ltl::formula {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue