GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/printer/tptp/tptp_printer.h Lines: 1 1 100.0 %
Date: 2021-05-22 Branches: 0 0 0.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Andrew Reynolds, Tim King, Mathias Preiner
4
 *
5
 * This file is part of the cvc5 project.
6
 *
7
 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8
 * in the top-level source directory and their institutional affiliations.
9
 * All rights reserved.  See the file COPYING in the top-level source
10
 * directory for licensing information.
11
 * ****************************************************************************
12
 *
13
 * The pretty-printer interface for the TPTP output language.
14
 */
15
16
#include "cvc5_private.h"
17
18
#ifndef CVC5__PRINTER__TPTP_PRINTER_H
19
#define CVC5__PRINTER__TPTP_PRINTER_H
20
21
#include <iostream>
22
23
#include "printer/printer.h"
24
25
namespace cvc5 {
26
namespace printer {
27
namespace tptp {
28
29
129
class TptpPrinter : public cvc5::Printer
30
{
31
 public:
32
  using cvc5::Printer::toStream;
33
  void toStream(std::ostream& out,
34
                TNode n,
35
                int toDepth,
36
                size_t dag) const override;
37
  void toStream(std::ostream& out, const CommandStatus* s) const override;
38
  void toStream(std::ostream& out, const smt::Model& m) const override;
39
  /** print unsat core to stream
40
   * We use the expression names stored in the SMT engine associated with the
41
   * unsat core with UnsatCore::getSmtEngine.
42
   */
43
  void toStream(std::ostream& out, const UnsatCore& core) const override;
44
45
 private:
46
  /**
47
   * To stream model sort. This prints the appropriate output for type
48
   * tn declared via declare-sort or declare-datatype.
49
   */
50
  void toStreamModelSort(std::ostream& out,
51
                         const smt::Model& m,
52
                         TypeNode tn) const override;
53
54
  /**
55
   * To stream model term. This prints the appropriate output for term
56
   * n declared via declare-fun.
57
   */
58
  void toStreamModelTerm(std::ostream& out,
59
                         const smt::Model& m,
60
                         Node n) const override;
61
62
}; /* class TptpPrinter */
63
64
}  // namespace tptp
65
}  // namespace printer
66
}  // namespace cvc5
67
68
#endif /* CVC5__PRINTER__TPTP_PRINTER_H */