about summary refs log tree commit diff homepage
path: root/lib/Core/ExecutorUtil.cpp
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2023-05-01 13:57:33 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2023-06-22 16:13:14 +0900
commit811921cfc620b261e4d76a8f2ccb438651f40fc7 (patch)
treeb0417071b4b290fd36dc60244a3f2ba27dfe3a65 /lib/Core/ExecutorUtil.cpp
parent8a40d5b11fc50e2f13011f6ea39b561402450d4a (diff)
downloadklee-811921cfc620b261e4d76a8f2ccb438651f40fc7.tar.gz
Half-bake decision clustering
Diffstat (limited to 'lib/Core/ExecutorUtil.cpp')
-rw-r--r--lib/Core/ExecutorUtil.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Core/ExecutorUtil.cpp b/lib/Core/ExecutorUtil.cpp
index 09f58fd3..2c2c0018 100644
--- a/lib/Core/ExecutorUtil.cpp
+++ b/lib/Core/ExecutorUtil.cpp
@@ -274,4 +274,17 @@ namespace klee {
     llvm_unreachable("Unsupported expression in evalConstantExpr");
     return op1;
   }
+
+  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');
+  }
 }