summaryrefslogtreecommitdiff
path: root/src/include/result.h
blob: 1cecc53013afb2a95c3396f2ee4e2cc2b9778305 (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
/*********************                                           -*- C++ -*-  */
/** result.h
 ** This file is part of the CVC4 prototype.
 **
 ** The Analysis of Computer Systems Group (ACSys)
 ** Courant Institute of Mathematical Sciences
 ** New York University
 **/

#ifndef __CVC4_RESULT_H
#define __CVC4_RESULT_H

namespace CVC4 {

// TODO: perhaps best to templatize Result on its Kind (SAT/Validity),
// but this requires doing the same for Prover and needs discussion.

// TODO: subclass to provide models, etc.  This is really just
// intended as a three-valued response code.

/**
 * Three-valued, immutable SMT result, with optional explanation.
 */
class Result {
public:
  enum {
    UNSAT = 0,
    SAT = 1,
    UNKNOWN = 2
  } SAT;

  enum {
    INVALID = 0,
    VALID = 1,
    UNKNOWN = 2
  } Validity;

  enum {
    REQUIRES_FULL_CHECK,
    INCOMPLETE,
    TIMEOUT,
    BAIL,
    OTHER
  } UnknownExplanation;

private:
  SAT      d_sat;
  Validity d_validity;
  enum { SAT, VALIDITY } d_which;

public:
  Result(SAT);
  Result(Validity);

  SAT isSAT();
  Validity isValid();
  UnknownExplanation whyUnknown();

};/* class Result */

}/* CVC4 namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback