11#ifndef KLEE_EXPRSMTLIBPRINTER_H
12#define KLEE_EXPRSMTLIBPRINTER_H
137 void setOutput(llvm::raw_ostream &output);
233 llvm::raw_ostream *
o;
@ PRODUCE_MODELS
produce-models SMTLIBv2 option
@ PRINT_SUCCESS
print-success SMTLIBv2 option
@ INTERACTIVE_MODE
interactive-mode SMTLIBv2 option
const char * getSMTLIBOptionString(ExprSMTLIBPrinter::SMTLIBboolOptions option)
std::map< SMTLIBboolOptions, bool > smtlibBoolOptions
ConstantDisplayMode getConstantDisplayMode()
@ ABBR_LET
Abbreviate with let.
@ ABBR_NAMED
Abbreviate with :named annotations.
@ ABBR_NONE
Do not abbreviate.
void printExit()
Print the SMTLIBv2 command to exit.
llvm::raw_ostream * o
Output stream to write to.
void printReadExpr(const ref< ReadExpr > &e)
void setQuery(const Query &q)
void setOutput(llvm::raw_ostream &output)
const char * getSMTLIBKeyword(const ref< Expr > &e)
void scan(const ref< Expr > &e)
SMTLIB_SORT getSort(const ref< Expr > &e)
Determine the SMTLIBv2 sort of the expression.
void scanBindingExprDeps()
AbbreviationMode abbrMode
void printAShrExpr(const ref< AShrExpr > &e)
bool setLogic(SMTLIBv2Logic l)
bool setConstantDisplayMode(ConstantDisplayMode cdm)
void printFullExpression(const ref< Expr > &e, SMTLIB_SORT expectedSort)
Print expression without top-level abbreviations.
void printConstant(const ref< ConstantExpr > &e)
void setAbbreviationMode(AbbreviationMode am)
void printCastExpr(const ref< CastExpr > &e)
void printQueryInSingleAssert()
volatile bool humanReadable
@ QF_ABV
Logic using Theory of Arrays and Theory of Bitvectors.
const std::vector< const Array * > * arraysToCallGetValueOn
std::map< const ref< Expr >, int > BindingMap
void printCastToSort(const ref< Expr > &e, ExprSMTLIBPrinter::SMTLIB_SORT sort)
Print an expression but cast it to a particular SMTLIBv2 sort first.
bool haveConstantArray
Indicates if there were any constant arrays founds during a scan()
const Query * query
The query to print.
SMTLIB_SORT
Different supported SMTLIBv2 sorts (a.k.a type) in QF_AUFBV.
PrintContext * p
Helper printer class.
std::set< const Array * > usedArrays
Contains the arrays found during scans.
void setArrayValuesToGet(const std::vector< const Array * > &a)
void printExpression(const ref< Expr > &e, SMTLIB_SORT expectedSort)
void setHumanReadable(bool hr)
void printSelectExpr(const ref< SelectExpr > &e, ExprSMTLIBPrinter::SMTLIB_SORT s)
void scanUpdates(const UpdateNode *un)
Helper function for scan() that scans the expressions of an update node.
void printMachineReadableQuery()
@ OPTION_TRUE
Set option to true.
@ OPTION_FALSE
Set option to false.
void printUpdatesAndArray(const UpdateNode *un, const Array *root)
Recursively prints updatesNodes.
void printHumanReadableQuery()
void printSortArgsExpr(const ref< Expr > &e, ExprSMTLIBPrinter::SMTLIB_SORT s)
@ HEX
Display bit vector constants in Hexidecimal e.g.#x2D.
@ BINARY
Display bit vector constants in binary e.g. #b00101101.
@ DECIMAL
Display bit vector constants in Decimal e.g. (_ bv45 8)
std::set< ref< Expr > > seenExprs
Set of expressions seen during scan.
void printAssert(const ref< Expr > &e)
Print an assert statement for the given expr.
void printArrayDeclarations()
ExprSMTLIBPrinter()
Create a new printer that will print a query in the SMTLIBv2 language.
std::vector< BindingMap > orderedBindings
void printExtractExpr(const ref< ExtractExpr > &e)
bool setSMTLIBboolOption(SMTLIBboolOptions option, SMTLIBboolValues value)
void printNotEqualExpr(const ref< NeExpr > &e)
void printLogicalOrBitVectorExpr(const ref< Expr > &e, ExprSMTLIBPrinter::SMTLIB_SORT s)
Class representing a byte update of an array.