From 811921cfc620b261e4d76a8f2ccb438651f40fc7 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Mon, 1 May 2023 13:57:33 +0900 Subject: Half-bake decision clustering --- lib/Core/ExecutorUtil.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/Core/ExecutorUtil.cpp') 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'); + } } -- cgit 1.4.1