diff options
Diffstat (limited to 'lib/SMT/SMTParser.cpp')
-rw-r--r-- | lib/SMT/SMTParser.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/SMT/SMTParser.cpp b/lib/SMT/SMTParser.cpp index 32e453f0..6e40978a 100644 --- a/lib/SMT/SMTParser.cpp +++ b/lib/SMT/SMTParser.cpp @@ -77,6 +77,15 @@ int SMTParser::StringToInt(const std::string& s) { } +ExprHandle SMTParser::GetConstExpr(std::string val, uint8_t base, klee::Expr::Width w) { + cerr << "In GetConstExpr(): val=" << val << ", base=" << (unsigned)base << ", width=" << w << "\n"; + assert(base == 2 || base == 10 || base == 16); + llvm::APInt ap(w, val.c_str(), val.length(), base); + + return klee::ConstantExpr::alloc(ap); +} + + void SMTParser::PushVarEnv() { cout << "Pushing new var env\n"; varEnvs.push(VarEnv(varEnvs.top())); |