-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat named and full unsat cores separately but with common interface…
…; moved printing to `UnsatCore`; divided minimization into separate class `Minimize`
- Loading branch information
Showing
10 changed files
with
524 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#include "UnsatCore.h" | ||
|
||
#include <common/TermNames.h> | ||
#include <logics/Logic.h> | ||
|
||
#include <iostream> | ||
|
||
namespace opensmt { | ||
|
||
void UnsatCore::print() const { | ||
print(std::cout); | ||
} | ||
|
||
void UnsatCore::print(std::ostream & os) const { | ||
printBegin(os); | ||
printBody(os); | ||
printEnd(os); | ||
} | ||
|
||
void UnsatCore::printBegin(std::ostream & os) const { | ||
os << "(\n"; | ||
} | ||
|
||
void UnsatCore::printBody(std::ostream & os) const { | ||
for (PTRef term : getTerms()) { | ||
printTerm(os, term); | ||
os << '\n'; | ||
} | ||
} | ||
|
||
void UnsatCore::printEnd(std::ostream & os) const { | ||
os << ')' << std::endl; | ||
} | ||
|
||
void NamedUnsatCore::printTerm(std::ostream & os, PTRef term) const { | ||
assert(termNames.contains(term)); | ||
os << termNames.nameForTerm(term); | ||
} | ||
|
||
void FullUnsatCore::printTerm(std::ostream & os, PTRef term) const { | ||
os << logic.printTerm(term); | ||
} | ||
|
||
} // namespace opensmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.