Commit 67e3a4f2 authored by Alexandre GBAGUIDI AISSE's avatar Alexandre GBAGUIDI AISSE
Browse files

spot: Add 'langmap' option with dichotomy (it helps to choose min val)

* python/spot/__init__.py: Handle 'dicho' option in 'sat_minimize'.
* spot/priv/satcommon.cc: Implement get_number_of_distinct_vals.
* spot/priv/satcommon.hh: Declare get_number_of_distinct_vals.
* spot/twaalgos/dtbasat.cc: Use get_number_of_distinct_vals.
* spot/twaalgos/dtbasat.hh: Change dichotomy function's prototype.
* spot/twaalgos/dtwasat.cc: Use get_number_of_distinct_vals.
* spot/twaalgos/dtwasat.hh: Change dichotomy function's prototype.
Handle options.
* spot/twaalgos/postproc.cc: Handle options.
* spot/twaalgos/postproc.hh: Add dicho_langmap_ var for options.
* tests/core/satmin2.test: Add tests for dichotomy.
* tests/core/satmin.test: Add tests for dichotomy.
* tests/python/satmin.py: Replace 'dichotomy' with 'dicho' option.
parent 7046a496
......@@ -858,7 +858,7 @@ for fun in ['remove_x', 'relabel', 'relabel_bse',
# Better interface to the corresponding C++ function.
def sat_minimize(aut, acc=None, colored=False,
state_based=False, states=0,
max_states=0, dichotomy=False,
max_states=0, dicho=False,
param=0, incr=False, assume=False):
args=''
if acc is not None:
......@@ -875,8 +875,8 @@ def sat_minimize(aut, acc=None, colored=False,
if type(max_states) is not int or max_states < 0:
raise ValueError("argument 'states' should be a positive integer")
args += ',max-states=' + str(max_states)
if dichotomy:
args += ',dichotomy'
if dicho:
args += ',dicho';
if param:
args += ',param=' + str(param)
if incr:
......
......@@ -19,6 +19,7 @@
#include <fstream>
#include <set>
#include <assert.h>
#include <spot/misc/escape.hh>
#include <spot/priv/satcommon.hh>
......@@ -185,4 +186,13 @@ namespace spot
out << "\"\n";
}
}
int
get_number_of_distinct_vals(std::vector<unsigned> v)
{
std::set<unsigned> distinct;
for (auto it = v.begin(); it != v.end(); ++it)
distinct.insert(*it);
return distinct.size();
}
}
......@@ -21,6 +21,7 @@
#include <tuple>
#include <sstream>
#include <vector>
#include <spot/misc/bddlt.hh>
#include <spot/misc/satsolver.hh>
#include <spot/misc/timer.hh>
......@@ -235,4 +236,8 @@ public:
void
print_log(timer_map& t, int target_state_number, twa_graph_ptr& res,
satsolver& solver);
/// \brief Returns the number of distinct values containted in a vector.
int
get_number_of_distinct_vals(std::vector<unsigned> v);
}
......@@ -25,6 +25,7 @@
#include <spot/misc/timer.hh>
#include <spot/priv/satcommon.hh>
#include <spot/twaalgos/dtbasat.hh>
#include <spot/twaalgos/langmap.hh>
#include <spot/twaalgos/sccinfo.hh>
#include <spot/twaalgos/stats.hh>
......@@ -1005,11 +1006,19 @@ namespace spot
twa_graph_ptr
dtba_sat_minimize_dichotomy(const const_twa_graph_ptr& a,
bool state_based, int max_states)
bool state_based, bool langmap, int max_states)
{
trace << "Dichomoty\n";
if (max_states < 0)
max_states = stats_reachable(a).states - 1;
int min_states = 1;
if (langmap)
{
trace << "Langmap\n";
std::vector<unsigned> v = language_map(a);
min_states = get_number_of_distinct_vals(v);
}
trace << "min_states=" << min_states << '\n';
twa_graph_ptr prev = nullptr;
while (min_states <= max_states)
......
......@@ -64,6 +64,7 @@ namespace spot
SPOT_API twa_graph_ptr
dtba_sat_minimize_dichotomy(const const_twa_graph_ptr& a,
bool state_based = false,
bool langmap = false,
int max_states = -1);
/// \brief Attempt to minimize a det. TBA with a SAT solver.
......
......@@ -30,6 +30,7 @@
#include <spot/twaalgos/dtbasat.hh>
#include <spot/twaalgos/dtwasat.hh>
#include <spot/twaalgos/isdet.hh>
#include <spot/twaalgos/langmap.hh>
#include <spot/twaalgos/postproc.hh>
#include <spot/twaalgos/sbacc.hh>
#include <spot/twaalgos/sccfilter.hh>
......@@ -1338,12 +1339,20 @@ namespace spot
dtwa_sat_minimize_dichotomy(const const_twa_graph_ptr& a,
unsigned target_acc_number,
const acc_cond::acc_code& target_acc,
bool state_based, int max_states,
bool colored)
bool state_based, bool langmap,
int max_states, bool colored)
{
trace << "Dichotomy\n";
if (max_states < 1)
max_states = stats_reachable(a).states - 1;
int min_states = 1;
if (langmap)
{
trace << "Langmap\n";
std::vector<unsigned> v = language_map(a);
min_states = get_number_of_distinct_vals(v);
}
trace << "min_states=" << min_states << '\n';
twa_graph_ptr prev = nullptr;
while (min_states <= max_states)
......@@ -1382,10 +1391,11 @@ namespace spot
throw std::runtime_error
("SAT-based minimization only works with deterministic automata");
bool dicho = om.get("dichotomy", 0);
bool incr = om.get("incr", 0);
bool assume = om.get("assume", 0);
int param = om.get("param", 0);
bool dicho = om.get("dicho", 0);
bool dicho_langmap = om.get("langmap", 0);
int states = om.get("states", -1);
int max_states = om.get("max-states", -1);
auto accstr = om.get_str("acc");
......@@ -1492,9 +1502,12 @@ namespace spot
a = dtwa_sat_minimize_assume(a, nacc, target_acc, state_based,
max_states, colored, param);
else if (dicho)
a = dtwa_sat_minimize_dichotomy
(a, nacc, target_acc, state_based, dicho_langmap, max_states,
colored);
else
a = (dicho ? dtwa_sat_minimize_dichotomy
: dtwa_sat_minimize)
a = dtwa_sat_minimize
(a, nacc, target_acc, state_based, max_states, colored);
}
else
......@@ -1505,10 +1518,12 @@ namespace spot
else if (assume)
a = dtba_sat_minimize_assume(a, state_based, max_states, assume);
else if (dicho)
a = dtba_sat_minimize_dichotomy
(a, state_based, dicho_langmap, max_states);
else
a = (dicho ? dtba_sat_minimize_dichotomy
: dtba_sat_minimize)
(a, state_based, max_states);
a = dtba_sat_minimize(a, state_based, max_states);
}
if (!a && !user_supplied_acc)
......
......@@ -80,6 +80,7 @@ namespace spot
unsigned target_acc_number,
const acc_cond::acc_code& target_acc,
bool state_based = false,
bool langmap = false,
int max_states = -1,
bool colored = false);
......
......@@ -71,6 +71,7 @@ namespace spot
tba_determinisation_ = opt->get("tba-det", 0);
sat_minimize_ = opt->get("sat-minimize", 0);
param_ = opt->get("param", 0);
dicho_langmap_ = opt->get("langmap", 0);
sat_acc_ = opt->get("sat-acc", 0);
sat_states_ = opt->get("sat-states", 0);
state_based_ = opt->get("state-based", 0);
......@@ -429,7 +430,8 @@ namespace spot
else if (sat_minimize_ == 1 || sat_minimize_ == -1)
res = dtba_sat_minimize(res, state_based_);
else if (sat_minimize_ == 2)
res = dtba_sat_minimize_dichotomy(res, state_based_);
res = dtba_sat_minimize_dichotomy
(res, state_based_, dicho_langmap_);
else if (sat_minimize_ == 3)
res = dtba_sat_minimize_incr(res, state_based_, -1, param_);
else // if (sat_minimize == 4)
......@@ -451,7 +453,7 @@ namespace spot
res = dtwa_sat_minimize_dichotomy
(res, target_acc,
acc_cond::acc_code::generalized_buchi(target_acc),
state_based_);
state_based_, dicho_langmap_);
else if (sat_minimize_ == 3)
res = dtwa_sat_minimize_incr
(res, target_acc,
......
......@@ -190,6 +190,7 @@ namespace spot
bool tba_determinisation_ = false;
int sat_minimize_ = 0;
int param_ = 0;
bool dicho_langmap_ = false;
int sat_acc_ = 0;
int sat_states_ = 0;
bool state_based_ = false;
......
......@@ -103,21 +103,22 @@ $ltlcross -F formulas \
"{5} $ltl2tgba --det --lbtt -x sat-states=3 %f >%T" \
"{6} $ltl2tgba --det --lbtt -x sat-minimize %f >%T" \
"{7} $ltl2tgba --det --lbtt -x sat-minimize=2 %f >%T" \
"{8} $ltl2tgba --det --lbtt -x sat-minimize=3 %f >%T" \
"{9} $ltl2tgba --det --lbtt -x 'sat-minimize=3, param=-1' %f >%T" \
"{10} $ltl2tgba --det --lbtt -x 'sat-minimize=3, param=0' %f >%T" \
"{11} $ltl2tgba --det --lbtt -x 'sat-minimize=3, param=1' %f >%T" \
"{12} $ltl2tgba --det --lbtt -x 'sat-minimize=3, param=2' %f >%T" \
"{13} $ltl2tgba --det --lbtt -x 'sat-minimize=3, param=50' %f >%T" \
"{14} $ltl2tgba --det --lbtt -x 'sat-minimize=4, param=0' %f >%T" \
"{15} $ltl2tgba --det --lbtt -x 'sat-minimize=4, param=1' %f >%T" \
"{16} $ltl2tgba --det --lbtt -x 'sat-minimize=4, param=2' %f >%T" \
"{17} $ltl2tgba --det --lbtt -x 'sat-minimize=4, param=50' %f >%T" \
"{8} $ltl2tgba --det --lbtt -x 'sat-minimize=2,langmap' %f >%T" \
"{9} $ltl2tgba --det --lbtt -x sat-minimize=3 %f >%T" \
"{10} $ltl2tgba --det --lbtt -x 'sat-minimize=3, param=-1' %f >%T" \
"{11} $ltl2tgba --det --lbtt -x 'sat-minimize=3, param=0' %f >%T" \
"{12} $ltl2tgba --det --lbtt -x 'sat-minimize=3, param=1' %f >%T" \
"{13} $ltl2tgba --det --lbtt -x 'sat-minimize=3, param=2' %f >%T" \
"{14} $ltl2tgba --det --lbtt -x 'sat-minimize=3, param=50' %f >%T" \
"{15} $ltl2tgba --det --lbtt -x 'sat-minimize=4, param=0' %f >%T" \
"{16} $ltl2tgba --det --lbtt -x 'sat-minimize=4, param=1' %f >%T" \
"{17} $ltl2tgba --det --lbtt -x 'sat-minimize=4, param=2' %f >%T" \
"{18} $ltl2tgba --det --lbtt -x 'sat-minimize=4, param=50' %f >%T" \
--csv=det.csv
grep -v ',\"5\",' det.csv | cut -d ',' -f '1,2,6' > output
cat > expected <<EOF
cat >expected <<'EOF'
"formula","tool","states"
"X(X(p0))","1",4
"X(X(p0))","2",4
......@@ -135,6 +136,7 @@ cat > expected <<EOF
"X(X(p0))","15",4
"X(X(p0))","16",4
"X(X(p0))","17",4
"X(X(p0))","18",4
"!(X(X(p0)))","1",4
"!(X(X(p0)))","2",4
"!(X(X(p0)))","3",4
......@@ -151,6 +153,7 @@ cat > expected <<EOF
"!(X(X(p0)))","15",4
"!(X(X(p0)))","16",4
"!(X(X(p0)))","17",4
"!(X(X(p0)))","18",4
"G(F((p0) -> (X(X(X(p1))))))","1",1
"G(F((p0) -> (X(X(X(p1))))))","2",1
"G(F((p0) -> (X(X(X(p1))))))","3",1
......@@ -167,6 +170,7 @@ cat > expected <<EOF
"G(F((p0) -> (X(X(X(p1))))))","15",1
"G(F((p0) -> (X(X(X(p1))))))","16",1
"G(F((p0) -> (X(X(X(p1))))))","17",1
"G(F((p0) -> (X(X(X(p1))))))","18",1
"!(G(F((p0) -> (X(X(X(p1)))))))","1",2
"!(G(F((p0) -> (X(X(X(p1)))))))","2",2
"!(G(F((p0) -> (X(X(X(p1)))))))","3",2
......@@ -183,6 +187,7 @@ cat > expected <<EOF
"!(G(F((p0) -> (X(X(X(p1)))))))","15",2
"!(G(F((p0) -> (X(X(X(p1)))))))","16",2
"!(G(F((p0) -> (X(X(X(p1)))))))","17",2
"!(G(F((p0) -> (X(X(X(p1)))))))","18",2
"F((p0) & (X(F((p1) & (X(F((p2) & (X(F(p3))))))))))","1",5
"F((p0) & (X(F((p1) & (X(F((p2) & (X(F(p3))))))))))","2",5
"F((p0) & (X(F((p1) & (X(F((p2) & (X(F(p3))))))))))","3",5
......@@ -199,6 +204,7 @@ cat > expected <<EOF
"F((p0) & (X(F((p1) & (X(F((p2) & (X(F(p3))))))))))","15",5
"F((p0) & (X(F((p1) & (X(F((p2) & (X(F(p3))))))))))","16",5
"F((p0) & (X(F((p1) & (X(F((p2) & (X(F(p3))))))))))","17",5
"F((p0) & (X(F((p1) & (X(F((p2) & (X(F(p3))))))))))","18",5
"!(F((p0) & (X(F((p1) & (X(F((p2) & (X(F(p3)))))))))))","1",4
"!(F((p0) & (X(F((p1) & (X(F((p2) & (X(F(p3)))))))))))","2",4
"!(F((p0) & (X(F((p1) & (X(F((p2) & (X(F(p3)))))))))))","3",4
......@@ -215,6 +221,7 @@ cat > expected <<EOF
"!(F((p0) & (X(F((p1) & (X(F((p2) & (X(F(p3)))))))))))","15",4
"!(F((p0) & (X(F((p1) & (X(F((p2) & (X(F(p3)))))))))))","16",4
"!(F((p0) & (X(F((p1) & (X(F((p2) & (X(F(p3)))))))))))","17",4
"!(F((p0) & (X(F((p1) & (X(F((p2) & (X(F(p3)))))))))))","18",4
"F((p0) & (X((p1) U (p2))))","1",3
"F((p0) & (X((p1) U (p2))))","2",3
"F((p0) & (X((p1) U (p2))))","3",3
......@@ -231,6 +238,7 @@ cat > expected <<EOF
"F((p0) & (X((p1) U (p2))))","15",3
"F((p0) & (X((p1) U (p2))))","16",3
"F((p0) & (X((p1) U (p2))))","17",3
"F((p0) & (X((p1) U (p2))))","18",3
"!(F((p0) & (X((p1) U (p2)))))","1",2
"!(F((p0) & (X((p1) U (p2)))))","2",2
"!(F((p0) & (X((p1) U (p2)))))","3",2
......@@ -247,6 +255,7 @@ cat > expected <<EOF
"!(F((p0) & (X((p1) U (p2)))))","15",2
"!(F((p0) & (X((p1) U (p2)))))","16",2
"!(F((p0) & (X((p1) U (p2)))))","17",2
"!(F((p0) & (X((p1) U (p2)))))","18",2
"F((p0) & (X((p1) & (X(F(p2))))))","1",4
"F((p0) & (X((p1) & (X(F(p2))))))","2",4
"F((p0) & (X((p1) & (X(F(p2))))))","3",4
......@@ -263,6 +272,7 @@ cat > expected <<EOF
"F((p0) & (X((p1) & (X(F(p2))))))","15",4
"F((p0) & (X((p1) & (X(F(p2))))))","16",4
"F((p0) & (X((p1) & (X(F(p2))))))","17",4
"F((p0) & (X((p1) & (X(F(p2))))))","18",4
"!(F((p0) & (X((p1) & (X(F(p2)))))))","1",3
"!(F((p0) & (X((p1) & (X(F(p2)))))))","2",3
"!(F((p0) & (X((p1) & (X(F(p2)))))))","3",3
......@@ -279,6 +289,7 @@ cat > expected <<EOF
"!(F((p0) & (X((p1) & (X(F(p2)))))))","15",3
"!(F((p0) & (X((p1) & (X(F(p2)))))))","16",3
"!(F((p0) & (X((p1) & (X(F(p2)))))))","17",3
"!(F((p0) & (X((p1) & (X(F(p2)))))))","18",3
"(p0) U ((p1) & (X((p2) U (p3))))","1",4
"(p0) U ((p1) & (X((p2) U (p3))))","2",4
"(p0) U ((p1) & (X((p2) U (p3))))","3",4
......@@ -295,6 +306,7 @@ cat > expected <<EOF
"(p0) U ((p1) & (X((p2) U (p3))))","15",4
"(p0) U ((p1) & (X((p2) U (p3))))","16",4
"(p0) U ((p1) & (X((p2) U (p3))))","17",4
"(p0) U ((p1) & (X((p2) U (p3))))","18",4
"!((p0) U ((p1) & (X((p2) U (p3)))))","1",4
"!((p0) U ((p1) & (X((p2) U (p3)))))","2",4
"!((p0) U ((p1) & (X((p2) U (p3)))))","3",4
......@@ -311,6 +323,7 @@ cat > expected <<EOF
"!((p0) U ((p1) & (X((p2) U (p3)))))","15",4
"!((p0) U ((p1) & (X((p2) U (p3)))))","16",4
"!((p0) U ((p1) & (X((p2) U (p3)))))","17",4
"!((p0) U ((p1) & (X((p2) U (p3)))))","18",4
"(G((p0) -> (F(p1)))) & (G((p2) -> (F(p3))))","1",4
"(G((p0) -> (F(p1)))) & (G((p2) -> (F(p3))))","2",4
"(G((p0) -> (F(p1)))) & (G((p2) -> (F(p3))))","3",4
......@@ -327,6 +340,7 @@ cat > expected <<EOF
"(G((p0) -> (F(p1)))) & (G((p2) -> (F(p3))))","15",4
"(G((p0) -> (F(p1)))) & (G((p2) -> (F(p3))))","16",4
"(G((p0) -> (F(p1)))) & (G((p2) -> (F(p3))))","17",4
"(G((p0) -> (F(p1)))) & (G((p2) -> (F(p3))))","18",4
"!((G((p0) -> (F(p1)))) & (G((p2) -> (F(p3)))))","1",3
"!((G((p0) -> (F(p1)))) & (G((p2) -> (F(p3)))))","2",3
"!((G((p0) -> (F(p1)))) & (G((p2) -> (F(p3)))))","3",3
......@@ -343,6 +357,7 @@ cat > expected <<EOF
"!((G((p0) -> (F(p1)))) & (G((p2) -> (F(p3)))))","15",3
"!((G((p0) -> (F(p1)))) & (G((p2) -> (F(p3)))))","16",3
"!((G((p0) -> (F(p1)))) & (G((p2) -> (F(p3)))))","17",3
"!((G((p0) -> (F(p1)))) & (G((p2) -> (F(p3)))))","18",3
"(G(F(p0))) & (G(F(p1)))","1",1
"(G(F(p0))) & (G(F(p1)))","2",1
"(G(F(p0))) & (G(F(p1)))","3",1
......@@ -359,6 +374,7 @@ cat > expected <<EOF
"(G(F(p0))) & (G(F(p1)))","15",1
"(G(F(p0))) & (G(F(p1)))","16",1
"(G(F(p0))) & (G(F(p1)))","17",1
"(G(F(p0))) & (G(F(p1)))","18",1
"!((G(F(p0))) & (G(F(p1))))","1",3
"!((G(F(p0))) & (G(F(p1))))","2",3
"!((G(F(p0))) & (G(F(p1))))","3",3
......@@ -375,6 +391,7 @@ cat > expected <<EOF
"!((G(F(p0))) & (G(F(p1))))","15",3
"!((G(F(p0))) & (G(F(p1))))","16",3
"!((G(F(p0))) & (G(F(p1))))","17",3
"!((G(F(p0))) & (G(F(p1))))","18",3
"(G(F(p0))) | (G(F(p1))) | (G(F(p2)))","1",1
"(G(F(p0))) | (G(F(p1))) | (G(F(p2)))","2",1
"(G(F(p0))) | (G(F(p1))) | (G(F(p2)))","3",1
......@@ -391,6 +408,7 @@ cat > expected <<EOF
"(G(F(p0))) | (G(F(p1))) | (G(F(p2)))","15",1
"(G(F(p0))) | (G(F(p1))) | (G(F(p2)))","16",1
"(G(F(p0))) | (G(F(p1))) | (G(F(p2)))","17",1
"(G(F(p0))) | (G(F(p1))) | (G(F(p2)))","18",1
"!((G(F(p0))) | (G(F(p1))) | (G(F(p2))))","1",2
"!((G(F(p0))) | (G(F(p1))) | (G(F(p2))))","2",2
"!((G(F(p0))) | (G(F(p1))) | (G(F(p2))))","3",2
......@@ -407,6 +425,7 @@ cat > expected <<EOF
"!((G(F(p0))) | (G(F(p1))) | (G(F(p2))))","15",2
"!((G(F(p0))) | (G(F(p1))) | (G(F(p2))))","16",2
"!((G(F(p0))) | (G(F(p1))) | (G(F(p2))))","17",2
"!((G(F(p0))) | (G(F(p1))) | (G(F(p2))))","18",2
"G(F(p0))","1",1
"G(F(p0))","2",1
"G(F(p0))","3",1
......@@ -423,6 +442,7 @@ cat > expected <<EOF
"G(F(p0))","15",1
"G(F(p0))","16",1
"G(F(p0))","17",1
"G(F(p0))","18",1
"!(G(F(p0)))","1",2
"!(G(F(p0)))","2",2
"!(G(F(p0)))","3",2
......@@ -439,6 +459,7 @@ cat > expected <<EOF
"!(G(F(p0)))","15",2
"!(G(F(p0)))","16",2
"!(G(F(p0)))","17",2
"!(G(F(p0)))","18",2
"(p0) U ((p1) U ((p2) U (p3)))","1",4
"(p0) U ((p1) U ((p2) U (p3)))","2",4
"(p0) U ((p1) U ((p2) U (p3)))","3",4
......@@ -455,6 +476,7 @@ cat > expected <<EOF
"(p0) U ((p1) U ((p2) U (p3)))","15",4
"(p0) U ((p1) U ((p2) U (p3)))","16",4
"(p0) U ((p1) U ((p2) U (p3)))","17",4
"(p0) U ((p1) U ((p2) U (p3)))","18",4
"!((p0) U ((p1) U ((p2) U (p3))))","1",4
"!((p0) U ((p1) U ((p2) U (p3))))","2",4
"!((p0) U ((p1) U ((p2) U (p3))))","3",4
......@@ -471,6 +493,7 @@ cat > expected <<EOF
"!((p0) U ((p1) U ((p2) U (p3))))","15",4
"!((p0) U ((p1) U ((p2) U (p3))))","16",4
"!((p0) U ((p1) U ((p2) U (p3))))","17",4
"!((p0) U ((p1) U ((p2) U (p3))))","18",4
"(G((p0) -> (F(p1)))) & (G(p2))","1",2
"(G((p0) -> (F(p1)))) & (G(p2))","2",2
"(G((p0) -> (F(p1)))) & (G(p2))","3",2
......@@ -487,6 +510,7 @@ cat > expected <<EOF
"(G((p0) -> (F(p1)))) & (G(p2))","15",2
"(G((p0) -> (F(p1)))) & (G(p2))","16",2
"(G((p0) -> (F(p1)))) & (G(p2))","17",2
"(G((p0) -> (F(p1)))) & (G(p2))","18",2
"!((G((p0) -> (F(p1)))) & (G(p2)))","1",3
"!((G((p0) -> (F(p1)))) & (G(p2)))","2",3
"!((G((p0) -> (F(p1)))) & (G(p2)))","3",3
......@@ -503,6 +527,7 @@ cat > expected <<EOF
"!((G((p0) -> (F(p1)))) & (G(p2)))","15",3
"!((G((p0) -> (F(p1)))) & (G(p2)))","16",3
"!((G((p0) -> (F(p1)))) & (G(p2)))","17",3
"!((G((p0) -> (F(p1)))) & (G(p2)))","18",3
"((G(p0)) -> (F(p1))) & ((G(!(p0))) -> (F(!(p1))))","1",4
"((G(p0)) -> (F(p1))) & ((G(!(p0))) -> (F(!(p1))))","2",4
"((G(p0)) -> (F(p1))) & ((G(!(p0))) -> (F(!(p1))))","3",4
......@@ -519,6 +544,7 @@ cat > expected <<EOF
"((G(p0)) -> (F(p1))) & ((G(!(p0))) -> (F(!(p1))))","15",4
"((G(p0)) -> (F(p1))) & ((G(!(p0))) -> (F(!(p1))))","16",4
"((G(p0)) -> (F(p1))) & ((G(!(p0))) -> (F(!(p1))))","17",4
"((G(p0)) -> (F(p1))) & ((G(!(p0))) -> (F(!(p1))))","18",4
"!(((G(p0)) -> (F(p1))) & ((G(!(p0))) -> (F(!(p1)))))","1",3
"!(((G(p0)) -> (F(p1))) & ((G(!(p0))) -> (F(!(p1)))))","2",3
"!(((G(p0)) -> (F(p1))) & ((G(!(p0))) -> (F(!(p1)))))","3",3
......@@ -535,6 +561,7 @@ cat > expected <<EOF
"!(((G(p0)) -> (F(p1))) & ((G(!(p0))) -> (F(!(p1)))))","15",3
"!(((G(p0)) -> (F(p1))) & ((G(!(p0))) -> (F(!(p1)))))","16",3
"!(((G(p0)) -> (F(p1))) & ((G(!(p0))) -> (F(!(p1)))))","17",3
"!(((G(p0)) -> (F(p1))) & ((G(!(p0))) -> (F(!(p1)))))","18",3
"(G((p0) -> (F(p1)))) & (G((p1) -> (F(p2))))","1",4
"(G((p0) -> (F(p1)))) & (G((p1) -> (F(p2))))","2",4
"(G((p0) -> (F(p1)))) & (G((p1) -> (F(p2))))","3",4
......@@ -551,6 +578,7 @@ cat > expected <<EOF
"(G((p0) -> (F(p1)))) & (G((p1) -> (F(p2))))","15",3
"(G((p0) -> (F(p1)))) & (G((p1) -> (F(p2))))","16",3
"(G((p0) -> (F(p1)))) & (G((p1) -> (F(p2))))","17",3
"(G((p0) -> (F(p1)))) & (G((p1) -> (F(p2))))","18",3
"!((G((p0) -> (F(p1)))) & (G((p1) -> (F(p2)))))","1",3
"!((G((p0) -> (F(p1)))) & (G((p1) -> (F(p2)))))","2",3
"!((G((p0) -> (F(p1)))) & (G((p1) -> (F(p2)))))","3",3
......@@ -567,6 +595,7 @@ cat > expected <<EOF
"!((G((p0) -> (F(p1)))) & (G((p1) -> (F(p2)))))","15",3
"!((G((p0) -> (F(p1)))) & (G((p1) -> (F(p2)))))","16",3
"!((G((p0) -> (F(p1)))) & (G((p1) -> (F(p2)))))","17",3
"!((G((p0) -> (F(p1)))) & (G((p1) -> (F(p2)))))","18",3
"(G((p0) -> (F(p1)))) & (G((!(p0)) -> (F(!(p1)))))","1",3
"(G((p0) -> (F(p1)))) & (G((!(p0)) -> (F(!(p1)))))","2",3
"(G((p0) -> (F(p1)))) & (G((!(p0)) -> (F(!(p1)))))","3",3
......@@ -583,6 +612,7 @@ cat > expected <<EOF
"(G((p0) -> (F(p1)))) & (G((!(p0)) -> (F(!(p1)))))","15",3
"(G((p0) -> (F(p1)))) & (G((!(p0)) -> (F(!(p1)))))","16",3
"(G((p0) -> (F(p1)))) & (G((!(p0)) -> (F(!(p1)))))","17",3
"(G((p0) -> (F(p1)))) & (G((!(p0)) -> (F(!(p1)))))","18",3
"!((G((p0) -> (F(p1)))) & (G((!(p0)) -> (F(!(p1))))))","1",3
"!((G((p0) -> (F(p1)))) & (G((!(p0)) -> (F(!(p1))))))","2",3
"!((G((p0) -> (F(p1)))) & (G((!(p0)) -> (F(!(p1))))))","3",3
......@@ -599,6 +629,7 @@ cat > expected <<EOF
"!((G((p0) -> (F(p1)))) & (G((!(p0)) -> (F(!(p1))))))","15",3
"!((G((p0) -> (F(p1)))) & (G((!(p0)) -> (F(!(p1))))))","16",3
"!((G((p0) -> (F(p1)))) & (G((!(p0)) -> (F(!(p1))))))","17",3
"!((G((p0) -> (F(p1)))) & (G((!(p0)) -> (F(!(p1))))))","18",3
"(G(F(p0))) & (G(F(p1))) & (G(F(p2))) & (G(F(p3)))","1",1
"(G(F(p0))) & (G(F(p1))) & (G(F(p2))) & (G(F(p3)))","2",1
"(G(F(p0))) & (G(F(p1))) & (G(F(p2))) & (G(F(p3)))","3",1
......@@ -615,6 +646,7 @@ cat > expected <<EOF
"(G(F(p0))) & (G(F(p1))) & (G(F(p2))) & (G(F(p3)))","15",1
"(G(F(p0))) & (G(F(p1))) & (G(F(p2))) & (G(F(p3)))","16",1
"(G(F(p0))) & (G(F(p1))) & (G(F(p2))) & (G(F(p3)))","17",1
"(G(F(p0))) & (G(F(p1))) & (G(F(p2))) & (G(F(p3)))","18",1
"!((G(F(p0))) & (G(F(p1))) & (G(F(p2))) & (G(F(p3))))","1",5
"!((G(F(p0))) & (G(F(p1))) & (G(F(p2))) & (G(F(p3))))","2",5
"!((G(F(p0))) & (G(F(p1))) & (G(F(p2))) & (G(F(p3))))","3",5
......@@ -631,6 +663,7 @@ cat > expected <<EOF
"!((G(F(p0))) & (G(F(p1))) & (G(F(p2))) & (G(F(p3))))","15",5
"!((G(F(p0))) & (G(F(p1))) & (G(F(p2))) & (G(F(p3))))","16",5
"!((G(F(p0))) & (G(F(p1))) & (G(F(p2))) & (G(F(p3))))","17",5
"!((G(F(p0))) & (G(F(p1))) & (G(F(p2))) & (G(F(p3))))","18",5
"G((p0) -> ((p1) U (p2)))","1",2
"G((p0) -> ((p1) U (p2)))","2",2
"G((p0) -> ((p1) U (p2)))","3",2
......@@ -647,6 +680,7 @@ cat > expected <<EOF
"G((p0) -> ((p1) U (p2)))","15",2
"G((p0) -> ((p1) U (p2)))","16",2
"G((p0) -> ((p1) U (p2)))","17",2
"G((p0) -> ((p1) U (p2)))","18",2
"!(G((p0) -> ((p1) U (p2))))","1",3
"!(G((p0) -> ((p1) U (p2))))","2",3
"!(G((p0) -> ((p1) U (p2))))","3",3
......@@ -663,6 +697,7 @@ cat > expected <<EOF
"!(G((p0) -> ((p1) U (p2))))","15",3
"!(G((p0) -> ((p1) U (p2))))","16",3
"!(G((p0) -> ((p1) U (p2))))","17",3
"!(G((p0) -> ((p1) U (p2))))","18",3
"G(F((p0) <-> (X(X(p1)))))","1",9
"G(F((p0) <-> (X(X(p1)))))","2",7
"G(F((p0) <-> (X(X(p1)))))","3",4
......@@ -679,6 +714,7 @@ cat > expected <<EOF
"G(F((p0) <-> (X(X(p1)))))","15",4
"G(F((p0) <-> (X(X(p1)))))","16",4
"G(F((p0) <-> (X(X(p1)))))","17",4
"G(F((p0) <-> (X(X(p1)))))","18",4
"!(G(F((p0) <-> (X(X(p1))))))","1",7
"!(G(F((p0) <-> (X(X(p1))))))","2",7
"!(G(F((p0) <-> (X(X(p1))))))","3",7
......@@ -695,6 +731,7 @@ cat > expected <<EOF
"!(G(F((p0) <-> (X(X(p1))))))","15",7
"!(G(F((p0) <-> (X(X(p1))))))","16",7
"!(G(F((p0) <-> (X(X(p1))))))","17",7
"!(G(F((p0) <-> (X(X(p1))))))","18",7
"(G(!(p0))) & (G((p1) -> (F(p2)))) & (G((p2) -> (F(p0))))","1",1
"(G(!(p0))) & (G((p1) -> (F(p2)))) & (G((p2) -> (F(p0))))","2",1
"(G(!(p0))) & (G((p1) -> (F(p2)))) & (G((p2) -> (F(p0))))","3",1
......@@ -711,6 +748,7 @@ cat > expected <<EOF
"(G(!(p0))) & (G((p1) -> (F(p2)))) & (G((p2) -> (F(p0))))","15",1
"(G(!(p0))) & (G((p1) -> (F(p2)))) & (G((p2) -> (F(p0))))","16",1
"(G(!(p0))) & (G((p1) -> (F(p2)))) & (G((p2) -> (F(p0))))","17",1
"(G(!(p0))) & (G((p1) -> (F(p2)))) & (G((p2) -> (F(p0))))","18",1
"!((G(!(p0))) & (G((p1) -> (F(p2)))) & (G((p2) -> (F(p0)))))","1",2
"!((G(!(p0))) & (G((p1) -> (F(p2)))) & (G((p2) -> (F(p0)))))","2",2
"!((G(!(p0))) & (G((p1) -> (F(p2)))) & (G((p2) -> (F(p0)))))","3",2
......@@ -727,6 +765,7 @@ cat > expected <<EOF
"!((G(!(p0))) & (G((p1) -> (F(p2)))) & (G((p2) -> (F(p0)))))","15",2
"!((G(!(p0))) & (G((p1) -> (F(p2)))) & (G((p2) -> (F(p0)))))","16",2
"!((G(!(p0))) & (G((p1) -> (F(p2)))) & (G((p2) -> (F(p0)))))","17",2
"!((G(!(p0))) & (G((p1) -> (F(p2)))) & (G((p2) -> (F(p0)))))","18",2
"G((p0) -> (X(X(X(p1)))))","1",8
"G((p0) -> (X(X(X(p1)))))","2",8
"G((p0) -> (X(X(X(p1)))))","3",8
......@@ -743,6 +782,7 @@ cat > expected <<EOF
"G((p0) -> (X(X(X(p1)))))","15",8
"G((p0) -> (X(X(X(p1)))))","16",8
"G((p0) -> (X(X(X(p1)))))","17",8
"G((p0) -> (X(X(X(p1)))))","18",8
"!(G((p0) -> (X(X(X(p1))))))","1",9
"!(G((p0) -> (X(X(X(p1))))))","2",9
"!(G((p0) -> (X(X(X(p1))))))","3",9
......@@ -759,6 +799,7 @@ cat > expected <<EOF
"!(G((p0) -> (X(X(X(p1))))))","15",9
"!(G((p0) -> (X(X(X(p1))))))","16",9
"!(G((p0) -> (X(X(X(p1))))))","17",9
"!(G((p0) -> (X(X(X(p1))))))","18",9
"G((p0) -> (F(p1)))","1",2
"G((p0) -> (F(p1)))","2",2
"G((p0) -> (F(p1)))","3",2
......@@ -775,6 +816,7 @@ cat > expected <<EOF
"G((p0) -> (F(p1)))","15",2
"G((p0) -> (F(p1)))","16",2
"G((p0) -> (F(p1)))","17",2
"G((p0) -> (F(p1)))","18",2
"!(G((p0) -> (F(p1))))","1",2
"!(G((p0) -> (F(p1))))","2",2
"!(G((p0) -> (F(p1))))","3",2
......@@ -791,6 +833,7 @@ cat > expected <<EOF
"!(G((p0) -> (F(p1))))","15",2
"!(G((p0) -> (F(p1))))","16",2
"!(G((p0) -> (F(p1))))","17",2
"!(G((p0) -> (F(p1))))","18",2
"G((p0) U ((p1) U ((!(p0)) U (!(p1)))))","1",1
"G((p0) U ((p1) U ((!(p0)) U (!(p1)))))","2",1
"G((p0) U ((p1) U ((!(p0)) U (!(p1)))))","3",1
......@@ -807,6 +850,7 @@ cat > expected <<EOF
"G((p0) U ((p1) U ((!(p0)) U (!(p1)))))","15",1
"G((p0) U ((p1) U ((!(p0)) U (!(p1)))))","16",1
"G((p0) U ((p1) U ((!(p0)) U (!(p1)))))","17",1
"G((p0) U ((p1) U ((!(p0)) U (!(p1)))))","18",1
"!(G((p0) U ((p1) U ((!(p0)) U (!(p1))))))","1",2
"!(G((p0) U ((p1) U ((!(p0)) U (!(p1))))))","2",2
"!(G((p0) U ((p1) U ((!(p0)) U (!(p1))))))","3",2
......@@ -823,6 +867,7 @@ cat > expected <<EOF
"!(G((p0) U ((p1) U ((!(p0)) U (!(p1))))))","15",2
"!(G((p0) U ((p1) U ((!(p0)) U (!(p1))))))","16",2
"!(G((p0) U ((p1) U ((!(p0)) U (!(p1))))))","17",2
"!(G((p0) U ((p1) U ((!(p0)) U (!(p1))))))","18",2
"X((((p0) & (p1)) R ((!(p0)) U (!(p2)))) R (p1))","1",4
"X((((p0) & (p1)) R ((!(p0)) U (!(p2)))) R (p1))","2",5
"X((((p0) & (p1)) R ((!(p0)) U (!(p2)))) R (p1))","3",5
......@@ -839,6 +884,7 @@ cat > expected <<EOF
"X((((p0) & (p1)) R ((!(p0)) U (!(p2)))) R (p1))","15",5
"X((((p0) & (p1)) R ((!(p0)) U (!(p2)))) R (p1))","16",5
"X((((p0) & (p1)) R ((!(p0)) U (!(p2)))) R (p1))","17",5
"X((((p0) & (p1)) R ((!(p0)) U (!(p2)))) R (p1))","18",5
"!(X((((p0) & (p1)) R ((!(p0)) U (!(p2)))) R (p1)))","1",6
"!(X((((p0) & (p1)) R ((!(p0)) U (!(p2)))) R (p1)))","2",6
"!(X((((p0) & (p1)) R ((!(p0)) U (!(p2)))) R (p1)))","3",6
......@@ -855,6 +901,7 @@ cat > expected <<EOF
"!(X((((p0) & (p1)) R ((!(p0)) U (!(p2)))) R (p1)))","15",6
"!(X((((p0) & (p1)) R ((!(p0)) U (!(p2)))) R (p1)))","16",6
"!(X((((p0) & (p1)) R ((!(p0)) U (!(p2)))) R (p1)))","17",6
"!(X((((p0) & (p1)) R ((!(p0)) U (!(p2)))) R (p1)))","18",6
"((!(p0)) M (!(p1))) W (F(!(p2)))","1",4
"((!(p0)) M (!(p1))) W (F(!(p2)))","2",5
"((!(p0)) M (!(p1))) W (F(!(p2)))","3",3
......@@ -871,6 +918,7 @@ cat > expected <<EOF
"((!(p0)) M (!(p1))) W (F(!(p2)))","15",3
"((!(p0)) M (!(p1))) W (F(!(p2)))","16",3
"((!(p0)) M (!(p1))) W (F(!(p2)))","17",3
"((!(p0)) M (!(p1))) W (F(!(p2)))","18",3
"!(((!(p0)) M (!(p1))) W (F(!(p2))))","1",3
"!(((!(p0)) M (!(p1))) W (F(!(p2))))","2",3
"!(((!(p0)) M (!(p1))) W (F(!(p2))))","3",3
......@@ -887,6 +935,7 @@ cat > expected <<EOF
"!(((!(p0)) M (!(p1))) W (F(!(p2))))","15",3
"!(((!(p0)) M (!(p1))) W (F(!(p2))))","16",3
"!(((!(p0)) M (!(p1))) W (F(!(p2))))","17",3
"!(((!(p0)) M (!(p1))) W (F(!(p2))))","18",3
"((p0) & (F(p1)) & (G(F(p2)))) R (p1)","1",2
"((p0) & (F(p1)) & (G(F(p2)))) R (p1)","2",3
"((p0) & (F(p1)) & (G(F(p2)))) R (p1)","3",3
......@@ -903,6 +952,7 @@ cat > expected <<EOF
"((p0) & (F(p1)) & (G(F(p2)))) R (p1)","15",3
"((p0) & (F(p1)) & (G(F(p2)))) R (p1)","16",3
"((p0) & (F(p1)) & (G(F(p2)))) R (p1)","17",3
"((p0) & (F(p1)) & (G(F(p2)))) R (p1)","18",3
"!(((p0) & (F(p1)) & (G(F(p2)))) R (p1))","1",5
"!(((p0) & (F(p1)) & (G(F(p2)))) R (p1))","2",5
"!(((p0) & (F(p1)) & (G(F(p2)))) R (p1))","3",5
......@@ -919,6 +969,7 @@ cat > expected <<EOF
"!(((p0) & (F(p1)) & (G(F(p2)))) R (p1))","15",5
"!(((p0) & (F(p1)) & (G(F(p2)))) R (p1))","16",5
"!(((p0) & (F(p1)) & (G(F(p2)))) R (p1))","17",5
"!(((p0) & (F(p1)) & (G(F(p2))