summaryrefslogtreecommitdiff
path: root/src/expr/kind.h
blob: 624ab73374b23019dff4fd358f85bfdb61e3ff2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*********************                                           -*- C++ -*-  */
/** kind.h
 ** This file is part of the CVC4 prototype.
 ** Copyright (c) 2009 The Analysis of Computer Systems Group (ACSys)
 ** Courant Institute of Mathematical Sciences
 ** New York University
 ** See the file COPYING in the top-level source directory for licensing
 ** information.
 **
 **/

#ifndef __CVC4__KIND_H
#define __CVC4__KIND_H

#include "cvc4_config.h"
#include <iostream>

namespace CVC4 {

// TODO: create this file (?) from theory solver headers so that we
// have a collection of kinds from all.  This file is mainly a
// placeholder for design & development work.

enum Kind {
  /* undefined */
  UNDEFINED_KIND = -1,
  /** Null Kind */
  NULL_EXPR,

  /* built-ins */
  EQUAL,
  ITE,
  SKOLEM,
  VARIABLE,

  /* propositional connectives */
  FALSE,
  TRUE,

  NOT,

  AND,
  IFF,
  IMPLIES,
  OR,
  XOR,

  /* from arith */
  PLUS,
  MINUS,
  MULT

};/* enum Kind */

inline std::ostream& operator<<(std::ostream&, CVC4::Kind) CVC4_PUBLIC;
inline std::ostream& operator<<(std::ostream& out, CVC4::Kind k) {
  using namespace CVC4;

  switch(k) {

  /* special cases */
  case UNDEFINED_KIND: out << "UNDEFINED_KIND"; break;
  case NULL_EXPR:      out << "NULL";           break;

  case EQUAL:          out << "EQUAL";          break;
  case ITE:            out << "ITE";            break;
  case SKOLEM:         out << "SKOLEM";         break;
  case VARIABLE:       out << "VARIABLE";       break;

  /* propositional connectives */
  case FALSE:          out << "FALSE";          break;
  case TRUE:           out << "TRUE";           break;

  case NOT:            out << "NOT";            break;

  case AND:            out << "AND";            break;
  case IFF:            out << "IFF";            break;
  case IMPLIES:        out << "IMPLIES";        break;
  case OR:             out << "OR";             break;
  case XOR:            out << "XOR";            break;

  /* from arith */
  case PLUS:           out << "PLUS";           break;
  case MINUS:          out << "MINUS";          break;
  case MULT:           out << "MULT";           break;

  default:             out << "UNKNOWNKIND!";   break;
  }

  return out;
}

}/* CVC4 namespace */

#endif /* __CVC4__KIND_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback