blob: 245857c04bc63db8ebe2fdda935965f3e403ca98 (
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
|
/********************* */
/*! \file command_executer.cpp
** \verbatim
** Original author: kshitij
** Major contributors: mdeters
** Minor contributors (to current version):
** This file is part of the CVC4 prototype.
** Copyright (c) 2009, 2010, 2011 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.\endverbatim
**
** \brief An additional layer between commands and invoking them.
**/
#ifndef __CVC4__COMMAND_EXECUTER_H
#define __CVC4__COMMAND_EXECUTER_H
#include "expr/expr_manager.h"
#include "smt/smt_engine.h"
namespace CVC4 {
namespace main {
class CommandExecuter {
protected:
ExprManager& d_exprMgr;
SmtEngine d_smtEngine;
Options& d_options;
public:
// Note: though the options are not cached (instead a reference is
// used), the portfolio command executer currently parses them
// during initalization, creating thread-specific options and
// storing them
CommandExecuter(ExprManager &exprMgr, Options &options);
~CommandExecuter() {}
/**
* Executes a command. Recursively handles if cmd is a command
* sequence. Eventually uses doCommandSingleton (which can be
* overridden by a derived class).
*/
bool doCommand(CVC4::Command* cmd);
virtual std::string getSmtEngineStatus();
protected:
/** Executes treating cmd as a singleton */
virtual bool doCommandSingleton(CVC4::Command* cmd);
private:
CommandExecuter();
};
bool smtEngineInvoke(SmtEngine* smt,
Command* cmd,
std::ostream *out);
}/*main namespace*/
}/*CVC4 namespace*/
#endif /* __CVC4__COMMAND_EXECUTER_H */
|