blob: 05ee12462008f7f8b5d7789283c2d49e2534714b (
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
|
/********************* -*- C++ -*- */
/** smt_engine.cpp
** 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.
**
**/
#include "smt/smt_engine.h"
#include "util/exception.h"
#include "util/command.h"
namespace CVC4 {
void SmtEngine::doCommand(Command* c) {
c->invoke(this);
}
Expr SmtEngine::preprocess(Expr e) {
return e;
}
void SmtEngine::processAssertionList() {
for(std::vector<Expr>::iterator i = d_assertions.begin();
i != d_assertions.end();
++i)
;//d_expr = d_expr.isNull() ? *i : d_expr.andExpr(*i);
}
Result SmtEngine::check() {
processAssertionList();
return Result(Result::VALIDITY_UNKNOWN);
}
Result SmtEngine::quickCheck() {
processAssertionList();
return Result(Result::VALIDITY_UNKNOWN);
}
void SmtEngine::addFormula(Expr e) {
d_assertions.push_back(e);
}
Result SmtEngine::checkSat(Expr e) {
e = preprocess(e);
addFormula(e);
return check();
}
Result SmtEngine::query(Expr e) {
e = preprocess(e);
addFormula(e);
return check();
}
Result SmtEngine::assert(Expr e) {
e = preprocess(e);
addFormula(e);
return quickCheck();
}
}/* CVC4 namespace */
|