Skip to content

Commit

Permalink
OpenSMT: Removed patch that fixed the formating of printed OpenSMT fo…
Browse files Browse the repository at this point in the history
…rmulas and fixed our own test. See discussion in usi-verification-and-security/opensmt#646 (comment) for details.
  • Loading branch information
daniel-raffler committed Oct 26, 2023
1 parent b15cb1d commit a85e382
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
17 changes: 0 additions & 17 deletions lib/native/source/opensmt/api.patch
Original file line number Diff line number Diff line change
Expand Up @@ -258,23 +258,6 @@ index b90430c2..c4b34fc4 100644
return mkUninterpFun(sym, std::move(terms));
}

@@ -1346,14 +1339,14 @@ void Logic::dumpWithLets(std::ostream & dump_out, PTRef formula) const {
if (term.size() > 0) dump_out << ")";

// Closes binding
- dump_out << "))\n";
+ dump_out << ")) ";
// Keep track of number of lets to close
num_lets++;

assert(enode_to_def.find(e) == enode_to_def.end());
enode_to_def[e] = std::move(definition);
}
- dump_out << '\n' << enode_to_def[formula] << '\n';
+ dump_out << enode_to_def[formula];

// Close all lets
for (unsigned n = 1; n <= num_lets; n++) dump_out << ")";
@@ -1488,6 +1481,9 @@ Logic::collectStats(PTRef root, int& n_of_conn, int& n_of_eq, int& n_of_uf, int&

PTRef Logic::conjoinExtras(PTRef root) { return root; }
Expand Down
4 changes: 4 additions & 0 deletions src/org/sosy_lab/java_smt/test/SolverFormulaIOTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,10 @@ private void checkThatFunOnlyDeclaredOnce(String formDump) {
private void checkThatAssertIsInLastLine(String lines) {
// Boolector will fail this anyway since bools are bitvecs for btor
TruthJUnit.assume().that(solver).isNotEqualTo(Solvers.BOOLECTOR);

// OpenSMT has newline characters within the (assert ..) block that break this test
TruthJUnit.assume().that(solver).isNotEqualTo(Solvers.OPENSMT);

lines = lines.trim();
assertWithMessage("last line of <\n" + lines + ">")
.that(getLast(Splitter.on('\n').split(lines)))
Expand Down

0 comments on commit a85e382

Please sign in to comment.