InteractiveShell: Remove redundant options argument. (#2244)
[cvc5.git] / src / main / interactive_shell.h
1 /********************* */
2 /*! \file interactive_shell.h
3 ** \verbatim
4 ** Top contributors (to current version):
5 ** Morgan Deters, Christopher L. Conway, Aina Niemetz
6 ** This file is part of the CVC4 project.
7 ** Copyright (c) 2009-2018 by the authors listed in the file AUTHORS
8 ** in the top-level source directory) and their institutional affiliations.
9 ** All rights reserved. See the file COPYING in the top-level source
10 ** directory for licensing information.\endverbatim
11 **
12 ** \brief Interactive shell for CVC4
13 **/
14
15 #ifndef __CVC4__INTERACTIVE_SHELL_H
16 #define __CVC4__INTERACTIVE_SHELL_H
17
18 #include <iosfwd>
19 #include <string>
20
21 #include "options/language.h"
22 #include "options/options.h"
23 #include "util/unsafe_interrupt_exception.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 {
37 const Options& d_options;
38 std::istream& d_in;
39 std::ostream& d_out;
40 parser::Parser* d_parser;
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);
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() { return d_parser; }
67
68 };/* class InteractiveShell */
69
70 }/* CVC4 namespace */
71
72 #endif /* __CVC4__INTERACTIVE_SHELL_H */