Skip to content

Commit ffa9b99

Browse files
author
Cynthia Kop
committed
Implemented input reader for ARI format
1 parent 5d6ce44 commit ffa9b99

File tree

6 files changed

+919
-7
lines changed

6 files changed

+919
-7
lines changed

src/firstorder.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,18 @@ string FirstOrderSplitter :: determine_nontermination(
505505
get_constant_data(rules[i]->query_right_side(), F);
506506
}
507507

508-
if (single_sorted_alphabet(F)) return "NO";
509-
if (manip.left_linear(rules) &&
510-
!manip.has_critical_pairs(rules)) return "NO";
508+
// in some cases first-order non-termination immediately implies higher-order
509+
// non-termination
510+
if (single_sorted_alphabet(F) ||
511+
(manip.left_linear(rules) && !manip.has_critical_pairs(rules))) {
512+
while (!ifile.eof()) {
513+
string input;
514+
getline(ifile, input);
515+
reason += " || " + input + "\n";
516+
}
517+
system("rm resources/result");
518+
return "NO";
519+
}
511520

512521
// get counterexample and check its validity
513522
string counterexample;

src/horpojustifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ void HorpoJustifier :: justify(int variable, int &justifyindex,
488488

489489
if (description.substr(0,4) == "Lex[") {
490490
string f = description.substr(4,description.length()-5);
491-
if (atom->query_variable()) f + " " + wout.in_symbol() + " Lex";
491+
if (atom->query_variable()) status = f + " " + wout.in_symbol() + " Lex";
492492
else status = f + " " + wout.in_symbol() + " Mul";
493493
continue;
494494
}

0 commit comments

Comments
 (0)