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

Line Exec Source
1
/*********************                                                        */
2
/*! \file tptp_printer.h
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Andrew Reynolds, Tim King, Abdalrhman Mohamed
6
 ** This file is part of the CVC4 project.
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.\endverbatim
11
 **
12
 ** \brief The pretty-printer interface for the TPTP output language
13
 **
14
 ** The pretty-printer interface for the TPTP output language.
15
 **/
16
17
#include "cvc4_private.h"
18
19
#ifndef CVC4__PRINTER__TPTP_PRINTER_H
20
#define CVC4__PRINTER__TPTP_PRINTER_H
21
22
#include <iostream>
23
24
#include "printer/printer.h"
25
26
namespace CVC4 {
27
namespace printer {
28
namespace tptp {
29
30
126
class TptpPrinter : public CVC4::Printer
31
{
32
 public:
33
  using CVC4::Printer::toStream;
34
  void toStream(std::ostream& out,
35
                TNode n,
36
                int toDepth,
37
                size_t dag) const override;
38
  void toStream(std::ostream& out, const CommandStatus* s) const override;
39
  void toStream(std::ostream& out, const smt::Model& m) const override;
40
  /** print unsat core to stream
41
   * We use the expression names stored in the SMT engine associated with the
42
   * unsat core with UnsatCore::getSmtEngine.
43
   */
44
  void toStream(std::ostream& out, const UnsatCore& core) const override;
45
46
 private:
47
  /**
48
   * To stream model sort. This prints the appropriate output for type
49
   * tn declared via declare-sort or declare-datatype.
50
   */
51
  void toStreamModelSort(std::ostream& out,
52
                         const smt::Model& m,
53
                         TypeNode tn) const override;
54
55
  /**
56
   * To stream model term. This prints the appropriate output for term
57
   * n declared via declare-fun.
58
   */
59
  void toStreamModelTerm(std::ostream& out,
60
                         const smt::Model& m,
61
                         Node n) const override;
62
63
}; /* class TptpPrinter */
64
65
}  // namespace tptp
66
}  // namespace printer
67
}  // namespace CVC4
68
69
#endif /* CVC4__PRINTER__TPTP_PRINTER_H */