merge from replay branch
[cvc5.git] / src / main / interactive_shell.h
1 /********************* */
2 /*! \file interactive_shell.h
3 ** \verbatim
4 ** Original author: cconway
5 ** Major contributors: none
6 ** Minor contributors (to current version): none
7 ** This file is part of the CVC4 prototype.
8 ** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys)
9 ** Courant Institute of Mathematical Sciences
10 ** New York University
11 ** See the file COPYING in the top-level source directory for licensing
12 ** information.\endverbatim
13 **
14 ** \brief Interactive shell for CVC4
15 **/
16
17 #ifndef __CVC4__INTERACTIVE_SHELL_H
18 #define __CVC4__INTERACTIVE_SHELL_H
19
20 #include <iostream>
21 #include <string>
22
23 #include "util/language.h"
24
25 namespace CVC4 {
26
27 class Command;
28 class ExprManager;
29 class Options;
30
31 namespace parser {
32 class Parser;
33 }/* CVC4::parser namespace */
34
35 class CVC4_PUBLIC InteractiveShell {
36 std::istream& d_in;
37 std::ostream& d_out;
38 parser::Parser* d_parser;
39 const InputLanguage d_language;
40
41 static const std::string INPUT_FILENAME;
42
43 public:
44 InteractiveShell(ExprManager& exprManager, const Options& options);
45
46 /**
47 * Read a command from the interactive shell. This will read as
48 * many lines as necessary to parse a well-formed command.
49 */
50 Command* readCommand();
51
52 /**
53 * Return the internal parser being used.
54 */
55 parser::Parser* getParser() {
56 return d_parser;
57 }
58
59 };/* class InteractiveShell */
60
61 }/* CVC4 namespace */
62
63 #endif /* __CVC4__INTERACTIVE_SHELL_H */
64