Skip to content

Commit 20d286d

Browse files
committed
Fixed splitter algorithm for single always specifications.
1 parent 1030e6a commit 20d286d

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

src/splitter.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -282,20 +282,6 @@ tau<BAs...> tau_splitter (const tau<BAs...>& fm, splitter_type st) {
282282

283283
auto splitter_of_clause = [&](const tau<BAs...>& clause) {
284284
auto specs = get_cnf_wff_clauses(clause);
285-
if (specs.size() == 1) {
286-
// Check if only always + no constraints present
287-
if (is_child_non_terminal(p::wff_always, specs[0]) && !
288-
find_top(specs[0],
289-
is_non_terminal<p::constraint, BAs...>). has_value()) {
290-
// Split unbound continuation
291-
auto ubd_ctn = transform_to_execution(specs[0]);
292-
BOOST_LOG_TRIVIAL(trace) << "Unbound continuation for splitter: " << ubd_ctn;
293-
auto res = nso_tau_splitter(ubd_ctn, st);
294-
res.first = build_wff_always(res.first);
295-
BOOST_LOG_TRIVIAL(trace) << "Splitter of unbound continuation: " << res.first;
296-
return res;
297-
}
298-
}
299285
bool good_splitter = false;
300286
for (auto& spec : specs) {
301287
bool is_aw = is_child_non_terminal(p::wff_always, spec);

tests/integration/test_integration-splitter.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ TEST_SUITE("Tau_splitter_upper_tests") {
9696
auto check_uniter_const = find_top(s, is_non_terminal<tau_parser::uninterpreted_constant, tau_ba<sbf_ba>, sbf_ba>);
9797
CHECK(check_uniter_const.has_value());
9898
}
99+
100+
TEST_CASE("Tau_splitter_9") {
101+
const char *sample = "(always o1[t] = i1[t]).";
102+
auto src = make_tau_source(sample);
103+
auto fm = make_nso_rr_using_factory<tau_ba<sbf_ba>, sbf_ba>(src).value().main;
104+
auto s = tau_splitter(fm, splitter_type::upper);
105+
auto check_uniter_const = find_top(s, is_non_terminal<tau_parser::uninterpreted_constant, tau_ba<sbf_ba>, sbf_ba>);
106+
CHECK(check_uniter_const.has_value());
107+
}
99108
}
100109

101110
TEST_SUITE("Tau_splitter_middle_tests") {

0 commit comments

Comments
 (0)