Use shared_ptr for the emptiness check interfaces.
At the same time, this adds a is_empty() method to the tgba class, simplifying many places that ran emptiness checks. * iface/dve2/dve2check.cc, src/bin/ltlcross.cc, src/dstarparse/dra2ba.cc, src/ltlvisit/contain.cc, src/tgba/tgba.cc, src/tgba/tgba.hh, src/tgbaalgos/emptiness.cc, src/tgbaalgos/emptiness.hh, src/tgbaalgos/gtec/ce.cc, src/tgbaalgos/gtec/ce.hh, src/tgbaalgos/gtec/gtec.cc, src/tgbaalgos/gtec/gtec.hh, src/tgbaalgos/gv04.cc, src/tgbaalgos/gv04.hh, src/tgbaalgos/magic.cc, src/tgbaalgos/magic.hh, src/tgbaalgos/minimize.cc, src/tgbaalgos/ndfs_result.hxx, src/tgbaalgos/powerset.cc, src/tgbaalgos/projrun.cc, src/tgbaalgos/projrun.hh, src/tgbaalgos/reducerun.cc, src/tgbaalgos/reducerun.hh, src/tgbaalgos/replayrun.cc, src/tgbaalgos/replayrun.hh, src/tgbaalgos/rundotdec.cc, src/tgbaalgos/rundotdec.hh, src/tgbaalgos/se05.cc, src/tgbaalgos/se05.hh, src/tgbaalgos/tau03.cc, src/tgbaalgos/tau03.hh, src/tgbaalgos/tau03opt.cc, src/tgbaalgos/tau03opt.hh, src/tgbaalgos/word.cc, src/tgbaalgos/word.hh, src/tgbatest/checkpsl.cc, src/tgbatest/complementation.cc, src/tgbatest/emptchk.cc, src/tgbatest/ltl2tgba.cc, src/tgbatest/randtgba.cc, wrap/python/ajax/spot.in, wrap/python/spot.i: Use shared_ptr.
This commit is contained in:
parent
803e17bb8d
commit
6d7c258fd7
42 changed files with 335 additions and 402 deletions
|
|
@ -102,7 +102,6 @@ if not script:
|
|||
httpd.serve_forever()
|
||||
|
||||
import cgi
|
||||
import cgitb; cgitb.enable()
|
||||
import signal
|
||||
import time
|
||||
import os.path
|
||||
|
|
@ -120,6 +119,9 @@ sys.stdout = os.fdopen(sys.stdout.fileno(), "wb", 0)
|
|||
# even errors from subprocesses get printed).
|
||||
os.dup2(sys.stdout.fileno(), sys.stderr.fileno())
|
||||
|
||||
import cgitb
|
||||
sys.excepthook = cgitb.Hook(file=sys.stderr)
|
||||
|
||||
# Create the temporary cache directory
|
||||
os.mkdir(tmpdir, 493) # See comment above about 0o755 or 0755.
|
||||
|
||||
|
|
@ -533,7 +535,7 @@ elif translator == 'ta':
|
|||
refined_rules = False
|
||||
if form.getfirst('ta', '') == 'lc':
|
||||
refined_rules = True
|
||||
automaton = spot.ltl_to_taa(f, dict, refined_rules)
|
||||
automaton = spot.tgba_dupexp_dfs(spot.ltl_to_taa(f, dict, refined_rules))
|
||||
elif translator == 'l3':
|
||||
l3out = '-T'
|
||||
l3opt = { '-l', '-P', '-A', '-c', '-C', '-o', '-p' }
|
||||
|
|
@ -770,7 +772,7 @@ if output_type == 'r':
|
|||
err = ""
|
||||
opt = (form.getfirst('ec', 'Cou99') + "(" +
|
||||
form.getfirst('eo', '') + ")")
|
||||
eci, err = spot.emptiness_check_instantiator.construct(opt)
|
||||
eci, err = spot.make_emptiness_check_instantiator(opt)
|
||||
|
||||
if not eci:
|
||||
unbufprint('<div class="parse-error">Cannot parse "' + opt
|
||||
|
|
@ -824,8 +826,4 @@ if output_type == 'r':
|
|||
del ec_run
|
||||
del ec_res
|
||||
unbufprint('</div>')
|
||||
del ec
|
||||
del ec_a
|
||||
degen = 0
|
||||
automaton = 0
|
||||
finish()
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
// sed 's/.*<\(.*\)>.*/%shared_ptr(spot::\1)/g'
|
||||
%shared_ptr(spot::bdd_dict)
|
||||
%shared_ptr(spot::dstar_aut)
|
||||
%shared_ptr(spot::dstar_aut)
|
||||
%shared_ptr(spot::future_conditions_collector)
|
||||
%shared_ptr(spot::kripke)
|
||||
%shared_ptr(spot::saba)
|
||||
|
|
@ -56,6 +55,10 @@
|
|||
%shared_ptr(spot::tgba_sgba_proxy)
|
||||
%shared_ptr(spot::tgta)
|
||||
%shared_ptr(spot::tgta_explicit)
|
||||
%shared_ptr(spot::tgba_run)
|
||||
%shared_ptr(spot::emptiness_check)
|
||||
%shared_ptr(spot::emptiness_check_result)
|
||||
%shared_ptr(spot::emptiness_check_instantiator)
|
||||
|
||||
namespace std {
|
||||
%template(liststr) list<string>;
|
||||
|
|
@ -203,19 +206,8 @@ using namespace spot;
|
|||
%include "ltlvisit/simplify.hh"
|
||||
%include "ltlvisit/tostring.hh"
|
||||
%include "ltlvisit/tunabbrev.hh"
|
||||
%include "ltlvisit/apcollect.hh"
|
||||
%include "ltlvisit/lbt.hh"
|
||||
|
||||
%feature("new") spot::emptiness_check::check;
|
||||
%feature("new") spot::emptiness_check_instantiator::construct;
|
||||
%feature("new") spot::emptiness_check_instantiator::instanciate;
|
||||
%feature("new") spot::emptiness_check_result::accepting_run;
|
||||
%feature("new") spot::explicit_magic_search;
|
||||
%feature("new") spot::explicit_se05_search;
|
||||
%feature("new") spot::tgba::get_init_state;
|
||||
%feature("new") spot::tgba::succ_iter;
|
||||
%feature("new") spot::tgba_succ_iterator::current_state;
|
||||
|
||||
// Help SWIG with namespace lookups.
|
||||
#define ltl spot::ltl
|
||||
%include "tgba/bddprint.hh"
|
||||
|
|
@ -232,6 +224,9 @@ namespace spot {
|
|||
};
|
||||
}
|
||||
|
||||
// Should come after the definition of tgba_digraph
|
||||
%include "ltlvisit/apcollect.hh"
|
||||
|
||||
%include "tgbaalgos/degen.hh"
|
||||
%include "tgbaalgos/dottydec.hh"
|
||||
%include "tgbaalgos/dotty.hh"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue