* make Model class private (as discussed at meeting today)
[cvc5.git] / src / main / interactive_shell.h
1 /********************* */
2 /*! \file interactive_shell.h
3 ** \verbatim
4 ** Original author: cconway
5 ** Major contributors: mdeters
6 ** Minor contributors (to current version): none
7 ** This file is part of the CVC4 prototype.
8 ** Copyright (c) 2009-2012 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 #include "options/options.h"
25
26 namespace CVC4 {
27
28 class Command;
29 class ExprManager;
30 class Options;
31
32 namespace parser {
33 class Parser;
34 }/* CVC4::parser namespace */
35
36 class CVC4_PUBLIC InteractiveShell {
37 std::istream& d_in;
38 std::ostream& d_out;
39 parser::Parser* d_parser;
40 const Options& d_options;
41 bool d_quit;
42 bool d_usingReadline;
43
44 std::string d_historyFilename;
45
46 static const std::string INPUT_FILENAME;
47 static const unsigned s_historyLimit = 500;
48
49 public:
50 InteractiveShell(ExprManager& exprManager, const Options& options);
51
52 /**
53 * Close out the interactive session.
54 */
55 ~InteractiveShell();
56
57 /**
58 * Read a command from the interactive shell. This will read as
59 * many lines as necessary to parse a well-formed command.
60 */
61 Command* readCommand();
62
63 /**
64 * Return the internal parser being used.
65 */
66 parser::Parser* getParser() {
67 return d_parser;
68 }
69
70 };/* class InteractiveShell */
71
72 }/* CVC4 namespace */
73
74 #endif /* __CVC4__INTERACTIVE_SHELL_H */