1//===- ExportSMTLIB.h - SMT-LIB Exporter ------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Defines the interface to the SMT-LIB emitter.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef MLIR_TARGET_EXPORTSMTLIB_H
14#define MLIR_TARGET_EXPORTSMTLIB_H
15
16#include "mlir/Support/LLVM.h"
17
18namespace mlir {
19class Operation;
20namespace smt {
21
22/// Emission options for the ExportSMTLIB pass. Allows controlling the emitted
23/// format and overall behavior.
24struct SMTEmissionOptions {
25 // Don't produce 'let' expressions to bind expressions that are only used
26 // once, but inline them directly at the use-site.
27 bool inlineSingleUseValues = false;
28 // Increase indentation for each 'let' expression body.
29 bool indentLetBody = false;
30 // Emit a '(reset)' command at the end of each solver scope.
31 bool emitReset = true;
32};
33
34/// Run the ExportSMTLIB pass.
35LogicalResult
36exportSMTLIB(Operation *module, llvm::raw_ostream &os,
37 const SMTEmissionOptions &options = SMTEmissionOptions());
38
39/// Register the ExportSMTLIB pass.
40void registerExportSMTLIBTranslation();
41
42} // namespace smt
43} // namespace mlir
44
45#endif // MLIR_TARGET_EXPORTSMTLIB_H
46