diff options
Diffstat (limited to 'lib/Core/Differentiator.cpp')
-rw-r--r-- | lib/Core/Differentiator.cpp | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/lib/Core/Differentiator.cpp b/lib/Core/Differentiator.cpp index c68ec6d1..ea713ad4 100644 --- a/lib/Core/Differentiator.cpp +++ b/lib/Core/Differentiator.cpp @@ -15,18 +15,6 @@ using namespace klee; namespace klee { -bool isSymArg(std::string name) { - return (name.size() == 5 // string::starts_with requires C++20 - && name[0] == 'a' && name[1] == 'r' && name[2] == 'g' - && '0' <= name[3] && name[3] <= '9' - && '0' <= name[4] && name[4] <= '9'); -} - -bool isSymOut(std::string name) { - // string::starts_with requires C++20 - return (name[0] == 'o' && name[1] == 'u' && name[2] == 't' && name[3] == '!' - && '0' <= name[name.size() - 1] && name[name.size() - 1] <= '9'); -} std::string quoted(const std::string& s) { std::stringstream ss; @@ -46,22 +34,19 @@ void writeHex(llvm::raw_ostream& os, std::string s) { llvm::raw_ostream &operator<<(llvm::raw_ostream& os, const Differentiator& d) { os << "{("; uint8_t last = 0; - for (const auto& p : d.args) { - assert(p.first == last); - if (last) + for (const auto& s : d.args) { + if (last++) os << " "; - os << quoted(p.second); - last++; + os << quoted(s); } os << ") {"; last = 0; for (const auto& p : d.outputs) { - os << (last ? " :" : ":") << p.first << " {"; os << d.revA << " "; + os << (last++ ? " :" : ":") << p.first << " {"; os << d.revA << " "; writeHex(os, p.second.first); os << " " << d.revB << " "; writeHex(os, p.second.second); os << "}"; - last++; } os << "}}"; |